Mercurial > hg > jgplsrc
comparison defs/netdefs.sym @ 0:e0bbaa717f41 draft default tip
lol J
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Mon, 25 Nov 2013 11:56:30 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e0bbaa717f41 |
---|---|
1 <stdio.h> | |
2 #ifdef _WIN32 | |
3 <winsock.h> | |
4 #else | |
5 <stdlib.h> | |
6 <sys/socket.h> | |
7 #ifdef sun | |
8 <inet/tcp.h> | |
9 #endif | |
10 <netdb.h> | |
11 <netinet/in.h> | |
12 <arpa/inet.h> | |
13 <sys/ioctl.h> | |
14 #endif | |
15 <sys/types.h> | |
16 | |
17 | |
18 ; Networking-related definitions. | |
19 ; (Keep "strongly-POSIX-related" definitions in unixsyms.sym, though.) | |
20 ; | |
21 | |
22 i FIONBIO FIONREAD FD_SETSIZE | |
23 | |
24 #ifdef _WIN32 | |
25 i SD_RECEIVE SD_SEND SD_BOTH | |
26 #endif | |
27 | |
28 st struct sockaddr | |
29 f sa_family | |
30 f sa_data | |
31 | |
32 st struct sockaddr_in | |
33 f sin_family | |
34 f sin_port | |
35 f sin_addr | |
36 | |
37 st struct in_addr | |
38 f s_addr | |
39 | |
40 st struct hostent | |
41 f h_name | |
42 f h_aliases | |
43 f h_addrtype | |
44 f h_length | |
45 f h_addr_list | |
46 | |
47 ; Provide just a tiny tiny subset of socket ioctls: | |
48 | |
49 i SIOCATMARK | |
50 | |
51 ; The following are all "classic" Well Known Numbers as delivered | |
52 ; with BSD4.3. The official reference today would be a look at | |
53 ; the IANA lists, most notably RFC 1700. | |
54 ; All the constants should probably better _not_ be used. | |
55 ; getprotobyname etc. are they way to go. | |
56 ; | |
57 ; Having said that: | |
58 ; We will restrict ourselves only to those constants listed with | |
59 ; every netinet/in.h on any platform. | |
60 | |
61 i IPPROTO_IP IPPROTO_ICMP IPPROTO_IGMP IPPROTO_TCP | |
62 i IPPROTO_PUP IPPROTO_UDP IPPROTO_IDP | |
63 i IPPROTO_RAW IPPROTO_MAX | |
64 | |
65 ; IMP link numbers? whoa, they lost their relevance in the late 70s... | |
66 ; I doubt there's still _any_ of the (four?) IMP nodes is still running. | |
67 ; Solaris has them, Linux not. Trash these entries. | |
68 ; i IMPLINK_IP IMPLINK_LOWEXPER IMPLINK_HIGHEXPER | |
69 | |
70 i INADDR_ANY INADDR_LOOPBACK INADDR_BROADCAST | |
71 ; INADDR_NONE is referring to the (deprecated) return value of | |
72 ; the deprecated function inet_addr. The value is usually -1 | |
73 ; (even though Solaris' inet_addr() return an unsigned long...) and | |
74 ; actually clashes with the valid address INADDR_BROADCAST. Sigh... | |
75 #ifdef INADDR_NONE | |
76 i INADDR_NONE | |
77 #else | |
78 J INADDR_NONE=: _1 | |
79 #endif | |
80 | |
81 #ifndef _WIN32 | |
82 i INADDR_UNSPEC_GROUP INADDR_ALLHOSTS_GROUP INADDR_MAX_LOCAL_GROUP | |
83 i IN_LOOPBACKNET | |
84 #endif | |
85 | |
86 i SOCK_STREAM SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET | |
87 | |
88 i SOL_SOCKET | |
89 i SO_DEBUG SO_REUSEADDR SO_KEEPALIVE SO_DONTROUTE | |
90 i SO_BROADCAST SO_LINGER SO_OOBINLINE | |
91 | |
92 i SO_SNDBUF SO_RCVBUF SO_SNDLOWAT SO_RCVLOWAT SO_SNDTIMEO SO_RCVTIMEO | |
93 i SO_ERROR SO_TYPE | |
94 | |
95 st struct linger | |
96 f l_onoff | |
97 f l_linger | |
98 | |
99 ; Again, only the common subset: | |
100 i AF_UNSPEC AF_UNIX AF_INET AF_SNA AF_DECnet AF_APPLETALK AF_IPX AF_MAX | |
101 i PF_UNSPEC PF_UNIX PF_INET PF_SNA PF_DECnet PF_APPLETALK PF_IPX PF_MAX | |
102 | |
103 i SOMAXCONN | |
104 i MSG_OOB MSG_PEEK MSG_DONTROUTE | |
105 | |
106 #ifndef _WIN32 | |
107 st struct msghdr | |
108 f msg_name | |
109 f msg_namelen | |
110 f msg_iov | |
111 f msg_iovlen | |
112 #if defined(linux) || defined(Darwin) | |
113 f msg_control | |
114 f msg_controllen | |
115 f msg_flags | |
116 #else | |
117 f msg_accrights | |
118 f msg_accrightslen | |
119 #endif | |
120 #endif | |
121 | |
122 #ifdef _WIN32 | |
123 i SOCKET_ERROR | |
124 i FD_READ FD_WRITE FD_OOB FD_ACCEPT FD_CONNECT FD_CLOSE | |
125 i WSABASEERR WSAEINTR WSAEBADF WSAEACCES WSAEFAULT WSAEINVAL WSAEMFILE WSAEWOULDBLOCK | |
126 i WSAEINPROGRESS WSAEALREADY WSAENOTSOCK WSAEDESTADDRREQ WSAEMSGSIZE WSAEPROTOTYPE | |
127 i WSAENOPROTOOPT WSAEPROTONOSUPPORT WSAESOCKTNOSUPPORT WSAEOPNOTSUPP WSAEPFNOSUPPORT | |
128 i WSAEAFNOSUPPORT WSAEADDRINUSE WSAEADDRNOTAVAIL WSAENETDOWN WSAENETUNREACH | |
129 i WSAENETRESET WSAECONNABORTED WSAECONNRESET WSAENOBUFS WSAEISCONN WSAENOTCONN | |
130 i WSAESHUTDOWN WSAETOOMANYREFS WSAETIMEDOUT WSAECONNREFUSED WSAELOOP WSAENAMETOOLONG | |
131 i WSAEHOSTDOWN WSAEHOSTUNREACH WSAENOTEMPTY WSAEPROCLIM WSAEUSERS WSAEDQUOT WSAESTALE | |
132 i WSAEREMOTE WSASYSNOTREADY WSAVERNOTSUPPORTED WSANOTINITIALISED WSAHOST_NOT_FOUND | |
133 i HOST_NOT_FOUND WSATRY_AGAIN TRY_AGAIN WSANO_RECOVERY NO_RECOVERY WSANO_DATA | |
134 i NO_DATA WSANO_ADDRESS NO_ADDRESS WM_USER | |
135 #endif |