diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-11-22 11:46:31 -0800 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-11-22 11:51:37 -0800 |
commit | f757db2d319ccc5f7034165046fb2bb58901afb1 (patch) | |
tree | 7dc465febb3a802d3f0e8856fcda856b13b04c0a /include/netinet | |
parent | 76c0c0ed99f74b8a5965be6e1c6a0c0e7a72513c (diff) | |
parent | b71274eebd68b7c68ab95c856f8075bdf4524cd7 (diff) |
Merge remote branch 'origin/master' into nptl_merge
Conflicts:
Rules.mak
libc/misc/sysvipc/msgq.c
test/Rules.mak
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'include/netinet')
-rw-r--r-- | include/netinet/ether.h | 4 | ||||
-rw-r--r-- | include/netinet/icmp6.h | 12 | ||||
-rw-r--r-- | include/netinet/in.h | 41 | ||||
-rw-r--r-- | include/netinet/ip6.h | 8 | ||||
-rw-r--r-- | include/netinet/protocols.h | 62 |
5 files changed, 42 insertions, 85 deletions
diff --git a/include/netinet/ether.h b/include/netinet/ether.h index 3d8902f50..5e89dfe9e 100644 --- a/include/netinet/ether.h +++ b/include/netinet/ether.h @@ -25,7 +25,9 @@ /* Get definition of `struct ether_addr'. */ #include <netinet/if_ether.h> +#ifdef _LIBC #define ETHER_FILE_NAME "/etc/ethers" +#endif __BEGIN_DECLS @@ -41,6 +43,7 @@ extern struct ether_addr *ether_aton_r (__const char *__asc, struct ether_addr *__addr) __THROW; libc_hidden_proto(ether_aton_r) +#if 0 /* Map 48 bit Ethernet number ADDR to HOSTNAME. */ extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr) __THROW; @@ -52,6 +55,7 @@ extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr) /* Scan LINE and set ADDR and HOSTNAME. */ extern int ether_line (__const char *__line, struct ether_addr *__addr, char *__hostname) __THROW; +#endif __END_DECLS diff --git a/include/netinet/icmp6.h b/include/netinet/icmp6.h index 0cb1aa6a6..225e49e07 100644 --- a/include/netinet/icmp6.h +++ b/include/netinet/icmp6.h @@ -161,11 +161,11 @@ struct nd_neighbor_advert /* neighbor advertisement */ #define nd_na_code nd_na_hdr.icmp6_code #define nd_na_cksum nd_na_hdr.icmp6_cksum #define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] -#if BYTE_ORDER == BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN #define ND_NA_FLAG_ROUTER 0x80000000 #define ND_NA_FLAG_SOLICITED 0x40000000 #define ND_NA_FLAG_OVERRIDE 0x20000000 -#else /* BYTE_ORDER == LITTLE_ENDIAN */ +#else /* __BYTE_ORDER == __LITTLE_ENDIAN */ #define ND_NA_FLAG_ROUTER 0x00000080 #define ND_NA_FLAG_SOLICITED 0x00000040 #define ND_NA_FLAG_OVERRIDE 0x00000020 @@ -299,10 +299,10 @@ struct rr_pco_use /* use prefix part */ #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10 -#if BYTE_ORDER == BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN # define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 # define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 -#elif BYTE_ORDER == LITTLE_ENDIAN +#elif __BYTE_ORDER == __LITTLE_ENDIAN # define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 # define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 #endif @@ -316,10 +316,10 @@ struct rr_result /* router renumbering result message */ struct in6_addr rrr_prefix; }; -#if BYTE_ORDER == BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN # define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 # define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 -#elif BYTE_ORDER == LITTLE_ENDIAN +#elif __BYTE_ORDER == __LITTLE_ENDIAN # define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 # define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 #endif diff --git a/include/netinet/in.h b/include/netinet/in.h index 851aace59..06965d65b 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007 +/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -53,6 +53,8 @@ enum #define IPPROTO_IDP IPPROTO_IDP IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */ #define IPPROTO_TP IPPROTO_TP + IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */ +#define IPPROTO_DCCP IPPROTO_DCCP IPPROTO_IPV6 = 41, /* IPv6 header. */ #define IPPROTO_IPV6 IPPROTO_IPV6 IPPROTO_ROUTING = 43, /* IPv6 routing header. */ @@ -83,6 +85,8 @@ enum #define IPPROTO_COMP IPPROTO_COMP IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */ #define IPPROTO_SCTP IPPROTO_SCTP + IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */ +#define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_RAW = 255, /* Raw IP packets. */ #define IPPROTO_RAW IPPROTO_RAW IPPROTO_MAX @@ -195,13 +199,17 @@ struct in6_addr { union { - uint8_t u6_addr8[16]; - uint16_t u6_addr16[8]; - uint32_t u6_addr32[4]; - } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 + uint8_t __u6_addr8[16]; +#if defined __USE_MISC || defined __USE_GNU + uint16_t __u6_addr16[8]; + uint32_t __u6_addr32[4]; +#endif + } __in6_u; +#define s6_addr __in6_u.__u6_addr8 +#if defined __USE_MISC || defined __USE_GNU +# define s6_addr16 __in6_u.__u6_addr16 +# define s6_addr32 __in6_u.__u6_addr32 +#endif }; extern const struct in6_addr in6addr_any; /* :: */ @@ -213,11 +221,8 @@ libc_hidden_proto(in6addr_loopback) #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/socket.h> - -#if 1 /* defined __UCLIBC_HAS_IPV4__ */ +#if 1 /*def __UCLIBC_HAS_IPV4__*/ /* Structure describing an Internet socket address. */ struct sockaddr_in { @@ -244,6 +249,7 @@ struct sockaddr_in6 }; +#if defined __USE_MISC || defined __USE_GNU /* IPv4 multicast request. */ struct ip_mreq { @@ -265,6 +271,8 @@ struct ip_mreq_source /* IP address of interface. */ struct in_addr imr_sourceaddr; }; +#endif + /* Likewise, for IPv6. */ struct ipv6_mreq @@ -277,6 +285,7 @@ struct ipv6_mreq }; +#if defined __USE_MISC || defined __USE_GNU /* Multicast group request. */ struct group_req { @@ -343,6 +352,7 @@ struct group_filter - sizeof (struct sockaddr_storage) \ + ((numsrc) \ * sizeof (struct sockaddr_storage))) +#endif /* Get system-specific definitions. */ @@ -432,13 +442,17 @@ libc_hidden_proto(htons) && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) +#if defined __USE_MISC || defined __USE_GNU /* Bind socket to a privileged IP port. */ extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW; libc_hidden_proto(bindresvport) +# if 0 /*def __UCLIBC_HAS_IPV6__*/ /* The IPv6 version of this function. */ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __THROW; +# endif +#endif #define IN6_IS_ADDR_MC_NODELOCAL(a) \ @@ -461,6 +475,8 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) (IN6_IS_ADDR_MULTICAST(a) \ && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) + +#if 0 /*def __USE_GNU*/ /* IPv6 packet information. */ struct in6_pktinfo { @@ -476,7 +492,6 @@ struct ip6_mtuinfo }; -#if 0 /*def __USE_GNU*/ /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; diff --git a/include/netinet/ip6.h b/include/netinet/ip6.h index bef2af2f5..c82b277e1 100644 --- a/include/netinet/ip6.h +++ b/include/netinet/ip6.h @@ -102,11 +102,11 @@ struct ip6_frag uint32_t ip6f_ident; /* identification */ }; -#if BYTE_ORDER == BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN # define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ # define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ # define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ -#else /* BYTE_ORDER == LITTLE_ENDIAN */ +#else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ # define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ # define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ @@ -176,11 +176,11 @@ struct ip6_opt_router }; /* Router alert values (in network byte order) */ -#if BYTE_ORDER == BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN # define IP6_ALERT_MLD 0x0000 # define IP6_ALERT_RSVP 0x0001 # define IP6_ALERT_AN 0x0002 -#else /* BYTE_ORDER == LITTLE_ENDING */ +#else /* __BYTE_ORDER == __LITTLE_ENDING */ # define IP6_ALERT_MLD 0x0000 # define IP6_ALERT_RSVP 0x0100 # define IP6_ALERT_AN 0x0200 diff --git a/include/netinet/protocols.h b/include/netinet/protocols.h deleted file mode 100644 index 1a619c474..000000000 --- a/include/netinet/protocols.h +++ /dev/null @@ -1,62 +0,0 @@ -/* protocols.h */ -#ifndef _NETINET_PROTOCOLS_H -#define _NETINET_PROTOCOLS_H - -#define IP_ICMP 1 -#define IP_IGMP 2 -#define IP_GGP 3 -#define IP_ST 5 -#define IP_TCP 6 -#define IP_UCL 7 -#define IP_EGP 8 -#define IP_IGP 9 -#define IP_BBN_RCC_MON 10 -#define IP_NVP_II 11 -#define IP_PUP 12 -#define IP_ARGUS 13 -#define IP_EMCON 14 -#define IP_XNET 15 -#define IP_CHAOS 16 -#define IP_UDP 17 -#define IP_MUX 18 -#define IP_DCN_MEAS 19 -#define IP_HMP 20 -#define IP_PRM 21 -#define IP_XNS_IDP 22 -#define IP_TRUNK1 23 -#define IP_TRUNK2 24 -#define IP_LEAF1 25 -#define IP_LEAF2 26 -#define IP_RDP 27 -#define IP_IRTP 28 -#define IP_ISO_TP4 29 -#define IP_NETBLT 30 -#define IP_MFE_NSP 31 -#define IP_MERIT_INP 32 -#define IP_SEP 33 -#define IP_3PC 34 -#define IP_CFTP 62 -#define SAT_EXPAK 64 -#define IP_RVD 66 -#define IP_IPPC 67 -#define IP_SAT_MON 69 -#define IP_VISA 70 -#define IP_IPCV 71 -#define IP_BR_SAT_MON 76 -#define IP_SUN_ND 77 -#define IP_WB_MON 78 -#define IP_WB_EXPAK 79 -#define IP_ISO_IP 80 -#define IP_VMTP 81 -#define IP_SECURE_VMTP 82 -#define IP_VINES 83 -#define IP_TTP 84 -#define NSFNET_IGP 85 -#define IP_DGP 86 -#define IP_TCF 87 -#define IP_IGRP 88 -#define IP_OSPFIGP 89 -#define IP_SPRITE_RPG 90 -#define IP_LARP 91 - -#endif /* _NETINET_PROTOCOLS_H*/ |