52 uword n_left = n_buffers;
67 if (b->
flags & VLIB_BUFFER_IS_TRACED)
72 sizeof (b[0]) -
sizeof (b->
pre_data));
77 if (pif->pcap_file_name != 0)
80 if (pif->pcap_file_name != 0)
83 && pif->pcap_main.n_packets_captured >=
84 pif->pcap_main.n_packets_to_capture)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
u8 runtime_data[0]
Function dependent node-runtime data.
Optimized string handling code, including c11-compliant "safe C library" variants.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define clib_memcpy_fast(a, b, c)
#define clib_atomic_test_and_set(a)
clib_error_t * pcap_close(pcap_main_t *pm)
Close PCAP file.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define clib_atomic_release(a)
clib_error_t * pcap_write(pcap_main_t *pm)
Write PCAP file.
vlib_main_t vlib_node_runtime_t * node
#define PCAP_MAIN_INIT_DONE
u8 pre_data[VLIB_BUFFER_PRE_DATA_SIZE]
Space for inserting data before buffer start.
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
uword pg_output(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define ETHERNET_MAX_PACKET_BYTES
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static void pcap_add_buffer(pcap_main_t *pm, struct vlib_main_t *vm, u32 buffer_index, u32 n_bytes_in_trace)
Add buffer (vlib_buffer_t) to the trace.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
pg_interface_t * interfaces