Fixed bug #20259: struct udp_hdr was lacking the packin defines.

This commit is contained in:
goldsimon 2007-06-26 07:32:17 +00:00
parent 1b5d3466ba
commit 2270f0d172
2 changed files with 11 additions and 0 deletions

View File

@ -238,6 +238,9 @@ HISTORY
++ Bug fixes: ++ Bug fixes:
2007-06-26 Simon Goldschmidt
* udp.h: Fixed bug #20259: struct udp_hdr was lacking the packin defines.
2007-06-25 Simon Goldschmidt 2007-06-25 Simon Goldschmidt
* udp.c: Fixed bug #20253: icmp_dest_unreach was called with a wrong p->payload * udp.c: Fixed bug #20253: icmp_dest_unreach was called with a wrong p->payload
for udp packets with no matching pcb. for udp packets with no matching pcb.

View File

@ -45,12 +45,20 @@ extern "C" {
#define UDP_HLEN 8 #define UDP_HLEN 8
/* Fields are (of course) in network byte order. */ /* Fields are (of course) in network byte order. */
#ifdef PACK_STRUCT_USE_INCLUDES
# include "arch/bpstruct.h"
#endif
PACK_STRUCT_BEGIN
struct udp_hdr { struct udp_hdr {
PACK_STRUCT_FIELD(u16_t src); PACK_STRUCT_FIELD(u16_t src);
PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */ PACK_STRUCT_FIELD(u16_t dest); /* src/dest UDP ports */
PACK_STRUCT_FIELD(u16_t len); PACK_STRUCT_FIELD(u16_t len);
PACK_STRUCT_FIELD(u16_t chksum); PACK_STRUCT_FIELD(u16_t chksum);
} PACK_STRUCT_STRUCT; } PACK_STRUCT_STRUCT;
PACK_STRUCT_END
#ifdef PACK_STRUCT_USE_INCLUDES
# include "arch/epstruct.h"
#endif
#define UDP_FLAGS_NOCHKSUM 0x01U #define UDP_FLAGS_NOCHKSUM 0x01U
#define UDP_FLAGS_UDPLITE 0x02U #define UDP_FLAGS_UDPLITE 0x02U