18360efbdSAlfred Perlstein /* $NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $ */ 28360efbdSAlfred Perlstein /* $FreeBSD$ */ 38360efbdSAlfred Perlstein 42e322d37SHiroki Sato /*- 5*2321c474SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 6*2321c474SPedro F. Giffuni * 72e322d37SHiroki Sato * Copyright (c) 2009, Sun Microsystems, Inc. 82e322d37SHiroki Sato * All rights reserved. 98360efbdSAlfred Perlstein * 102e322d37SHiroki Sato * Redistribution and use in source and binary forms, with or without 112e322d37SHiroki Sato * modification, are permitted provided that the following conditions are met: 122e322d37SHiroki Sato * - Redistributions of source code must retain the above copyright notice, 132e322d37SHiroki Sato * this list of conditions and the following disclaimer. 142e322d37SHiroki Sato * - Redistributions in binary form must reproduce the above copyright notice, 152e322d37SHiroki Sato * this list of conditions and the following disclaimer in the documentation 162e322d37SHiroki Sato * and/or other materials provided with the distribution. 172e322d37SHiroki Sato * - Neither the name of Sun Microsystems, Inc. nor the names of its 182e322d37SHiroki Sato * contributors may be used to endorse or promote products derived 192e322d37SHiroki Sato * from this software without specific prior written permission. 208360efbdSAlfred Perlstein * 212e322d37SHiroki Sato * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 222e322d37SHiroki Sato * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 232e322d37SHiroki Sato * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 242e322d37SHiroki Sato * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 252e322d37SHiroki Sato * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 262e322d37SHiroki Sato * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 272e322d37SHiroki Sato * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 282e322d37SHiroki Sato * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 292e322d37SHiroki Sato * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 302e322d37SHiroki Sato * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 312e322d37SHiroki Sato * POSSIBILITY OF SUCH DAMAGE. 328360efbdSAlfred Perlstein */ 338360efbdSAlfred Perlstein /* 348360efbdSAlfred Perlstein * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc. 358360efbdSAlfred Perlstein */ 368360efbdSAlfred Perlstein 378360efbdSAlfred Perlstein /* 388360efbdSAlfred Perlstein * clnt.h - Client side remote procedure call interface. 398360efbdSAlfred Perlstein */ 408360efbdSAlfred Perlstein 418360efbdSAlfred Perlstein #ifndef _RPC_CLNT_SOC_H 428360efbdSAlfred Perlstein #define _RPC_CLNT_SOC_H 438360efbdSAlfred Perlstein 448360efbdSAlfred Perlstein /* derived from clnt_soc.h 1.3 88/12/17 SMI */ 458360efbdSAlfred Perlstein 468360efbdSAlfred Perlstein /* 478360efbdSAlfred Perlstein * All the following declarations are only for backward compatibility 488360efbdSAlfred Perlstein * with TS-RPC. 498360efbdSAlfred Perlstein */ 508360efbdSAlfred Perlstein 518360efbdSAlfred Perlstein #include <sys/cdefs.h> 528360efbdSAlfred Perlstein 538360efbdSAlfred Perlstein #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ 548360efbdSAlfred Perlstein 558360efbdSAlfred Perlstein /* 568360efbdSAlfred Perlstein * TCP based rpc 578360efbdSAlfred Perlstein * CLIENT * 588360efbdSAlfred Perlstein * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) 598360efbdSAlfred Perlstein * struct sockaddr_in *raddr; 608360efbdSAlfred Perlstein * u_long prog; 618360efbdSAlfred Perlstein * u_long version; 628360efbdSAlfred Perlstein * register int *sockp; 638360efbdSAlfred Perlstein * u_int sendsz; 648360efbdSAlfred Perlstein * u_int recvsz; 658360efbdSAlfred Perlstein */ 668360efbdSAlfred Perlstein __BEGIN_DECLS 67bb28f3c2SWarner Losh extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *, 68bb28f3c2SWarner Losh u_int, u_int); 698360efbdSAlfred Perlstein __END_DECLS 708360efbdSAlfred Perlstein 718360efbdSAlfred Perlstein /* 728360efbdSAlfred Perlstein * Raw (memory) rpc. 738360efbdSAlfred Perlstein */ 748360efbdSAlfred Perlstein __BEGIN_DECLS 75bb28f3c2SWarner Losh extern CLIENT *clntraw_create(u_long, u_long); 768360efbdSAlfred Perlstein __END_DECLS 778360efbdSAlfred Perlstein 788360efbdSAlfred Perlstein 798360efbdSAlfred Perlstein /* 808360efbdSAlfred Perlstein * UDP based rpc. 818360efbdSAlfred Perlstein * CLIENT * 828360efbdSAlfred Perlstein * clntudp_create(raddr, program, version, wait, sockp) 838360efbdSAlfred Perlstein * struct sockaddr_in *raddr; 848360efbdSAlfred Perlstein * u_long program; 858360efbdSAlfred Perlstein * u_long version; 868360efbdSAlfred Perlstein * struct timeval wait; 878360efbdSAlfred Perlstein * int *sockp; 888360efbdSAlfred Perlstein * 898360efbdSAlfred Perlstein * Same as above, but you specify max packet sizes. 908360efbdSAlfred Perlstein * CLIENT * 918360efbdSAlfred Perlstein * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) 928360efbdSAlfred Perlstein * struct sockaddr_in *raddr; 938360efbdSAlfred Perlstein * u_long program; 948360efbdSAlfred Perlstein * u_long version; 958360efbdSAlfred Perlstein * struct timeval wait; 968360efbdSAlfred Perlstein * int *sockp; 978360efbdSAlfred Perlstein * u_int sendsz; 988360efbdSAlfred Perlstein * u_int recvsz; 998360efbdSAlfred Perlstein */ 1008360efbdSAlfred Perlstein __BEGIN_DECLS 101bb28f3c2SWarner Losh extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long, 102bb28f3c2SWarner Losh struct timeval, int *); 103bb28f3c2SWarner Losh extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long, 104bb28f3c2SWarner Losh struct timeval, int *, u_int, u_int); 1058360efbdSAlfred Perlstein __END_DECLS 1068360efbdSAlfred Perlstein 1078360efbdSAlfred Perlstein #endif /* _RPC_CLNT_SOC_H */ 108