tcpdump mailing list archives
Re: Request for a new LINKTYPE_/DLT_ type.
From: Guy Harris <gharris () sonic net>
Date: Mon, 26 Nov 2018 18:04:32 -0800
On Nov 26, 2018, at 12:43 PM, Dave Barach (dbarach) <dbarach () cisco com> wrote:
On November 26, 2018, at 3:01 PM, Guy Harris <guy () alum mit edu> wrote:So which of those structures describes the primary metadata?vlib_buffer_t. The key fields are flags, current_data, and current_length.
So that's:
/* VLIB buffer representation. */ typedef struct { /* Offset within data[] that we are currently processing. If negative current header points into predata area. */ i16 current_data; /**< signed offset in data[], pre_data[] that we are currently processing. If negative current header points into predata area. */ u16 current_length; /**< Nbytes between current data and the end of this buffer. */ u32 flags; /**< buffer flags */ u32 flow_id; /**< Generic flow identifier */ u32 next_buffer; /**< Next buffer for this linked-list of buffers. Only valid if VLIB_BUFFER_NEXT_PRESENT flag is set. */ u32 current_config_index; /**< Used by feature subgraph arcs to visit enabled feature nodes */ u16 error; /**< Error code for buffers to be enqueued to error handler. */ u8 n_add_refs; /**< Number of additional references to this buffer. */ u8 buffer_pool_index; /**< index of buffer pool this buffer belongs. */ u32 opaque[10]; /**< Opaque data used by sub-graphs for their own purposes. See above */ u32 trace_index; /**< Specifies index into trace buffer if VLIB_PACKET_IS_TRACED flag is set. */ u32 recycle_count; /**< Used by L2 path recycle code */ u32 total_length_not_including_first_buffer; /**< Only valid for first buffer in chain. Current length plus total length given here give total number of bytes in buffer chain. */ u8 free_list_index; /** < only used if VLIB_BUFFER_NON_DEFAULT_FREELIST flag is set */ u8 align_pad[3]; /**< available */ u32 opaque2[12]; /**< More opaque data, see ../vnet/vnet/buffer.h */ /***** end of second cache line */ u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE]; /**< Space for inserting data before buffer start. Packet rewrite string will be rewritten backwards and may extend back before buffer->data[0]. Must come directly before packet data. */ u8 data[0]; /**< Packet data. Hardware DMA here */ } vlib_buffer_t; /* Must be a multiple of 64B. */
which is 128 bytes followed by VLIB_BUFFER_PRE_DATA_SIZE bytes of data. Which of those 64 of those 128 bytes are the primary metadata? _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 26)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 26)
- Message not available
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 26)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 26)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 26)
- Message not available
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 27)
- Message not available
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 27)
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 27)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 27)
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 28)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Nov 28)
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 28)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Dec 24)
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Nov 26)
- Re: Request for a new LINKTYPE_/DLT_ type. Guy Harris (Dec 24)
- Re: Request for a new LINKTYPE_/DLT_ type. Dave Barach (dbarach) (Dec 29)