51 while (n_packets >= 2)
64 ip0 = (
void *) (p0->
data + ip_header_offset);
65 ip1 = (
void *) (p1->
data + ip_header_offset);
69 ip_header_offset -
sizeof (ip0[0]));
72 ip_header_offset -
sizeof (ip1[0]));
75 while (n_packets >= 1)
86 ip0 = (
void *) (p0->
data + ip_header_offset);
90 ip_header_offset -
sizeof (ip0[0]));
109 #define _(f) pg_edit_init (&p->f, ip6_header_t, f); 119 ip_version_traffic_class_and_flow_label, 28, 4);
121 ip_version_traffic_class_and_flow_label, 20, 8);
123 ip_version_traffic_class_and_flow_label, 0, 20);
145 if (!
unformat (input,
"%U: %U -> %U",
160 else if (
unformat (input,
"traffic-class %U",
165 else if (
unformat (input,
"length %U",
170 else if (
unformat (input,
"hop-limit %U",
static void * pg_get_edit_group(pg_stream_t *s, u32 group_index)
static void pg_edit_set_fixed(pg_edit_t *e, u64 value)
pg_edit_group_t * edit_groups
void(* edit_function)(struct pg_main_t *pg, struct pg_stream_t *s, struct pg_edit_group_t *g, u32 *buffers, u32 n_buffers)
uword unformat_pg_edit(unformat_input_t *input, va_list *args)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static void ip6_pg_edit_function(pg_main_t *pg, pg_stream_t *s, pg_edit_group_t *g, u32 *packets, u32 n_packets)
static pg_edit_group_t * pg_stream_get_group(pg_stream_t *s, u32 group_index)
vl_api_ip_proto_t protocol
unformat_function_t * unformat_pg_edit
static void pg_ip6_header_init(pg_ip6_header_t *p)
uword unformat_pg_payload(unformat_input_t *input, va_list *args)
static void * pg_create_edit_group(pg_stream_t *s, int n_edit_bytes, int n_packet_bytes, u32 *group_index)
enum ip_protocol ip_protocol_t
static ip_protocol_info_t * ip_get_protocol_info(ip_main_t *im, u32 protocol)
static u64 pg_edit_get_value(pg_edit_t *e, int hi_or_lo)
#define pg_edit_init_bitfield(e, type, field, field_offset, field_n_bits)
vl_api_address_union_t src_address
static uword pg_edit_group_n_bytes(pg_stream_t *s, u32 group_index)
static void pg_free_edit_group(pg_stream_t *s)
static vlib_main_t * vlib_get_main(void)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
VLIB buffer representation.
uword unformat_pg_number(unformat_input_t *input, va_list *args)
uword unformat_pg_ip6_header(unformat_input_t *input, va_list *args)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.