summaryrefslogtreecommitdiff
path: root/nuttx/include/netinet
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-05 17:36:13 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-02-05 17:36:13 +0000
commitd8a039ee18825d1f29e0c020ae6569453fb7bb4f (patch)
treef5b452486749985de7826e7deb82d4752deabe58 /nuttx/include/netinet
parentefb4bf7dca5d637268c6d70eec2880352047e34c (diff)
downloadnuttx-d8a039ee18825d1f29e0c020ae6569453fb7bb4f.tar.gz
nuttx-d8a039ee18825d1f29e0c020ae6569453fb7bb4f.tar.bz2
nuttx-d8a039ee18825d1f29e0c020ae6569453fb7bb4f.zip
FTPD daemon and example now build without errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4371 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/netinet')
-rw-r--r--nuttx/include/netinet/in.h53
1 files changed, 41 insertions, 12 deletions
diff --git a/nuttx/include/netinet/in.h b/nuttx/include/netinet/in.h
index 2b92bba7f..066266ab9 100644
--- a/nuttx/include/netinet/in.h
+++ b/nuttx/include/netinet/in.h
@@ -51,8 +51,36 @@
/* Values for protocol argument to socket() */
-#define IPPROTO_TCP 1
-#define IPPROTO_UDP 2
+#define IPPROTO_IP 0 /* Dummy protocol for TCP */
+#define IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options. */
+#define IPPROTO_ICMP 1 /* Internet Control Message Protocol */
+#define IPPROTO_IGMP 2 /* Internet Group Management Protocol */
+#define IPPROTO_IPIP 4 /* IPIP tunnels (older KA9Q tunnels use 94) */
+#define IPPROTO_TCP 6 /* Transmission Control Protocol */
+#define IPPROTO_EGP 8 /* Exterior Gateway Protocol */
+#define IPPROTO_PUP 12 /* PUP protocol */
+#define IPPROTO_UDP 17 /* User Datagram Protocol */
+#define IPPROTO_IDP 22 /* XNS IDP protocol */
+#define IPPROTO_TP 29 /* SO Transport Protocol Class 4. */
+#define IPPROTO_DCCP 33 /* Datagram Congestion Control Protocol */
+#define IPPROTO_IPV6 41 /* IPv6-in-IPv4 tunnelling */
+#define IPPROTO_ROUTING 43 /* IPv6 routing header. */
+#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header. */
+#define IPPROTO_RSVP 46 /* Reservation Protocol. */
+#define IPPROTO_GRE 47 /* General Routing Encapsulation. */
+#define IPPROTO_ESP 50 /* Encapsulation Security Payload protocol */
+#define IPPROTO_AH 51 /* Authentication Header protocol */
+#define IPPROTO_ICMPV6 58 /* ICMPv6 */
+#define IPPROTO_NONE 59 /* IPv6 no next header. */
+#define IPPROTO_DSTOPTS 60 /* IPv6 destination options. */
+#define IPPROTO_MTP 92 /* Multicast Transport Protocol. */
+#define IPPROTO_ENCAP 98 /* Encapsulation Header. */
+#define IPPROTO_BEETPH 94 /* IP option pseudo header for BEET */
+#define IPPROTO_PIM 103 /* Protocol Independent Multicast */
+#define IPPROTO_COMP 108 /* Compression Header protocol */
+#define IPPROTO_SCTP 132 /* Stream Control Transport Protocol */
+#define IPPROTO_UDPLITE 136 /* UDP-Lite (RFC 3828) */
+#define IPPROTO_RAW 255 /* Raw IP packets */
/* Values used with SIOCSIFMCFILTER and SIOCGIFMCFILTER ioctl's */
@@ -88,16 +116,17 @@
/* IPv4 Internet address */
typedef uint32_t in_addr_t;
+
struct in_addr
{
- in_addr_t s_addr; /* Address (network byte order) */
+ in_addr_t s_addr; /* Address (network byte order) */
};
struct sockaddr_in
{
- sa_family_t sin_family; /* Address family: AF_INET */
- uint16_t sin_port; /* Port in network byte order */
- struct in_addr sin_addr; /* Internet address */
+ sa_family_t sin_family; /* Address family: AF_INET */
+ uint16_t sin_port; /* Port in network byte order */
+ struct in_addr sin_addr; /* Internet address */
};
/* IPv6 Internet address */
@@ -106,17 +135,17 @@ struct in6_addr
{
union
{
- uint8_t u6_addr8[16];
- uint16_t u6_addr16[8];
- uint32_t u6_addr32[4];
+ uint8_t u6_addr8[16];
+ uint16_t u6_addr16[8];
+ uint32_t u6_addr32[4];
} in6_u;
};
struct sockaddr_in6
{
- sa_family_t sin_family; /* Address family: AF_INET */
- uint16_t sin_port; /* Port in network byte order */
- struct in6_addr sin6_addr; /* IPv6 internet address */
+ sa_family_t sin_family; /* Address family: AF_INET */
+ uint16_t sin_port; /* Port in network byte order */
+ struct in6_addr sin6_addr; /* IPv6 internet address */
};
/****************************************************************************