FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
dhcp6_client_common_dp.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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  */
15 
16 #include <vnet/ethernet/ethernet.h>
17 #include <dhcp/dhcp6_packet.h>
21 #include <dhcp/dhcp6_packet.h>
22 #include <vnet/udp/udp_local.h>
23 #include <vnet/udp/udp_packet.h>
24 
27 
28 u32
30 {
32  u32 i;
33  server_id_t *se;
34  server_id_t new_se;
35 
36  for (i = 0; i < vec_len (ccm->server_ids); i++)
37  {
38  se = &ccm->server_ids[i];
39  if (se->len == len && 0 == memcmp (se->data, data, len))
40  return i;
41  }
42 
43  new_se.len = len;
44  new_se.data = 0;
45  vec_validate (new_se.data, len - 1);
46  memcpy (new_se.data, data, len);
47 
48  vec_add1 (ccm->server_ids, new_se);
49 
50  return vec_len (ccm->server_ids) - 1;
51 }
52 
53 static void
55 {
56  client_duid.duid_type = clib_host_to_net_u16 (DHCPV6_DUID_LL);
57  client_duid.hardware_type = clib_host_to_net_u16 (1);
58 
59  vnet_main_t *vnm = vnet_get_main ();
62  ethernet_interface_t *eth_if = 0;
63 
64  /* *INDENT-OFF* */
66  {
67  eth_if = ethernet_get_interface (&ethernet_main, hi->hw_if_index);
68  if (eth_if)
69  break;
70  }
71  /* *INDENT-ON* */
72 
73  if (eth_if)
74  clib_memcpy (client_duid.lla, &eth_if->address, 6);
75  else
76  {
77  clib_warning ("Failed to find any Ethernet interface, "
78  "setting DHCPv6 DUID link-layer address to random value");
79  u32 seed = random_default_seed ();
80  random_u32 (&seed);
81  client_duid.lla[0] = 0xc2; /* locally administered unicast */
82  client_duid.lla[1] = 0x18;
83  client_duid.lla[2] = 0x44;
84  client_duid.lla[3] = random_u32 (&seed);
85  client_duid.lla[4] = random_u32 (&seed);
86  client_duid.lla[5] = random_u32 (&seed);
87  }
88 }
89 
90 #define foreach_dhcpv6_client \
91  _(DROP, "error-drop") \
92  _(LOOKUP, "ip6-lookup")
93 
94 typedef enum
95 {
96 #define _(sym,str) DHCPV6_CLIENT_NEXT_##sym,
98 #undef _
101 
102 /**
103  * per-packet trace data
104  */
106 {
108 
109 static u8 *
110 format_dhcpv6_client_trace (u8 * s, va_list * args)
111 {
112  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
113  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
114  //dhcpv6_client_trace_t *t = va_arg (*args, dhcpv6_client_trace_t *);
115 
116  s = format (s, "nothing");
117 
118  return s;
119 }
120 
121 static uword
124 {
127 
129  u32 n_left_from, *from, *to_next;
130  next_index = 0;
131  n_left_from = frame->n_vectors;
133 
134  while (n_left_from > 0)
135  {
136  u32 n_left_to_next;
137 
138  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
139 
140  while (n_left_from > 0 && n_left_to_next > 0)
141  {
142  ip6_header_t *ip0;
143  u32 options_length;
144  dhcpv6_header_t *dhcpv60;
145  dhcpv6_option_t *option;
146  vlib_buffer_t *b0;
147  dhcp6_report_common_t report;
148  dhcp6_address_info_t *addresses = 0;
149  dhcp6_prefix_info_t *prefixes = 0;
150  u32 next0 = DHCPV6_CLIENT_NEXT_DROP;
151  u32 bi0;
152  u32 xid;
154  u32 iaid;
155  u8 client_id_present = 0;
156  u8 discard = 0;
157  u8 is_pd_packet = 0;
158 
159  dhcp6_ia_na_client_state_t *ia_na_client_state = NULL;
160  dhcp6_pd_client_state_t *pd_client_state = NULL;
161 
162  bi0 = from[0];
163  to_next[0] = bi0;
164  from += 1;
165  to_next += 1;
166  n_left_from -= 1;
167  n_left_to_next -= 1;
168 
169  b0 = vlib_get_buffer (vm, bi0);
170 
171  dhcpv60 = vlib_buffer_get_current (b0);
172  ip0 = (void *) (b0->data + vnet_buffer (b0)->l3_hdr_offset);
173  u32 dhcpv6_ip6_payload_offset =
174  (u8 *) dhcpv60 - ((u8 *) ip0 + sizeof (*ip0));
175  options_length =
176  clib_net_to_host_u16 (ip0->payload_length) -
177  dhcpv6_ip6_payload_offset - sizeof (*dhcpv60);
178 
179  clib_memset (&report, 0, sizeof (report));
180 
181  sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_RX];
183  ia_na_client_state = 0;
184  else
185  ia_na_client_state =
188  pd_client_state = 0;
189  else
190  pd_client_state = &pcm->client_state_by_sw_if_index[sw_if_index];
191 
192  xid =
193  (dhcpv60->xid[0] << 16) + (dhcpv60->xid[1] << 8) +
194  dhcpv60->xid[2];
195  if (ia_na_client_state && ia_na_client_state->transaction_id == xid)
196  is_pd_packet = 0;
197  else if (pd_client_state && pd_client_state->transaction_id == xid)
198  is_pd_packet = 1;
199  else
200  {
202  ("Received DHCPv6 message with wrong Transaction ID");
203  discard = 1;
204  }
205 
206  report.sw_if_index = sw_if_index;
207  report.msg_type = dhcpv60->msg_type;
208  report.server_index = ~0;
209 
210  switch (dhcpv60->msg_type)
211  {
213  case DHCPV6_MSG_REPLY:
214  option = (dhcpv6_option_t *) (dhcpv60 + 1);
215  while (options_length > 0)
216  {
217  if (options_length <
218  clib_net_to_host_u16 (option->length) +
219  sizeof (*option))
220  {
222  ("remaining payload length < option length (%d < %d)",
223  options_length,
224  clib_net_to_host_u16 (option->length) +
225  sizeof (*option));
226  break;
227  }
228  u16 oo = clib_net_to_host_u16 (option->option);
229  if (oo == DHCPV6_OPTION_IA_NA || oo == DHCPV6_OPTION_IA_PD)
230  {
231  u8 discard_option = 0;
232  dhcpv6_ia_header_t *ia_header = (void *) option;
233  iaid = clib_net_to_host_u32 (ia_header->iaid);
234  u32 T1 = clib_net_to_host_u32 (ia_header->t1);
235  u32 T2 = clib_net_to_host_u32 (ia_header->t2);
236  if (iaid != DHCPV6_CLIENT_IAID)
237  discard_option = 1;
238  if (T1 != 0 && T2 != 0 && T1 > T2)
239  discard_option = 1;
240  if (!discard_option)
241  {
242  report.T1 = T1;
243  report.T2 = T2;
244  }
245  dhcpv6_option_t *inner_option =
246  (void *) ia_header->data;
247  u16 inner_options_length =
248  clib_net_to_host_u16 (option->length) -
249  (sizeof (*ia_header) - sizeof (dhcpv6_option_t));
250  while (inner_options_length > 0)
251  {
252  u16 inner_oo =
253  clib_net_to_host_u16 (inner_option->option);
254  if (discard_option)
255  ;
256  else if (inner_oo == DHCPV6_OPTION_IAADDR)
257  {
258  dhcpv6_ia_opt_addr_t *iaaddr =
259  (void *) inner_option;
260  u32 n_addresses = vec_len (addresses);
261  vec_validate (addresses, n_addresses);
262  dhcp6_address_info_t *address_info =
263  &addresses[n_addresses];
264  address_info->preferred_time =
265  clib_net_to_host_u32 (iaaddr->preferred);
266  address_info->valid_time =
267  clib_net_to_host_u32 (iaaddr->valid);
268  address_info->address = iaaddr->addr;
269  }
270  else if (inner_oo == DHCPV6_OPTION_IAPREFIX)
271  {
272  dhcpv6_ia_opt_pd_t *iaprefix =
273  (void *) inner_option;
274  u32 n_prefixes = vec_len (prefixes);
275  vec_validate (prefixes, n_prefixes);
276  dhcp6_prefix_info_t *prefix_info =
277  &prefixes[n_prefixes];
278  prefix_info->preferred_time =
279  clib_net_to_host_u32 (iaprefix->preferred);
280  prefix_info->valid_time =
281  clib_net_to_host_u32 (iaprefix->valid);
282  prefix_info->prefix_length = iaprefix->prefix;
283  prefix_info->prefix = iaprefix->addr;
284  }
285  else if (inner_oo == DHCPV6_OPTION_STATUS_CODE)
286  {
287  dhcpv6_status_code_t *sc =
288  (void *) inner_option;
289  report.inner_status_code =
290  clib_net_to_host_u16 (sc->status_code);
291  }
292  inner_options_length -=
293  sizeof (*inner_option) +
294  clib_net_to_host_u16 (inner_option->length);
295  inner_option =
296  (void *) ((u8 *) inner_option +
297  sizeof (*inner_option) +
298  clib_net_to_host_u16
299  (inner_option->length));
300  }
301  }
302  else if (oo == DHCPV6_OPTION_CLIENTID)
303  {
304  if (client_id_present)
305  {
307  ("Duplicate Client ID in received DHVPv6 message");
308  discard = 1;
309  }
310  else
311  {
312  u16 len = clib_net_to_host_u16 (option->length);
313  client_id_present = 1;
314  if (len != CLIENT_DUID_LENGTH ||
315  0 != memcmp (option->data,
318  {
320  ("Unrecognized client DUID inside received DHVPv6 message");
321  discard = 1;
322  }
323  }
324  }
325  else if (oo == DHCPV6_OPTION_SERVERID)
326  {
327  if (report.server_index != ~0)
328  {
330  ("Duplicate Server ID in received DHVPv6 message");
331  discard = 1;
332  }
333  else
334  {
335  u16 ol = clib_net_to_host_u16 (option->length);
336  if (ol - 2 /* 2 byte DUID type code */ > 128)
337  {
339  ("Server DUID (without type code) is longer than 128 octets");
340  discard = 1;
341  }
342  else
343  {
344  report.server_index =
345  server_index_get_or_create (option->data, ol);
346  }
347  }
348  }
349  else if (oo == DHCPV6_OPTION_PREFERENCE)
350  {
351  report.preference = option->data[0];
352  }
353  else if (oo == DHCPV6_OPTION_STATUS_CODE)
354  {
355  dhcpv6_status_code_t *sc = (void *) option;
356  report.status_code =
357  clib_net_to_host_u16 (sc->status_code);
358  }
359  options_length -=
360  sizeof (*option) + clib_net_to_host_u16 (option->length);
361  option =
362  (void *) ((u8 *) option + sizeof (*option) +
363  clib_net_to_host_u16 (option->length));
364  }
365 
366  if (!client_id_present)
367  {
369  ("Missing Client ID in received DHVPv6 message");
370  discard = 1;
371  }
372  if (report.server_index == ~0)
373  {
375  ("Missing Server ID in received DHVPv6 message");
376  discard = 1;
377  }
378 
379  if (!discard)
380  {
381  if (!is_pd_packet)
382  {
384  r.body = report;
385  r.n_addresses = vec_len (addresses);
386  r.addresses = addresses;
388  /* We just gave addresses to another process! */
389  addresses = 0;
390  }
391  else
392  {
394  r.body = report;
395  r.n_prefixes = vec_len (prefixes);
396  r.prefixes = prefixes;
398  /* We just gave prefixes to another process! */
399  prefixes = 0;
400  }
401  }
402  vec_free (addresses);
403  vec_free (prefixes);
404 
405  break;
406  default:
407  break;
408  }
409 
410  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
411  {
413  vlib_add_trace (vm, node, b0, sizeof (*t));
414  }
415 
416  /* verify speculative enqueue, maybe switch current next frame */
418  to_next, n_left_to_next,
419  bi0, next0);
420  }
421 
422  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
423  }
424 
425  return frame->n_vectors;
426 }
427 
428 /* *INDENT-OFF* */
430  .function = dhcpv6_client_node_fn,
431  .name = "dhcpv6-client",
432  .vector_size = sizeof (u32),
433 
434  .n_errors = 0,
435 
436  .n_next_nodes = DHCPV6_CLIENT_N_NEXT,
437  .next_nodes = {
438  #define _(s,n) [DHCPV6_CLIENT_NEXT_##s] = n,
440  #undef _
441  },
442 
443  .format_trace = format_dhcpv6_client_trace,
444 };
445 /* *INDENT-ON* */
446 
447 void
449 {
451 
452  if (enable)
453  {
454  if (client_duid.duid_type == 0)
456  udp_register_dst_port (vm, UDP_DST_PORT_dhcpv6_to_client,
457  dhcpv6_client_node.index, 0 /* is_ip6 */ );
458  }
459  else
460  udp_unregister_dst_port (vm, UDP_DST_PORT_dhcpv6_to_client,
461  0 /* is_ip6 */ );
462 }
463 
464 /*
465  * fd.io coding-style-patch-verification: ON
466  *
467  * Local Variables:
468  * eval: (c-set-style "gnu")
469  * End:
470  */
dhcp6_report_common_t::T1
u32 T1
Definition: dhcp6_client_common_dp.h:27
dhcp6_report_common_t::status_code
u16 status_code
Definition: dhcp6_client_common_dp.h:30
im
vnet_interface_main_t * im
Definition: interface_output.c:415
dhcp6_pd_client_main_t::client_state_by_sw_if_index
dhcp6_pd_client_state_t * client_state_by_sw_if_index
Definition: dhcp6_pd_client_dp.h:62
dhcpv6_client_next_t
dhcpv6_client_next_t
Definition: dhcp6_client_common_dp.c:94
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
clib_memcpy
#define clib_memcpy(d, s, n)
Definition: string.h:197
next_index
nat44_ei_hairpin_src_next_t next_index
Definition: nat44_ei_hairpinning.c:412
dhcpv6_client_node_fn
static uword dhcpv6_client_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: dhcp6_client_common_dp.c:122
vlib_get_buffer
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:111
dhcp6_prefix_info_t::valid_time
u32 valid_time
Definition: dhcp6_pd_client_dp.h:80
dhcp6_ia_na_client_state_t::transaction_id
u32 transaction_id
Definition: dhcp6_ia_na_client_dp.h:54
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
DHCPV6_CLIENT_N_NEXT
@ DHCPV6_CLIENT_N_NEXT
Definition: dhcp6_client_common_dp.c:99
prefix_report_t
Definition: dhcp6_pd_client_dp.h:85
dhcpv6_hdr_::xid
u8 xid[3]
Definition: dhcp6_packet.h:118
server_index_get_or_create
u32 server_index_get_or_create(u8 *data, u16 len)
Definition: dhcp6_client_common_dp.c:29
vnet_interface_main_t
Definition: interface.h:990
dhcp6_prefix_info_t::prefix
ip6_address_t prefix
Definition: dhcp6_pd_client_dp.h:78
u16
unsigned short u16
Definition: types.h:57
dhcp6_report_common_t::server_index
u32 server_index
Definition: dhcp6_client_common_dp.h:25
server_id_t
Definition: dhcp6_client_common_dp.h:34
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
format_dhcpv6_client_trace
static u8 * format_dhcpv6_client_trace(u8 *s, va_list *args)
Definition: dhcp6_client_common_dp.c:110
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
DHCPV6_MSG_REPLY
@ DHCPV6_MSG_REPLY
Definition: dhcp6_packet.h:42
hi
vl_api_ip4_address_t hi
Definition: arp.api:37
vnet_interface_main_t::hw_interfaces
vnet_hw_interface_t * hw_interfaces
Definition: interface.h:993
ccm
vlib_combined_counter_main_t * ccm
Definition: interface_output.c:416
dhcp6_ia_na_client_main
dhcp6_ia_na_client_main_t dhcp6_ia_na_client_main
Definition: dhcp6_ia_na_client_dp.c:28
dhcp6_address_info_t
Definition: dhcp6_ia_na_client_dp.h:76
r
vnet_hw_if_output_node_runtime_t * r
Definition: interface_output.c:1089
vlib_frame_t
Definition: node.h:372
ethernet.h
dhcp6_report_common_t::T2
u32 T2
Definition: dhcp6_client_common_dp.h:28
random_u32
static u32 random_u32(u32 *seed)
32-bit random number generator
Definition: random.h:69
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
dhcp6_prefix_info_t::prefix_length
u8 prefix_length
Definition: dhcp6_pd_client_dp.h:79
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
len
u8 len
Definition: ip_types.api:103
generate_client_duid
static void generate_client_duid(void)
Definition: dhcp6_client_common_dp.c:54
dhcp6_ia_na_client_state_t
Definition: dhcp6_ia_na_client_dp.h:44
vec_add1
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:606
CLIENT_DUID_LENGTH
#define CLIENT_DUID_LENGTH
Definition: dhcp6_client_common_dp.h:59
dhcp6_report_common_t::inner_status_code
u16 inner_status_code
Definition: dhcp6_client_common_dp.h:29
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
vnet_buffer
#define vnet_buffer(b)
Definition: buffer.h:441
server_id_t::data
u8 * data
Definition: dhcp6_client_common_dp.h:36
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
vlib_frame_vector_args
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:301
udp_local.h
dhcp6_pd_client_state_t
Definition: dhcp6_pd_client_dp.h:44
udp_packet.h
uword
u64 uword
Definition: types.h:112
dhcp6_pd_client_state_t::transaction_id
u32 transaction_id
Definition: dhcp6_pd_client_dp.h:54
dhcp6_ia_na_client_dp.h
ethernet_interface
Definition: ethernet.h:146
udp_register_dst_port
void udp_register_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
Definition: udp_local.c:431
dhcp6_prefix_info_t::preferred_time
u32 preferred_time
Definition: dhcp6_pd_client_dp.h:81
udp_unregister_dst_port
void udp_unregister_dst_port(vlib_main_t *vm, udp_dst_port_t dst_port, u8 is_ip4)
Definition: udp_local.c:469
vec_validate
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
Definition: vec.h:523
server_id_t::len
u16 len
Definition: dhcp6_client_common_dp.h:37
DHCPV6_MSG_ADVERTISE
@ DHCPV6_MSG_ADVERTISE
Definition: dhcp6_packet.h:37
dhcp6_address_info_t::valid_time
u32 valid_time
Definition: dhcp6_ia_na_client_dp.h:79
dhcpv6_client_trace_t_
per-packet trace data
Definition: dhcp6_client_common_dp.c:105
dhcp6_pd_client_dp.h
dhcp6_pd_client_main_t
Definition: dhcp6_pd_client_dp.h:60
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
dhcp6_report_common_t
Definition: dhcp6_client_common_dp.h:22
dhcp6_address_info_t::address
ip6_address_t address
Definition: dhcp6_ia_na_client_dp.h:78
ethernet_get_interface
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
Definition: interface.c:982
foreach_dhcpv6_client
#define foreach_dhcpv6_client
Definition: dhcp6_client_common_dp.c:90
data
u8 data[128]
Definition: ipsec_types.api:95
dhcpv6_hdr_::msg_type
u8 msg_type
Definition: dhcp6_packet.h:117
dhcp6_report_common_t::preference
u8 preference
Definition: dhcp6_client_common_dp.h:31
vnet_hw_interface_t
Definition: interface.h:638
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
vlib_validate_buffer_enqueue_x1
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
Definition: buffer_node.h:224
ethernet_main
ethernet_main_t ethernet_main
Definition: init.c:45
dhcpv6_duid_ll_string_t::bin_string
char bin_string[10]
Definition: dhcp6_client_common_dp.h:55
format
description fragment has unexpected format
Definition: map.api:433
vlib_put_next_frame
vlib_put_next_frame(vm, node, next_index, 0)
dhcp6_ia_na_client_main_t::client_state_by_sw_if_index
dhcp6_ia_na_client_state_t * client_state_by_sw_if_index
Definition: dhcp6_ia_na_client_dp.h:62
dhcp6_client_common_dp.h
u32
unsigned int u32
Definition: types.h:88
dhcp6_clients_enable_disable
void dhcp6_clients_enable_disable(u8 enable)
Definition: dhcp6_client_common_dp.c:448
dhcpv6_hdr_
Definition: dhcp6_packet.h:115
dhcp6_ia_na_client_main_t
Definition: dhcp6_ia_na_client_dp.h:60
ip6_header_t
Definition: ip6_packet.h:294
client_duid
dhcpv6_duid_ll_string_t client_duid
Definition: dhcp6_client_common_dp.c:26
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
vlib_node_t
Definition: node.h:247
vlib_add_trace
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace.c:628
dhcp6_pd_publish_report
int dhcp6_pd_publish_report(prefix_report_t *r)
Definition: dhcp6_pd_client_dp.c:48
vlib_get_main
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:38
u8
unsigned char u8
Definition: types.h:56
vlib_buffer_get_current
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:257
DHCPV6_CLIENT_IAID
#define DHCPV6_CLIENT_IAID
Definition: dhcp6_client_common_dp.h:60
dhcp6_report_common_t::sw_if_index
u32 sw_if_index
Definition: dhcp6_client_common_dp.h:24
DHCPV6_DUID_LL
@ DHCPV6_DUID_LL
Definition: dhcp6_packet.h:111
vlib_buffer_t::data
u8 data[]
Packet data.
Definition: buffer.h:204
i
int i
Definition: flowhash_template.h:376
dhcp6_packet.h
dhcp6_prefix_info_t
Definition: dhcp6_pd_client_dp.h:76
clib_warning
#define clib_warning(format, args...)
Definition: error.h:59
dhcp6_publish_report
int dhcp6_publish_report(address_report_t *r)
Definition: dhcp6_ia_na_client_dp.c:48
dhcp6_pd_client_main
dhcp6_pd_client_main_t dhcp6_pd_client_main
Definition: dhcp6_pd_client_dp.c:28
address_report_t
Definition: dhcp6_ia_na_client_dp.h:84
dhcpv6_client_node
static vlib_node_registration_t dhcpv6_client_node
(constructor) VLIB_REGISTER_NODE (dhcpv6_client_node)
Definition: dhcp6_client_common_dp.c:429
ip6_header_t::payload_length
u16 payload_length
Definition: ip6_packet.h:301
vlib_node_runtime_t
Definition: node.h:454
dhcp6_report_common_t::msg_type
u8 msg_type
Definition: dhcp6_client_common_dp.h:26
dhcpv6_duid_ll_string_t
Definition: dhcp6_client_common_dp.h:47
dhcp6_client_common_main
dhcp6_client_common_main_t dhcp6_client_common_main
Definition: dhcp6_client_common_dp.c:25
from
from
Definition: nat44_ei_hairpinning.c:415
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vlib_get_next_frame
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
Definition: node_funcs.h:395
ethernet_interface::address
ethernet_interface_address_t address
Definition: ethernet.h:173
dhcp6_address_info_t::preferred_time
u32 preferred_time
Definition: dhcp6_ia_na_client_dp.h:80
n_left_from
n_left_from
Definition: nat44_ei_hairpinning.c:416
dhcpv6_client_trace_t
struct dhcpv6_client_trace_t_ dhcpv6_client_trace_t
per-packet trace data
vnet_main_t::interface_main
vnet_interface_main_t interface_main
Definition: vnet.h:81
vlib_buffer_t::flags
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
Definition: buffer.h:133
dhcp6_client_common_main_t
Definition: dhcp6_client_common_dp.h:40
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111
VLIB_REGISTER_NODE
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
random_default_seed
static uword random_default_seed(void)
Default random seed (unix/linux user-mode)
Definition: random.h:91