1 #ifndef _LINUX_SOCKET_H
2 #define _LINUX_SOCKET_H
3
4 #include <linux/sockios.h>
5
6
7 struct sockaddr {
8 unsigned short sa_family;
9 char sa_data[14];
10 };
11
12 struct linger {
13 int l_onoff;
14 int l_linger;
15 };
16
17
18 #define SOCK_STREAM 1
19 #define SOCK_DGRAM 2
20 #define SOCK_RAW 3
21 #define SOCK_RDM 4
22 #define SOCK_SEQPACKET 5
23 #define SOCK_PACKET 10
24
25
26
27
28
29
30 #define AF_UNSPEC 0
31 #define AF_UNIX 1
32 #define AF_INET 2
33 #define AF_AX25 3
34 #define AF_IPX 4
35 #define AF_APPLETALK 5
36
37 #define AF_MAX 8
38
39
40 #define PF_UNSPEC AF_UNSPEC
41 #define PF_UNIX AF_UNIX
42 #define PF_INET AF_INET
43 #define PF_AX25 AF_AX25
44 #define PF_IPX AF_IPX
45 #define PF_APPLETALK AF_APPLETALK
46
47 #define PF_MAX AF_MAX
48
49
50 #define MSG_OOB 1
51 #define MSG_PEEK 2
52 #define MSG_DONTROUTE 4
53
54
55 #define SOL_SOCKET 1
56 #define SOL_IP 0
57 #define SOL_IPX 256
58 #define SOL_AX25 257
59 #define SOL_ATALK 258
60 #define SOL_TCP 6
61 #define SOL_UDP 17
62
63
64 #define SO_DEBUG 1
65 #define SO_REUSEADDR 2
66 #define SO_TYPE 3
67 #define SO_ERROR 4
68 #define SO_DONTROUTE 5
69 #define SO_BROADCAST 6
70 #define SO_SNDBUF 7
71 #define SO_RCVBUF 8
72 #define SO_KEEPALIVE 9
73 #define SO_OOBINLINE 10
74 #define SO_NO_CHECK 11
75 #define SO_PRIORITY 12
76 #define SO_LINGER 13
77
78
79
80 #define IP_TOS 1
81 #define IPTOS_LOWDELAY 0x10
82 #define IPTOS_THROUGHPUT 0x08
83 #define IPTOS_RELIABILITY 0x04
84 #define IP_TTL 2
85 #ifdef V1_3_WILL_DO_THIS_FUNKY_STUFF
86 #define IP_HRDINCL 3
87 #define IP_OPTIONS 4
88 #endif
89
90 #define IP_MULTICAST_IF 32
91 #define IP_MULTICAST_TTL 33
92 #define IP_MULTICAST_LOOP 34
93 #define IP_ADD_MEMBERSHIP 35
94 #define IP_DROP_MEMBERSHIP 36
95
96
97
98 #define IP_DEFAULT_MULTICAST_TTL 1
99 #define IP_DEFAULT_MULTICAST_LOOP 1
100 #define IP_MAX_MEMBERSHIPS 20
101
102
103 #define IPX_TYPE 1
104
105
106 #define TCP_NODELAY 1
107 #define TCP_MAXSEG 2
108
109
110 #define SOPRI_INTERACTIVE 0
111 #define SOPRI_NORMAL 1
112 #define SOPRI_BACKGROUND 2
113
114 #endif