|
|
|
|
@ -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 |
|
|
|
|
|