Move IP header flags from tcp.h to ip.h and rename IP_FLAGS vs TCPFLAGS. The problem fixed here is that there IP flags were not available when TCP was disabled. The IP flags are used in ICMP and IGFMP

This commit is contained in:
Gregory Nutt
2014-11-17 17:16:46 -06:00
parent fd236ee641
commit c64cb19861
5 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -112,7 +112,7 @@
/* IP fragment re-assembly */
#define IP_MF 0x20
#define IP_MF 0x20 /* See IP_FLAG_MOREFRAGS */
#define TCP_REASS_BUFSIZE (NET_DEV_MTU(dev) - NET_LL_HDRLEN(dev))
#define TCP_REASS_LASTFRAG 0x01
+2 -2
View File
@@ -136,8 +136,8 @@ void icmp_send(FAR struct net_driver_s *dev, FAR net_ipaddr_t *destaddr)
++g_ipid;
picmp->ipid[0] = g_ipid >> 8;
picmp->ipid[1] = g_ipid & 0xff;
picmp->ipoffset[0] = TCPFLAG_DONTFRAG >> 8;
picmp->ipoffset[1] = TCPFLAG_DONTFRAG & 0xff;
picmp->ipoffset[0] = IP_FLAG_DONTFRAG >> 8;
picmp->ipoffset[1] = IP_FLAG_DONTFRAG & 0xff;
picmp->ttl = IP_TTL;
picmp->proto = IP_PROTO_ICMP;
+2 -2
View File
@@ -150,8 +150,8 @@ void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group,
++g_ipid;
IGMPBUF->ipid[0] = g_ipid >> 8;
IGMPBUF->ipid[1] = g_ipid & 0xff;
IGMPBUF->ipoffset[0] = TCPFLAG_DONTFRAG >> 8;
IGMPBUF->ipoffset[1] = TCPFLAG_DONTFRAG & 0xff;
IGMPBUF->ipoffset[0] = IP_FLAG_DONTFRAG >> 8;
IGMPBUF->ipoffset[1] = IP_FLAG_DONTFRAG & 0xff;
IGMPBUF->ttl = IGMP_TTL;
IGMPBUF->proto = IP_PROTO_IGMP;