diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2008-12-01 16:26:20 -0600 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-12-04 22:51:54 -0800 |
commit | e0c07b868cab405ab4b5335a0247899bfc5ea0b6 (patch) | |
tree | 940c58efbe5344adb637655621c078978777c784 /net | |
parent | 23afaba65ec5206757e589ef334a8b38168c045f (diff) | |
download | u-boot-e0c07b868cab405ab4b5335a0247899bfc5ea0b6.tar.gz u-boot-e0c07b868cab405ab4b5335a0247899bfc5ea0b6.tar.bz2 u-boot-e0c07b868cab405ab4b5335a0247899bfc5ea0b6.zip |
net: Define IP flag field values
These defines were pulled from the "Add simple
IP/UDP fragmentation support" patch from Frank
Haverkamp <haver@vnet.ibm.com>.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -735,7 +735,7 @@ int PingSend(void) ip->ip_tos = 0; ip->ip_len = htons(IP_HDR_SIZE_NO_UDP + 8); ip->ip_id = htons(NetIPID++); - ip->ip_off = htons(0x4000); /* No fragmentation */ + ip->ip_off = htons(IP_FLAGS_DFRAG); /* Don't fragment */ ip->ip_ttl = 255; ip->ip_p = 0x01; /* ICMP */ ip->ip_sum = 0; @@ -1399,7 +1399,7 @@ NetReceive(volatile uchar * inpkt, int len) if ((ip->ip_hl_v & 0xf0) != 0x40) { return; } - if (ip->ip_off & htons(0x1fff)) { /* Can't deal w/ fragments */ + if (ip->ip_off & htons(IP_OFFS)) { /* Can't deal w/ fragments */ return; } /* can't deal with headers > 20 bytes */ @@ -1698,7 +1698,7 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len) ip->ip_tos = 0; ip->ip_len = htons(IP_HDR_SIZE + len); ip->ip_id = htons(NetIPID++); - ip->ip_off = htons(0x4000); /* No fragmentation */ + ip->ip_off = htons(IP_FLAGS_DFRAG); /* Don't fragment */ ip->ip_ttl = 255; ip->ip_p = 17; /* UDP */ ip->ip_sum = 0; |