Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
dhcp4:(VPP-1483) linearize chained packets before handling
[vpp.git]
/
src
/
vnet
/
dhcp
/
dhcp4_packet.h
diff --git
a/src/vnet/dhcp/dhcp4_packet.h
b/src/vnet/dhcp/dhcp4_packet.h
index
9fbeb02
..
3076dd9
100644
(file)
--- a/
src/vnet/dhcp/dhcp4_packet.h
+++ b/
src/vnet/dhcp/dhcp4_packet.h
@@
-19,6
+19,17
@@
*/
#include <vnet/ip/ip4_packet.h>
*/
#include <vnet/ip/ip4_packet.h>
+typedef struct
+{
+ u8 option;
+ u8 length;
+ union
+ {
+ u8 data[0];
+ u32 data_as_u32[0];
+ };
+} __attribute__ ((packed)) dhcp_option_t;
+
typedef struct
{
u8 opcode; /* 1 = request, 2 = reply */
typedef struct
{
u8 opcode; /* 1 = request, 2 = reply */
@@
-37,20
+48,9
@@
typedef struct
u8 server_name[64];
u8 boot_filename[128];
ip4_address_t magic_cookie;
u8 server_name[64];
u8 boot_filename[128];
ip4_address_t magic_cookie;
-
u8
options[0];
+
dhcp_option_t
options[0];
} dhcp_header_t;
} dhcp_header_t;
-typedef struct
-{
- u8 option;
- u8 length;
- union
- {
- u8 data[0];
- u32 data_as_u32[0];
- };
-} __attribute__ ((packed)) dhcp_option_t;
-
typedef enum
{
DHCP_PACKET_DISCOVER = 1,
typedef enum
{
DHCP_PACKET_DISCOVER = 1,
@@
-63,6
+63,7
@@
typedef enum
typedef enum dhcp_packet_option_t_
{
DHCP_PACKET_OPTION_MSG_TYPE = 53,
typedef enum dhcp_packet_option_t_
{
DHCP_PACKET_OPTION_MSG_TYPE = 53,
+ DHCP_PACKET_OPTION_END = 0xff,
} dhcp_packet_option_t;
/* charming antique: 99.130.83.99 is the dhcp magic cookie */
} dhcp_packet_option_t;
/* charming antique: 99.130.83.99 is the dhcp magic cookie */