Browse Source

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

STABLE-2_1_x
goldsimon 19 years ago
parent
commit
2270f0d172
  1. 3
      CHANGELOG
  2. 8
      src/include/lwip/udp.h

3
CHANGELOG

@ -238,6 +238,9 @@ HISTORY
++ 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
* udp.c: Fixed bug #20253: icmp_dest_unreach was called with a wrong p->payload
for udp packets with no matching pcb.

8
src/include/lwip/udp.h

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

Loading…
Cancel
Save