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