Imported Upstream version 1.0.10
[platform/upstream/lksctp-tools.git] / src / withsctp / sctp_socket.h
1 /* Preprocessor definitions for withsctp and supporting scripts.
2  *
3  * Copyright 2003 La Monte HP Yarroll <piggy@acm.org>
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  *
9  *    1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer. 
11  *    2. Redistributions in binary form must reproduce the above
12  * copyright notice, this list of conditions and the following
13  * disclaimer in the documentation and/or other materials provided with
14  * the distribution.
15  *    3. The name of the author may not be used to endorse or promote
16  * products derived from this software without specific prior written
17  * 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
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
27  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
29  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
30  * Copyright 2003 La Monte HP Yarroll <piggy@acm.org>
31  *
32  * Redistribution and use in source and binary forms, with or without
33  * modification, are permitted provided that the following conditions
34  * are met:
35  *
36  *    1. Redistributions of source code must retain the above copyright
37  * notice, this list of conditions and the following disclaimer. 
38  *    2. Redistributions in binary form must reproduce the above
39  * copyright notice, this list of conditions and the following
40  * disclaimer in the documentation and/or other materials provided with
41  * the distribution.
42  *    3. The name of the author may not be used to endorse or promote
43  * products derived from this software without specific prior written
44  * permission.
45  * 
46  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
47  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
48  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
49  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
50  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
51  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
52  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
53  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
54  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
55  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
56  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
57  */
58 #include <dlfcn.h> /* for dlopen() and company */
59 #include <sys/types.h>
60 #include <sys/socket.h>
61 #include <netinet/in.h>
62 #include <netinet/sctp.h>
63 #include <netinet/tcp.h>
64
65 extern int (*real_bind)(int  sockfd, const struct sockaddr *my_addr, socklen_t addrlen);
66 extern int (*real_socket)(int domain, int type, int protocol);
67 extern int (*real_setsockopt)(int s, int level, int optname, const void *optval,
68                               socklen_t optlen);
69 extern void _sctp_load_libs(void);