MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pcapng_add_option

Function pcapng_add_option

dpdk/lib/pcapng/rte_pcapng.c:125–135  ·  view source on GitHub ↗

build TLV option and return location of next */

Source from the content-addressed store, hash-verified

123
124/* build TLV option and return location of next */
125static struct pcapng_option *
126pcapng_add_option(struct pcapng_option *popt, uint16_t code,
127 const void *data, uint16_t len)
128{
129 popt->code = code;
130 popt->length = len;
131 if (len > 0)
132 memcpy(popt->data, data, len);
133
134 return (struct pcapng_option *)((uint8_t *)popt + pcapng_optlen(len));
135}
136
137/*
138 * Write required initial section header describing the capture

Callers 4

pcapng_section_blockFunction · 0.85
rte_pcapng_add_interfaceFunction · 0.85
rte_pcapng_write_statsFunction · 0.85
rte_pcapng_copyFunction · 0.85

Calls 2

pcapng_optlenFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected