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
36 #define AF_MAX 8
37
38
39 #define PF_UNSPEC AF_UNSPEC
40 #define PF_UNIX AF_UNIX
41 #define PF_INET AF_INET
42 #define PF_AX25 AF_AX25
43 #define PF_IPX AF_IPX
44
45 #define PF_MAX AF_MAX
46
47 #define MSG_OOB 1
48 #define MSG_PEEK 2
49 #define MSG_DONTROUTE 4
50
51
52 #define SOL_SOCKET 1
53 #define SOL_IP 0
54 #define SOL_IPX 256
55 #define SOL_AX25 257
56 #define SOL_TCP 6
57 #define SOL_UDP 17
58
59
60 #define SO_DEBUG 1
61 #define SO_REUSEADDR 2
62 #define SO_TYPE 3
63 #define SO_ERROR 4
64 #define SO_DONTROUTE 5
65 #define SO_BROADCAST 6
66 #define SO_SNDBUF 7
67 #define SO_RCVBUF 8
68 #define SO_KEEPALIVE 9
69 #define SO_OOBINLINE 10
70 #define SO_NO_CHECK 11
71 #define SO_PRIORITY 12
72 #define SO_LINGER 13
73
74
75 #define IP_TOS 1
76 #define IPTOS_LOWDELAY 0x10
77 #define IPTOS_THROUGHPUT 0x08
78 #define IPTOS_RELIABILITY 0x04
79 #define IP_TTL 2
80
81
82 #define IPX_TYPE 1
83
84
85 #define AX25_WINDOW 1
86
87
88 #define TCP_NODELAY 1
89 #define TCP_MAXSEG 2
90
91
92 #define SOPRI_INTERACTIVE 0
93 #define SOPRI_NORMAL 1
94 #define SOPRI_BACKGROUND 2
95
96 #endif