FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
flow_report_classify.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
17 #include <vnet/api_errno.h>
19 
20 /* Common prefix of tcp and udp headers
21  * containing only source and destination port fields */
22 typedef struct
23 {
26 
28 
29 u8 *
31  flow_report_t * fr,
32  ip4_address_t * collector_address,
34  u16 collector_port,
36  u32 n_elts, u32 * stream_index)
37 {
41  u32 flow_table_index = fr->opaque.as_uword;
42  u8 *ip_start;
45  tcpudp_header_t *tcpudp;
46  udp_header_t *udp;
51  ipfix_field_specifier_t *first_field;
52  u8 *rewrite = 0;
54  u32 field_count = 0;
55  u32 field_index = 0;
56  flow_report_stream_t *stream;
57  u8 ip_version;
58  u8 transport_protocol;
59  u8 *virt_mask;
60  u8 *real_mask;
61 
62  stream = &frm->streams[fr->stream_index];
63 
64  ipfix_classify_table_t *table = &fcm->tables[flow_table_index];
65 
66  ip_version = table->ip_version;
67  transport_protocol = table->transport_protocol;
68 
69  tblp = pool_elt_at_index (vcm->tables, table->classify_table_index);
70 
71  virt_mask = (u8 *) (tblp->mask - tblp->skip_n_vectors);
72  real_mask = (u8 *) (tblp->mask);
73 
74  /* Determine field count */
75  ip_start = virt_mask + sizeof (ethernet_header_t);
76 #define _(field,mask,item,length) \
77  if (((u8 *)&field >= real_mask) && (memcmp(&field, &mask, length) == 0)) \
78  { \
79  field_count++; \
80  \
81  fr->fields_to_send = clib_bitmap_set (fr->fields_to_send, \
82  field_index, 1); \
83  } \
84  field_index++;
86 #undef _
87 
88  /* Add packetTotalCount manually */
89  field_count += 1;
90 
91  /* $$$ enterprise fields, at some later date */
92 
93  /* allocate rewrite space */
94  vec_validate_aligned (rewrite,
96  + field_count * sizeof (ipfix_field_specifier_t) - 1,
98 
99  tp = (ip4_ipfix_template_packet_t *) rewrite;
100  ip = (ip4_header_t *) & tp->ip4;
101  udp = (udp_header_t *) (ip + 1);
102  h = (ipfix_message_header_t *) (udp + 1);
103  s = (ipfix_set_header_t *) (h + 1);
104  t = (ipfix_template_header_t *) (s + 1);
105  first_field = f = (ipfix_field_specifier_t *) (t + 1);
106 
107  ip->ip_version_and_header_length = 0x45;
108  ip->ttl = 254;
109  ip->protocol = IP_PROTOCOL_UDP;
110  ip->src_address.as_u32 = src_address->as_u32;
111  ip->dst_address.as_u32 = collector_address->as_u32;
112  udp->src_port = clib_host_to_net_u16 (stream->src_port);
113  udp->dst_port = clib_host_to_net_u16 (collector_port);
114  udp->length = clib_host_to_net_u16 (vec_len (rewrite) - sizeof (*ip));
115 
116  /* FIXUP: message header export_time */
117  /* FIXUP: message header sequence_number */
118  h->domain_id = clib_host_to_net_u32 (stream->domain_id);
119 
120  /* Take another trip through the mask and build the template */
121  ip_start = virt_mask + sizeof (ethernet_header_t);
122 #define _(field,mask,item,length) \
123  if (((u8 *)&field >= real_mask) && (memcmp(&field, &mask, length) == 0)) \
124  { \
125  f->e_id_length = ipfix_e_id_length (0 /* enterprise */, \
126  item, length); \
127  f++; \
128  }
130 #undef _
131 
132  /* Add packetTotalCount manually */
133  f->e_id_length =
134  ipfix_e_id_length (0 /* enterprise */ , packetTotalCount, 8);
135  f++;
136 
137  /* Back to the template packet... */
138  ip = (ip4_header_t *) & tp->ip4;
139  udp = (udp_header_t *) (ip + 1);
140 
141  ASSERT (f - first_field);
142  /* Field count in this template */
143  t->id_count = ipfix_id_count (fr->template_id, f - first_field);
144 
145  /* set length in octets */
146  s->set_id_length =
147  ipfix_set_id_length (2 /* set_id */ , (u8 *) f - (u8 *) s);
148 
149  /* message length in octets */
150  h->version_length = version_length ((u8 *) f - (u8 *) h);
151 
152  ip->length = clib_host_to_net_u16 ((u8 *) f - (u8 *) ip);
153  ip->checksum = ip4_header_checksum (ip);
154 
155  return rewrite;
156 }
157 
158 vlib_frame_t *
160  flow_report_t * fr,
161  vlib_frame_t * f, u32 * to_next, u32 node_index)
162 {
165  u32 flow_table_index = fr->opaque.as_uword;
168  vnet_classify_entry_t *v, *save_v;
169  vlib_buffer_t *b0 = 0;
170  u32 next_offset = 0;
171  u32 record_offset = 0;
172  u32 bi0 = ~0;
173  int i, j, k;
176  ipfix_set_header_t *s = 0;
177  u8 *ip_start;
178  ip4_header_t *ip;
179  ip6_header_t *ip6;
180  tcpudp_header_t *tcpudp;
181  udp_header_t *udp;
182  int field_index;
183  u32 records_this_buffer;
184  u16 new_l0, old_l0;
185  ip_csum_t sum0;
186  vlib_main_t *vm = frm->vlib_main;
187  flow_report_stream_t *stream;
188  u8 ip_version;
189  u8 transport_protocol;
190  u8 *virt_key;
191 
192  stream = &frm->streams[fr->stream_index];
193 
194  ipfix_classify_table_t *table = &fcm->tables[flow_table_index];
195 
196  ip_version = table->ip_version;
197  transport_protocol = table->transport_protocol;
198 
199  t = pool_elt_at_index (vcm->tables, table->classify_table_index);
200 
202 
203  for (i = 0; i < t->nbuckets; i++)
204  {
205  b = &t->buckets[i];
206  if (b->offset == 0)
207  continue;
208 
209  save_v = vnet_classify_get_entry (t, b->offset);
210  for (j = 0; j < (1 << b->log2_pages); j++)
211  {
212  for (k = 0; k < t->entries_per_page; k++)
213  {
215  (t, save_v, j * t->entries_per_page + k);
216 
218  continue;
219 
220  /* OK, we have something to send... */
221  if (PREDICT_FALSE (b0 == 0))
222  {
223  if (vlib_buffer_alloc (vm, &bi0, 1) != 1)
224  goto flush;
225  b0 = vlib_get_buffer (vm, bi0);
226 
227  u32 copy_len = sizeof (ip4_header_t) +
228  sizeof (udp_header_t) + sizeof (ipfix_message_header_t);
229  clib_memcpy_fast (b0->data, fr->rewrite, copy_len);
230  b0->current_data = 0;
231  b0->current_length = copy_len;
232  b0->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
233  vnet_buffer (b0)->sw_if_index[VLIB_RX] = 0;
234  vnet_buffer (b0)->sw_if_index[VLIB_TX] = frm->fib_index;
235 
236  tp = vlib_buffer_get_current (b0);
237  ip = (ip4_header_t *) & tp->ip4;
238  udp = (udp_header_t *) (ip + 1);
239  h = (ipfix_message_header_t *) (udp + 1);
240  s = (ipfix_set_header_t *) (h + 1);
241 
242  /* FIXUP: message header export_time */
243  h->export_time = (u32)
244  (((f64) frm->unix_time_0) +
245  (vlib_time_now (frm->vlib_main) - frm->vlib_time_0));
246  h->export_time = clib_host_to_net_u32 (h->export_time);
247 
248  /* FIXUP: message header sequence_number */
249  h->sequence_number = stream->sequence_number;
250  h->sequence_number =
251  clib_host_to_net_u32 (h->sequence_number);
252 
253  next_offset = (u32) (((u8 *) (s + 1)) - (u8 *) tp);
254  record_offset = next_offset;
255  records_this_buffer = 0;
256  }
257 
258  field_index = 0;
259  virt_key = (u8 *) (v->key - t->skip_n_vectors);
260  ip_start = virt_key + sizeof (ethernet_header_t);
261 #define _(field,mask,item,length) \
262  if (clib_bitmap_get (fr->fields_to_send, field_index)) \
263  { \
264  clib_memcpy_fast (b0->data + next_offset, &field, \
265  length); \
266  next_offset += length; \
267  } \
268  field_index++;
270 #undef _
271 
272  /* Add packetTotalCount manually */
273  {
274  u64 packets = clib_host_to_net_u64 (v->hits);
275  clib_memcpy_fast (b0->data + next_offset, &packets,
276  sizeof (packets));
277  next_offset += sizeof (packets);
278  }
279  records_this_buffer++;
280  stream->sequence_number++;
281 
282  /* Next record will have the same size as this record */
283  u32 next_record_size = next_offset - record_offset;
284  record_offset = next_offset;
285 
286  if (next_offset + next_record_size > frm->path_mtu)
287  {
289  next_offset -
290  (sizeof (*ip) +
291  sizeof (*udp) +
292  sizeof (*h)));
293  h->version_length =
294  version_length (next_offset -
295  (sizeof (*ip) + sizeof (*udp)));
296  b0->current_length = next_offset;
297  b0->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
298 
299  tp = vlib_buffer_get_current (b0);
300  ip = (ip4_header_t *) & tp->ip4;
301  udp = (udp_header_t *) (ip + 1);
302 
303  sum0 = ip->checksum;
304  old_l0 = ip->length;
305  new_l0 = clib_host_to_net_u16 ((u16) next_offset);
306 
307  sum0 = ip_csum_update (sum0, old_l0, new_l0, ip4_header_t,
308  length /* changed member */ );
309 
310  ip->checksum = ip_csum_fold (sum0);
311  ip->length = new_l0;
312  udp->length =
313  clib_host_to_net_u16 (b0->current_length - sizeof (*ip));
314 
315  if (frm->udp_checksum)
316  {
317  /* RFC 7011 section 10.3.2. */
318  udp->checksum =
319  ip4_tcp_udp_compute_checksum (vm, b0, ip);
320  if (udp->checksum == 0)
321  udp->checksum = 0xffff;
322  }
323 
324  ASSERT (ip->checksum == ip4_header_checksum (ip));
325 
326  to_next[0] = bi0;
327  f->n_vectors++;
328  to_next++;
329 
330  if (f->n_vectors == VLIB_FRAME_SIZE)
331  {
332  vlib_put_frame_to_node (vm, node_index, f);
333  f = vlib_get_frame_to_node (vm, node_index);
334  f->n_vectors = 0;
335  to_next = vlib_frame_vector_args (f);
336  }
337  b0 = 0;
338  bi0 = ~0;
339  }
340  }
341  }
342  }
343 
344 flush:
345  if (b0)
346  {
348  next_offset -
349  (sizeof (*ip) + sizeof (*udp) +
350  sizeof (*h)));
351  h->version_length = version_length (next_offset -
352  (sizeof (*ip) + sizeof (*udp)));
353  b0->current_length = next_offset;
354  b0->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
355 
356  tp = vlib_buffer_get_current (b0);
357  ip = (ip4_header_t *) & tp->ip4;
358  udp = (udp_header_t *) (ip + 1);
359 
360  sum0 = ip->checksum;
361  old_l0 = ip->length;
362  new_l0 = clib_host_to_net_u16 ((u16) next_offset);
363 
364  sum0 = ip_csum_update (sum0, old_l0, new_l0, ip4_header_t,
365  length /* changed member */ );
366 
367  ip->checksum = ip_csum_fold (sum0);
368  ip->length = new_l0;
369  udp->length = clib_host_to_net_u16 (b0->current_length - sizeof (*ip));
370 
371  if (frm->udp_checksum)
372  {
373  /* RFC 7011 section 10.3.2. */
374  udp->checksum = ip4_tcp_udp_compute_checksum (vm, b0, ip);
375  if (udp->checksum == 0)
376  udp->checksum = 0xffff;
377  }
378 
379  ASSERT (ip->checksum == ip4_header_checksum (ip));
380 
381  to_next[0] = bi0;
382  f->n_vectors++;
383 
384  b0 = 0;
385  bi0 = ~0;
386  }
387 
389  return f;
390 }
391 
392 static clib_error_t *
394  unformat_input_t * input,
395  vlib_cli_command_t * cmd)
396 {
400  ipfix_classify_table_t *table;
401  int rv;
402  int is_add = -1;
404  u8 ip_version = 0;
405  u8 transport_protocol = 255;
406  clib_error_t *error = 0;
407 
408  if (fcm->src_port == 0)
409  clib_error_return (0, "call 'set ipfix classify stream' first");
410 
411  clib_memset (&args, 0, sizeof (args));
412 
414  {
415  if (unformat (input, "add"))
416  is_add = 1;
417  else if (unformat (input, "del"))
418  is_add = 0;
419  else if (unformat (input, "%d", &classify_table_index))
420  ;
421  else if (unformat (input, "ip4"))
422  ip_version = 4;
423  else if (unformat (input, "ip6"))
424  ip_version = 6;
425  else if (unformat (input, "tcp"))
426  transport_protocol = 6;
427  else if (unformat (input, "udp"))
428  transport_protocol = 17;
429  else
430  return clib_error_return (0, "unknown input `%U'",
431  format_unformat_error, input);
432  }
433 
434  if (is_add == -1)
435  return clib_error_return (0, "expecting: add|del");
436  if (classify_table_index == ~0)
437  return clib_error_return (0, "classifier table not specified");
438  if (ip_version == 0)
439  return clib_error_return (0, "IP version not specified");
440 
441  table = 0;
442  int i;
443  for (i = 0; i < vec_len (fcm->tables); i++)
445  if (fcm->tables[i].classify_table_index == classify_table_index)
446  {
447  table = &fcm->tables[i];
448  break;
449  }
450 
451  if (is_add)
452  {
453  if (table)
454  return clib_error_return (0,
455  "Specified classifier table already used");
456  table = ipfix_classify_add_table ();
458  }
459  else
460  {
461  if (!table)
462  return clib_error_return (0,
463  "Specified classifier table not registered");
464  }
465 
466  table->ip_version = ip_version;
467  table->transport_protocol = transport_protocol;
468 
469  args.opaque.as_uword = table - fcm->tables;
472  args.is_add = is_add;
473  args.domain_id = fcm->domain_id;
474  args.src_port = fcm->src_port;
475 
476  rv = vnet_flow_report_add_del (frm, &args, NULL);
477 
479 
480  /* If deleting, or add failed */
481  if (is_add == 0 || (rv && is_add))
482  ipfix_classify_delete_table (table - fcm->tables);
483 
484  return error;
485 }
486 
487 /* *INDENT-OFF* */
488 VLIB_CLI_COMMAND (ipfix_classify_table_add_del_command, static) = {
489  .path = "ipfix classify table",
490  .short_help = "ipfix classify table add|del <table-index>",
492 };
493 /* *INDENT-ON* */
494 
495 static clib_error_t *
497  unformat_input_t * input,
498  vlib_cli_command_t * cmd)
499 {
502  u32 domain_id = 1;
503  u32 src_port = UDP_DST_PORT_ipfix;
504 
506  {
507  if (unformat (input, "domain %d", &domain_id))
508  ;
509  else if (unformat (input, "src-port %d", &src_port))
510  ;
511  else
512  return clib_error_return (0, "unknown input `%U'",
513  format_unformat_error, input);
514  }
515 
516  if (fcm->src_port != 0 &&
517  (fcm->domain_id != domain_id || fcm->src_port != (u16) src_port))
518  {
519  int rv = vnet_stream_change (frm, fcm->domain_id, fcm->src_port,
520  domain_id, (u16) src_port);
521  ASSERT (rv == 0);
522  }
523 
524  fcm->domain_id = domain_id;
525  fcm->src_port = (u16) src_port;
526 
527  return 0;
528 }
529 
530 /* *INDENT-OFF* */
531 VLIB_CLI_COMMAND (set_ipfix_classify_stream_command, static) = {
532  .path = "set ipfix classify stream",
533  .short_help = "set ipfix classify stream"
534  "[domain <domain-id>] [src-port <src-port>]",
536 };
537 /* *INDENT-ON* */
538 
539 static clib_error_t *
541 {
542  clib_error_t *error;
543 
544  if ((error = vlib_call_init_function (vm, flow_report_init)))
545  return error;
546 
547  return 0;
548 }
549 
551 
552 /*
553  * fd.io coding-style-patch-verification: ON
554  *
555  * Local Variables:
556  * eval: (c-set-style "gnu")
557  * End:
558  */
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:124
clib_error_t * flow_report_add_del_error_to_clib_error(int error)
Definition: flow_report.c:414
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
Definition: lock.h:102
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
Definition: lock.h:80
ip4_address_t src_address
Definition: ip4_packet.h:170
static_always_inline void ipfix_classify_delete_table(u32 index)
uword as_uword
Definition: flow_report.h:74
static_always_inline u8 ipfix_classify_table_index_valid(u32 index)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
Definition: buffer.h:110
unsigned long u64
Definition: types.h:89
#define clib_memcpy_fast(a, b, c)
Definition: string.h:81
static u32 ipfix_e_id_length(int e, u16 id, u16 length)
Definition: ipfix_packet.h:77
#define NULL
Definition: clib.h:58
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:279
u32 stream_index
Definition: flow_report.h:91
int vnet_flow_report_add_del(flow_report_main_t *frm, vnet_flow_report_add_del_args_t *a, u16 *template_id)
Definition: flow_report.c:334
u16 current_length
Nbytes between current data and the end of this buffer.
Definition: buffer.h:113
u8 data[0]
Packet data.
Definition: buffer.h:181
opaque_t opaque
Definition: flow_report.h:99
int i
uword ip_csum_t
Definition: ip_packet.h:244
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
Definition: vec.h:451
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
u16 src_port
Definition: udp.api:41
flow_report_stream_t * streams
Definition: flow_report.h:114
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:173
clib_spinlock_t writer_lock
ip4_address_t dst_address
Definition: ip4_packet.h:170
vnet_flow_rewrite_callback_t * rewrite_callback
Definition: flow_report.h:149
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
Definition: main.c:185
#define clib_error_return(e, args...)
Definition: error.h:99
unsigned int u32
Definition: types.h:88
#define vlib_call_init_function(vm, x)
Definition: init.h:270
#define VLIB_FRAME_SIZE
Definition: node.h:378
static int vnet_classify_entry_is_free(vnet_classify_entry_t *e)
flow_report_main_t flow_report_main
Definition: flow_report.c:21
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:519
flow_report_classify_main_t flow_report_classify_main
u8 * rewrite
Definition: flow_report.h:89
struct _unformat_input_t unformat_input_t
unsigned short u16
Definition: types.h:57
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
Definition: main.c:194
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:229
#define PREDICT_FALSE(x)
Definition: clib.h:111
vl_api_address_union_t src_address
Definition: ip_types.api:98
static u32 version_length(u16 length)
Definition: ipfix_packet.h:33
static vnet_classify_entry_t * vnet_classify_entry_at_index(vnet_classify_table_t *t, vnet_classify_entry_t *e, u32 index)
vlib_main_t * vm
Definition: in2out_ed.c:1810
u32 classify_table_index
Definition: fib_types.api:68
u8 ip6[16]
Definition: one.api:477
ipfix_classify_table_t * tables
#define UNFORMAT_END_OF_INPUT
Definition: format.h:145
u16 n_vectors
Definition: node.h:397
static u32 ipfix_id_count(u16 id, u16 count)
Definition: ipfix_packet.h:184
static clib_error_t * ipfix_classify_table_add_del_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static_always_inline ipfix_classify_table_t * ipfix_classify_add_table(void)
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:152
struct _vnet_classify_main vnet_classify_main_t
Definition: vnet_classify.h:55
#define ASSERT(truth)
static clib_error_t * set_ipfix_classify_stream_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_main_t * vlib_main
Definition: flow_report.h:136
u16 ip4_tcp_udp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
Definition: ip4_forward.c:1302
u16 template_id
Definition: flow_report.h:90
vnet_classify_main_t vnet_classify_main
Definition: vnet_classify.c:29
#define foreach_ipfix_field
static u32 ipfix_set_id_length(u16 set_id, u16 length)
Definition: ipfix_packet.h:121
Definition: defs.h:47
vl_api_address_t ip
Definition: l2.api:490
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_classify_bucket_t * buckets
int vnet_stream_change(flow_report_main_t *frm, u32 old_domain_id, u16 old_src_port, u32 new_domain_id, u16 new_src_port)
Definition: flow_report.c:467
VLIB buffer representation.
Definition: buffer.h:102
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:244
#define ip_csum_update(sum, old, new, type, field)
Definition: ip_packet.h:294
vnet_flow_data_callback_t * flow_data_callback
Definition: flow_report.h:148
#define vnet_buffer(b)
Definition: buffer.h:408
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
u16 dst_port
Definition: udp.api:42
static clib_error_t * flow_report_classify_init(vlib_main_t *vm)
u8 ip_version_and_header_length
Definition: ip4_packet.h:138
#define CLIB_CACHE_LINE_BYTES
Definition: cache.h:59
static u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
Definition: buffer_funcs.h:630
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:85
static u16 ip4_header_checksum(ip4_header_t *i)
Definition: ip4_packet.h:247
vlib_frame_t * ipfix_classify_send_flows(flow_report_main_t *frm, flow_report_t *fr, vlib_frame_t *f, u32 *to_next, u32 node_index)
static clib_error_t * flow_report_init(vlib_main_t *vm)
Definition: flow_report.c:597
static u16 ip_csum_fold(ip_csum_t c)
Definition: ip_packet.h:300
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
Definition: defs.h:46
static vnet_classify_entry_t * vnet_classify_get_entry(vnet_classify_table_t *t, uword offset)
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:171
u8 * ipfix_classify_template_rewrite(flow_report_main_t *frm, flow_report_t *fr, ip4_address_t *collector_address, ip4_address_t *src_address, u16 collector_port, ipfix_report_element_t *elts, u32 n_elts, u32 *stream_index)