~ubuntu-branches/ubuntu/karmic/dante/karmic

« back to all changes in this revision

Viewing changes to capi/socks.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2002-04-07 12:45:55 UTC
  • Revision ID: james.westby@ubuntu.com-20020407124555-qke8rt2tdor0naz2
Tags: upstream-1.1.11.12p1
Import upstream version 1.1.11.12p1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 1997, 1998, 1999, 2000, 2001
 
3
 *      Inferno Nettverk A/S, Norway.  All rights reserved.
 
4
 *
 
5
 * Redistribution and use in source and binary forms, with or without
 
6
 * modification, are permitted provided that the following conditions
 
7
 * are met:
 
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.
 
18
 *
 
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.
 
29
 *
 
30
 * Inferno Nettverk A/S requests users of this software to return to
 
31
 *
 
32
 *  Software Distribution Coordinator  or  sdc@inet.no
 
33
 *  Inferno Nettverk A/S
 
34
 *  Oslo Research Park
 
35
 *  Gaustadall�en 21
 
36
 *  NO-0349 Oslo
 
37
 *  Norway
 
38
 *
 
39
 * any improvements or extensions that they make and grant Inferno Nettverk A/S
 
40
 * the rights to redistribute these changes.
 
41
 *
 
42
 */
 
43
 
 
44
/* $Id: socks.h,v 1.5 2001/10/07 12:38:35 karls Exp $ */
 
45
 
 
46
#define accept Raccept
 
47
#define bind Rbind
 
48
#define bindresvport Rbindresvport
 
49
#define connect Rconnect
 
50
#define gethostbyname Rgethostbyname
 
51
#define gethostbyname2 Rgethostbyname2
 
52
#define getpeername Rgetpeername
 
53
#define getsockname Rgetsockname
 
54
#define read Rread
 
55
#define readv Rreadv
 
56
#define recv Rrecv
 
57
#define recvfrom Rrecvfrom
 
58
#define recvfrom Rrecvfrom
 
59
#define recvmsg Rrecvmsg
 
60
#define rresvport Rrresvport
 
61
#define send Rsend
 
62
#define sendmsg Rsendmsg
 
63
#define sendto Rsendto
 
64
#define write Rwrite
 
65
#define writev Rwritev
 
66
 
 
67
int
 
68
SOCKSinit(char *progname);
 
69
/*
 
70
 * If you want to, call this function with "progname" as the name of
 
71
 * your program.  For systems that do not have __progname.
 
72
 * Returns:
 
73
 *              On success: 0.
 
74
*/
 
75
 
 
76
#undef __P
 
77
#if defined (__STDC__) || defined (_AIX) \
 
78
        || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
 
79
        || defined(WIN32) || defined(__cplusplus)
 
80
# define __P(protos) protos
 
81
#else
 
82
# define __P(protos) ()
 
83
#endif
 
84
 
 
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));
 
94
 
 
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));
 
105
 
 
106
int Rlisten __P((int, int));
 
107
int Rselect __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));