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