53 while (n_packets >= 2)
66 ip0 = (
void *) (p0->
data + ip_header_offset);
67 ip1 = (
void *) (p1->
data + ip_header_offset);
73 while (n_packets >= 1)
84 ip0 = (
void *) (p0->
data + ip_header_offset);
104 #define _(f) pg_edit_init (&p->f, ip6_header_t, f); 114 ip_version_traffic_class_and_flow_label,
117 ip_version_traffic_class_and_flow_label,
120 ip_version_traffic_class_and_flow_label,
143 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_edit_set_fixed(pg_edit_t *e, u64 value)
pg_edit_group_t * edit_groups
uword unformat_pg_edit(unformat_input_t *input, va_list *args)
static void ip6_pg_edit_function(pg_main_t *pg, pg_stream_t *s, pg_edit_group_t *g, u32 *packets, u32 n_packets)
unformat_function_t * unformat_pg_edit
static void pg_ip6_header_init(pg_ip6_header_t *p)
always_inline pg_edit_group_t * pg_stream_get_group(pg_stream_t *s, u32 group_index)
uword unformat_pg_payload(unformat_input_t *input, va_list *args)
always_inline uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
always_inline uword pg_edit_group_n_bytes(pg_stream_t *s, u32 group_index)
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)
enum ip_protocol ip_protocol_t
always_inline void * pg_create_edit_group(pg_stream_t *s, int n_edit_bytes, int n_packet_bytes, u32 *group_index)
always_inline void * pg_get_edit_group(pg_stream_t *s, u32 group_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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_number(unformat_input_t *input, va_list *args)
uword unformat_pg_ip6_header(unformat_input_t *input, va_list *args)
always_inline void pg_free_edit_group(pg_stream_t *s)
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.