Skip to content

Commit e13d556

Browse files
committed
Packet - Add mpls field
1 parent 5dc1509 commit e13d556

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

include/ipfixprobe/packet.hpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ struct Packet : public Record {
7070
uint32_t tcp_seq;
7171
uint32_t tcp_ack;
7272

73+
/**
74+
* @brief The top level mpls
75+
*
76+
* Contents are (from MSb to LSb):
77+
* 20-bit - Label,
78+
* 3-bit - Traffic class / EXP,
79+
* 1-bit - Bottom of stack (true if last),
80+
* 8-bit - TTL (Time To Live)
81+
*/
82+
uint32_t mplsTop;
83+
7384
const uint8_t *packet; /**< Pointer to begin of packet, if available */
7485
uint16_t packet_len; /**< Length of data in packet buffer, packet_len <= packet_len_wire */
7586
uint16_t packet_len_wire; /**< Original packet length on wire */
@@ -96,7 +107,7 @@ struct Packet : public Record {
96107
ip_len(0), ip_payload_len(0), ip_version(0), ip_ttl(0),
97108
ip_proto(0), ip_tos(0), ip_flags(0), src_ip({0}), dst_ip({0}), vlan_id(0),
98109
src_port(0), dst_port(0), tcp_flags(0), tcp_window(0),
99-
tcp_options(0), tcp_mss(0), tcp_seq(0), tcp_ack(0),
110+
tcp_options(0), tcp_mss(0), tcp_seq(0), tcp_ack(0), mplsTop(0),
100111
packet(nullptr), packet_len(0), packet_len_wire(0),
101112
payload(nullptr), payload_len(0), payload_len_wire(0),
102113
custom(nullptr), custom_len(0),

0 commit comments

Comments
 (0)