When the packet length is greater than the IP expected length, the padding data at the end of the frame will be trimmed.
This commit is contained in:
@@ -45,6 +45,7 @@ struct packet
|
||||
|
||||
const char *data_ptr;
|
||||
uint16_t data_len;
|
||||
uint16_t trim_len; // trim eth padding
|
||||
|
||||
void *origin_ctx; // mbuff or pcap pointer
|
||||
enum packet_action action;
|
||||
@@ -53,7 +54,8 @@ struct packet
|
||||
|
||||
// return innermost payload
|
||||
const char *packet_parse(struct packet *pkt, const char *data, uint16_t len);
|
||||
void packet_print(const struct packet *pkt);
|
||||
void packet_print_str(const struct packet *pkt);
|
||||
void packet_print_table(const struct packet *pkt);
|
||||
|
||||
// direction 1: E2I
|
||||
// direction 0: I2E
|
||||
|
||||
Reference in New Issue
Block a user