]> Zhao Yanbai Git Server - minix.git/commitdiff
Added {h,n}to{l,s} prototypes. Added IPPROTO_TCP. SA_FAMILY_T -> _SA_FAMILY_T
authorPhilip Homburg <philip@cs.vu.nl>
Wed, 27 Jul 2005 11:42:54 +0000 (11:42 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Wed, 27 Jul 2005 11:42:54 +0000 (11:42 +0000)
Added SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET, SO_DEBUG, SO_ERROR.

include/arpa/inet.h
include/netinet/in.h
include/sys/socket.h
include/sys/un.h

index f42508f459f87fa03b8b0e40134989c562e0c8c0..6ccfb0abc039c43afe44f063f7dcc2c444703277 100644 (file)
@@ -16,7 +16,10 @@ struct in_addr
 };
 #endif
 
-
-char *inet_ntoa(struct in_addr in);
+_PROTOTYPE( uint32_t htonl, (uint32_t _hostval)                                );
+_PROTOTYPE( uint16_t htons, (uint16_t _hostval)                                );
+_PROTOTYPE( char *inet_ntoa, (struct in_addr _in)                      );
+_PROTOTYPE( uint32_t ntohl, (uint32_t _netval)                         );
+_PROTOTYPE( uint16_t ntohs, (uint16_t _netval)                         );
 
 #endif /* _ARPA__INET_H */
index a1586e1656f3db4e0b89646bf23029c3860adb04..8f9377010aef229b3d97a360c7a67020ff2b6041 100644 (file)
@@ -28,6 +28,7 @@ typedef uint8_t               sa_family_t;
 
 /* Protocols */
 #define IPPROTO_IP     0       /* Dummy protocol */
+#define IPPROTO_TCP    6       /* TCP */
 
 /* setsockopt options at IP level */
 #define IP_ADD_MEMBERSHIP      12
index 6aaada3acbf6c5c087df39fb6ca51998652bd1da..c114f272832214b41ec306c2c5b7db1d51c85e59 100644 (file)
@@ -15,12 +15,18 @@ sys/socket.h
 
 #define SOCK_STREAM    1
 #define SOCK_DGRAM     2
+#define SOCK_RAW       3
+#define SOCK_RDM       4
+#define SOCK_SEQPACKET 5
 
 #define SOL_SOCKET     0xFFFF
 
+#define SO_DEBUG       0x0001
 #define SO_REUSEADDR   0x0004
 #define SO_KEEPALIVE   0x0008
 
+#define SO_ERROR       0x1007
+
 /* The how argument to shutdown */
 #define SHUT_RD                0       /* No further reads */
 #define SHUT_WR                1       /* No further writes */
index 5a38e3ce871d76ddcd4f702b3b8e1feafc7da269..902364f1204de81feb9c04db6b1352772357b7a6 100644 (file)
@@ -4,11 +4,11 @@ sys/un.h
 
 /* Open Group Base Specifications Issue 6 */
 
-#ifndef SA_FAMILY_T
-#define SA_FAMILY_T
+#ifndef _SA_FAMILY_T
+#define _SA_FAMILY_T
 /* Should match corresponding typedef in <sys/socket.h> */
 typedef uint8_t                sa_family_t;
-#endif /* SA_FAMILY_T */
+#endif /* _SA_FAMILY_T */
 
 struct sockaddr_un
 {