2
* Copyright (c) 1997, 1998, 1999, 2000, 2001
3
* Inferno Nettverk A/S, Norway. All rights reserved.
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
8
* 1. The above copyright notice, this list of conditions and the following
9
* disclaimer must appear in all copies of the software, derivative works
10
* or modified versions, and any portions thereof, aswell as in all
11
* supporting documentation.
12
* 2. All advertising materials mentioning features or use of this software
13
* must display the following acknowledgement:
14
* This product includes software developed by
15
* Inferno Nettverk A/S, Norway.
16
* 3. The name of the author may not be used to endorse or promote products
17
* derived from this software without specific prior written permission.
19
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
* Inferno Nettverk A/S requests users of this software to return to
32
* Software Distribution Coordinator or sdc@inet.no
33
* Inferno Nettverk A/S
39
* any improvements or extensions that they make and grant Inferno Nettverk A/S
40
* the rights to redistribute these changes.
44
/* $Id: socks.h,v 1.5 2001/10/07 12:38:35 karls Exp $ */
46
#define accept Raccept
48
#define bindresvport Rbindresvport
49
#define connect Rconnect
50
#define gethostbyname Rgethostbyname
51
#define gethostbyname2 Rgethostbyname2
52
#define getpeername Rgetpeername
53
#define getsockname Rgetsockname
57
#define recvfrom Rrecvfrom
58
#define recvfrom Rrecvfrom
59
#define recvmsg Rrecvmsg
60
#define rresvport Rrresvport
62
#define sendmsg Rsendmsg
63
#define sendto Rsendto
65
#define writev Rwritev
68
SOCKSinit(char *progname);
70
* If you want to, call this function with "progname" as the name of
71
* your program. For systems that do not have __progname.
77
#if defined (__STDC__) || defined (_AIX) \
78
|| (defined (__mips) && defined (_SYSTYPE_SVR4)) \
79
|| defined(WIN32) || defined(__cplusplus)
80
# define __P(protos) protos
82
# define __P(protos) ()
85
int Raccept __P((int, struct sockaddr *, socklen_t *));
86
int Rconnect __P((int, const struct sockaddr *, socklen_t));
87
int Rgetsockname __P((int, struct sockaddr *, socklen_t *));
88
int Rgetpeername __P((int, struct sockaddr *, socklen_t *));
89
ssize_t Rsendto __P((int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen));
90
ssize_t Rrecvfrom __P((int s, void *buf, size_t len, int flags, struct sockaddr * from, socklen_t *fromlen));
91
ssize_t Rsendmsg __P((int s, const struct msghdr *msg, int flags));
92
ssize_t Rrecvmsg __P((int s, struct msghdr *msg, int flags));
93
int Rbind __P((int, const struct sockaddr *, socklen_t));
95
int Rbindresvport __P((int, struct sockaddr_in *));
96
int Rrresvport __P((int *));
97
struct hostent *Rgethostbyname __P((const char *));
98
struct hostent *Rgethostbyname2 __P((const char *, int af));
99
ssize_t Rwrite __P((int d, const void *buf, size_t nbytes));
100
ssize_t Rwritev __P((int d, const struct iovec *iov, int iovcnt));
101
ssize_t Rsend __P((int s, const void *msg, size_t len, int flags));
102
ssize_t Rread __P((int d, void *buf, size_t nbytes));
103
ssize_t Rreadv __P((int d, const struct iovec *iov, int iovcnt));
104
ssize_t Rrecv __P((int s, void *msg, size_t len, int flags));
106
int Rlisten __P((int, int));
107
int Rselect __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));