FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip6_nd.c
Go to the documentation of this file.
1 /*
2  * ip/ip6_neighbor.c: IP6 neighbor handling
3  *
4  * Copyright (c) 2010 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <vnet/ip6-nd/ip6_nd.h>
20 
23 
24 #include <vnet/fib/ip6_fib.h>
25 #include <vnet/ip/ip6_link.h>
26 #include <vnet/ip/ip6_ll_table.h>
27 
28 /**
29  * @file
30  * @brief IPv6 Neighbor Adjacency and Neighbor Discovery.
31  *
32  * The files contains the API and CLI code for managing IPv6 neighbor
33  * adjacency tables and neighbor discovery logic.
34  */
35 
36 #define DEF_MAX_RADV_INTERVAL 200
37 #define DEF_MIN_RADV_INTERVAL .75 * DEF_MAX_RADV_INTERVAL
38 
39 typedef struct ip6_nd_t_
40 {
41  /* local information */
43 
44  /* stats */
47 } ip6_nd_t;
48 
51 
56  uword is_solicitation)
57 {
59  uword n_packets = frame->n_vectors;
60  u32 *from, *to_next;
61  u32 n_left_from, n_left_to_next, next_index, n_advertisements_sent;
63  vlib_node_runtime_t *error_node =
65 
67  n_left_from = n_packets;
68  next_index = node->cached_next_index;
69 
70  if (node->flags & VLIB_NODE_FLAG_TRACE)
72  /* stride */ 1,
73  sizeof (icmp6_input_trace_t));
74 
75  option_type =
76  (is_solicitation
77  ? ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address
78  : ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address);
79  n_advertisements_sent = 0;
80 
81  while (n_left_from > 0)
82  {
83  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
84 
85  while (n_left_from > 0 && n_left_to_next > 0)
86  {
87  vlib_buffer_t *p0;
88  ip6_header_t *ip0;
89  icmp6_neighbor_solicitation_or_advertisement_header_t *h0;
90  icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *o0;
91  u32 bi0, options_len0, sw_if_index0, next0, error0;
92  u32 ip6_sadd_link_local, ip6_sadd_unspecified;
93  int is_rewrite0;
94  u32 ni0;
95 
96  bi0 = to_next[0] = from[0];
97 
98  from += 1;
99  to_next += 1;
100  n_left_from -= 1;
101  n_left_to_next -= 1;
102 
103  p0 = vlib_get_buffer (vm, bi0);
104  ip0 = vlib_buffer_get_current (p0);
105  h0 = ip6_next_header (ip0);
106  options_len0 =
107  clib_net_to_host_u16 (ip0->payload_length) - sizeof (h0[0]);
108 
109  error0 = ICMP6_ERROR_NONE;
110  sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX];
111  ip6_sadd_link_local =
113  ip6_sadd_unspecified =
115 
116  /* Check that source address is unspecified, link-local or else on-link. */
117  if (!ip6_sadd_unspecified && !ip6_sadd_link_local)
118  {
119  u32 src_adj_index0 = ip6_src_lookup_for_packet (im, p0, ip0);
120 
121  if (ADJ_INDEX_INVALID != src_adj_index0)
122  {
123  ip_adjacency_t *adj0 = adj_get (src_adj_index0);
124 
125  /* Allow all realistic-looking rewrite adjacencies to pass */
126  ni0 = adj0->lookup_next_index;
127  is_rewrite0 = (ni0 >= IP_LOOKUP_NEXT_ARP) &&
128  (ni0 < IP6_LOOKUP_N_NEXT);
129 
130  error0 = ((adj0->rewrite_header.sw_if_index != sw_if_index0
131  || !is_rewrite0)
132  ?
133  ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_NOT_ON_LINK
134  : error0);
135  }
136  else
137  {
138  error0 =
139  ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_NOT_ON_LINK;
140  }
141  }
142 
143  o0 = (void *) (h0 + 1);
144  o0 = ((options_len0 == 8 && o0->header.type == option_type
145  && o0->header.n_data_u64s == 1) ? o0 : 0);
146 
147  /* If src address unspecified or link local, donot learn neighbor MAC */
148  if (PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 &&
149  !ip6_sadd_unspecified))
150  {
151  /* *INDENT-OFF* */
152  ip_neighbor_learn_t learn = {
153  .sw_if_index = sw_if_index0,
154  .ip = {
155  .version = AF_IP6,
156  .ip.ip6 = (is_solicitation ?
157  ip0->src_address :
158  h0->target_address),
159  }
160  };
161  /* *INDENT-ON* */
162  memcpy (&learn.mac, o0->ethernet_address, sizeof (learn.mac));
163  ip_neighbor_learn_dp (&learn);
164  }
165 
166  if (is_solicitation && error0 == ICMP6_ERROR_NONE)
167  {
168  /* Check that target address is local to this router. */
169  fib_node_index_t fei;
170  u32 fib_index;
171 
172  fib_index =
174 
175  if (~0 == fib_index)
176  {
177  error0 = ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
178  }
179  else
180  {
181  if (ip6_address_is_link_local_unicast (&h0->target_address))
182  {
184  (ip6_ll_fib_get (sw_if_index0),
185  &h0->target_address, 128);
186  }
187  else
188  {
189  fei = ip6_fib_table_lookup_exact_match (fib_index,
190  &h0->target_address,
191  128);
192  }
193 
194  if (FIB_NODE_INDEX_INVALID == fei)
195  {
196  /* The target address is not in the FIB */
197  error0 =
198  ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
199  }
200  else
201  {
205  {
206  /* It's an address that belongs to one of our interfaces
207  * that's good. */
208  }
209  else if (FIB_ENTRY_FLAG_LOCAL &
211  fei, FIB_SOURCE_IP6_ND))
212  {
213  /* It's one of our link local addresses
214  * that's good. */
215  }
216  else if (fib_entry_is_sourced (fei,
218  {
219  /* The address was added by IPv6 Proxy ND config.
220  * We should only respond to these if the NS arrived on
221  * the link that has a matching covering prefix */
222  }
223  else
224  {
225  error0 =
226  ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
227  }
228  }
229  }
230  }
231 
232  if (is_solicitation)
233  next0 = (error0 != ICMP6_ERROR_NONE
236  else
237  {
238  next0 = 0;
239  error0 = error0 == ICMP6_ERROR_NONE ?
240  ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_RX : error0;
241  }
242 
243  if (is_solicitation && error0 == ICMP6_ERROR_NONE)
244  {
245  icmp6_send_neighbor_advertisement (vm, p0, ip0, h0, o0,
246  sw_if_index0);
247  n_advertisements_sent++;
248  }
249 
250  p0->error = error_node->errors[error0];
251 
253  to_next, n_left_to_next,
254  bi0, next0);
255  }
256 
257  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
258  }
259 
260  /* Account for advertisements sent. */
261  vlib_error_count (vm, error_node->node_index,
262  ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_TX,
263  n_advertisements_sent);
264 
265  return frame->n_vectors;
266 }
267 
268 static const ethernet_interface_t *
270 {
271  const vnet_sw_interface_t *sw;
272 
273  /* lookup radv container - ethernet interfaces only */
277 
278  return (NULL);
279 }
280 
281 /**
282  * @brief called when IP6 is enabled on a link.
283  * create and initialize router advertisement parameters with default
284  * values for this intfc
285  */
286 static void
288 {
289  const ethernet_interface_t *eth;
290  ip6_nd_t *ind;
291 
293 
294  if (NULL == eth)
295  return;
296 
299 
300  pool_get_zero (ip6_nd_pool, ind);
301 
302  ind->sw_if_index = sw_if_index;
303 
305  ind - ip6_nd_pool);
306 }
307 
308 static void
310 {
311  ip6_nd_t *ind;
312 
313  ind = pool_elt_at_index (ip6_nd_pool, indi);
314 
315  pool_put (ip6_nd_pool, ind);
316 }
317 
318 static uword
321 {
323  /* is_solicitation */
324  1);
325 }
326 
327 static uword
331 {
333  /* is_solicitation */
334  0);
335 }
336 
337 /* *INDENT-OFF* */
339 {
340  .function = icmp6_neighbor_solicitation,
341  .name = "icmp6-neighbor-solicitation",
342 
343  .vector_size = sizeof (u32),
344 
345  .format_trace = format_icmp6_input_trace,
346 
347  .n_next_nodes = ICMP6_NEIGHBOR_SOLICITATION_N_NEXT,
348  .next_nodes = {
350  [ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY] = "interface-output",
351  },
352 };
353 
355 {
356  .function = icmp6_neighbor_advertisement,
357  .name = "icmp6-neighbor-advertisement",
358 
359  .vector_size = sizeof (u32),
360 
361  .format_trace = format_icmp6_input_trace,
362 
363  .n_next_nodes = 1,
364  .next_nodes = {
365  [0] = "ip6-punt",
366  },
367 };
368 /* *INDENT-ON* */
369 
370 static u8 *
371 format_ip6_nd (u8 * s, va_list * args)
372 {
373  CLIB_UNUSED (index_t indi) = va_arg (*args, index_t);
374  u32 indent = va_arg (*args, u32);
375 
376  s = format (s, "%UNeighbor Discovery: enabled\n",
377  format_white_space, indent);
378 
379  s = format (s, "%UICMP redirects are disabled\n",
380  format_white_space, indent + 2);
381  s = format (s, "%UICMP unreachables are not sent\n",
382  format_white_space, indent + 2);
383  s = format (s, "%UND DAD is disabled\n", format_white_space, indent + 2);
384  //s = format (s, "%UND reachable time is %d milliseconds\n",);
385 
386  return (s);
387 }
388 
389 /**
390  * VFT to act as an implementation of a neighbour protocol
391  */
394  .inv_proxy6_del = ip6_nd_proxy_del,
395 };
396 
397 /**
398  * VFT for registering as a delegate to an IP6 link
399  */
402  .ildv_enable = ip6_nd_link_enable,
403  .ildv_format = format_ip6_nd,
404 };
405 
406 static clib_error_t *
408 {
409  icmp6_register_type (vm, ICMP6_neighbor_solicitation,
411  icmp6_register_type (vm, ICMP6_neighbor_advertisement,
413 
415 
417 
418  return 0;
419 }
420 
421 /* *INDENT-OFF* */
423 {
424  .runs_after = VLIB_INITS("icmp6_init"),
425 };
426 /* *INDENT-ON* */
427 
428 /*
429  * fd.io coding-style-patch-verification: ON
430  *
431  * Local Variables:
432  * eval: (c-set-style "gnu")
433  * End:
434  */
ip6_address_is_link_local_unicast
static uword ip6_address_is_link_local_unicast(const ip6_address_t *a)
Definition: ip6_packet.h:253
im
vnet_interface_main_t * im
Definition: interface_output.c:415
FIB_SOURCE_IP6_ND
@ FIB_SOURCE_IP6_ND
IPv6 ND (seen in the link-local tables)
Definition: fib_source.h:99
IP_LOOKUP_NEXT_ARP
@ IP_LOOKUP_NEXT_ARP
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
Definition: adj.h:63
vnet_sw_interface_t::type
vnet_sw_interface_type_t type
Definition: interface.h:871
vnet_sw_interface_t
Definition: interface.h:869
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
icmp6_neighbor_advertisement
static uword icmp6_neighbor_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:328
ip_neighbor_vft_t_
Virtual function Table for neighbor protocol implementations to register.
Definition: ip_neighbor.h:101
next_index
nat44_ei_hairpin_src_next_t next_index
Definition: nat44_ei_hairpinning.c:412
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
ip6_icmp_neighbor_advertisement_node
static vlib_node_registration_t ip6_icmp_neighbor_advertisement_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node)
Definition: ip6_nd.c:354
ADJ_INDEX_INVALID
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
Definition: adj_types.h:36
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
ip6_nd_delegate_disable
static void ip6_nd_delegate_disable(index_t indi)
Definition: ip6_nd.c:309
icmp6_neighbor_discovery_option_type_t
enum icmp6_neighbor_discovery_option_type icmp6_neighbor_discovery_option_type_t
ip6_fib_table_lookup_exact_match
fib_node_index_t ip6_fib_table_lookup_exact_match(u32 fib_index, const ip6_address_t *addr, u32 len)
Definition: ip6_fib.c:229
vlib_trace_frame_buffers_only
void vlib_trace_frame_buffers_only(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, uword n_buffers, uword next_buffer_stride, uword n_buffer_data_bytes_in_trace)
Definition: trace.c:48
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
ip6_nd_t_::sw_if_index
u32 sw_if_index
Definition: ip6_mld.c:68
FIB_NODE_INDEX_INVALID
#define FIB_NODE_INDEX_INVALID
Definition: fib_types.h:30
ip6_nd_impl_vft
const static ip_neighbor_vft_t ip6_nd_impl_vft
VFT to act as an implementation of a neighbour protocol.
Definition: ip6_nd.c:392
pool_put
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:305
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
ip_neighbor_learn_t_
Definition: ip_neighbor_types.h:97
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
ip6_address_is_unspecified
static uword ip6_address_is_unspecified(const ip6_address_t *a)
Definition: ip6_packet.h:237
ip6_nd_t_::n_solicitations_rcvd
u32 n_solicitations_rcvd
Definition: ip6_nd.c:45
vlib_error_count
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
Definition: error_funcs.h:57
ip6_next_header
static void * ip6_next_header(ip6_header_t *i)
Definition: ip6_packet.h:407
vlib_frame_t
Definition: node.h:372
ip6_ll_table.h
ip6_nd_delegate_vft
const static ip6_link_delegate_vft_t ip6_nd_delegate_vft
VFT for registering as a delegate to an IP6 link.
Definition: ip6_nd.c:400
ip6_nd_pool
static ip6_nd_t * ip6_nd_pool
Definition: ip6_nd.c:50
ip_neighbor_vft_t_::inv_proxy6_add
ip6_neighbor_proxy_cfg_t inv_proxy6_add
Definition: ip_neighbor.h:107
icmp6_register_type
void icmp6_register_type(vlib_main_t *vm, icmp6_type_t type, u32 node_index)
Definition: icmp6.c:745
ip_neighbor_learn_t_::sw_if_index
u32 sw_if_index
Definition: ip_neighbor_types.h:101
ip6_nd_t_::n_solicitations_dropped
u32 n_solicitations_dropped
Definition: ip6_nd.c:46
ip6_nd_proxy_add
int ip6_nd_proxy_add(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:76
vlib_node_runtime_t::errors
vlib_error_t * errors
Vector of errors for this node.
Definition: node.h:460
ip6_icmp_neighbor_solicitation_node
static vlib_node_registration_t ip6_icmp_neighbor_solicitation_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node)
Definition: ip6_nd.c:338
vlib_buffer_t::error
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:145
icmp6_input_trace_t
Definition: icmp6.h:62
FIB_SOURCE_INTERFACE
@ FIB_SOURCE_INTERFACE
Route added as a result of interface configuration.
Definition: fib_source.h:59
ip_adjacency_t_::lookup_next_index
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
Definition: adj.h:337
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
vnet_buffer
#define vnet_buffer(b)
Definition: buffer.h:441
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
VLIB_NODE_FLAG_TRACE
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:291
ip_neighbor_register
void ip_neighbor_register(ip_address_family_t af, const ip_neighbor_vft_t *vft)
Definition: ip_neighbor.c:1014
icmp6_neighbor_solicitation_or_advertisement
static_always_inline uword icmp6_neighbor_solicitation_or_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, uword is_solicitation)
Definition: ip6_nd.c:53
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
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
format_ip6_nd
static u8 * format_ip6_nd(u8 *s, va_list *args)
Definition: ip6_nd.c:371
static_always_inline
#define static_always_inline
Definition: clib.h:112
ip_neighbor_learn_t_::mac
mac_address_t mac
Definition: ip_neighbor_types.h:100
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
uword
u64 uword
Definition: types.h:112
ethernet_interface
Definition: ethernet.h:146
ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY
Definition: ip6_nd_inline.h:29
ip6_nd_init
static clib_error_t * ip6_nd_init(vlib_main_t *vm)
Definition: ip6_nd.c:407
ip6_src_lookup_for_packet
static u32 ip6_src_lookup_for_packet(ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
return the DPO that the LB stacks on.
Definition: ip6_fib.h:166
fib_entry_get_flags_for_source
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:1859
ip6_fib_table_get_index_for_sw_if_index
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
Definition: ip6_fib.c:353
ip_adjacency_t_
IP unicast adjacency.
Definition: adj.h:235
FIB_ENTRY_FLAG_LOCAL
@ FIB_ENTRY_FLAG_LOCAL
Definition: fib_entry.h:117
ip6_nd_t
struct ip6_nd_t_ ip6_nd_t
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
ethernet_get_interface
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
Definition: interface.c:982
icmp6_send_neighbor_advertisement
static_always_inline void icmp6_send_neighbor_advertisement(vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip6_h, icmp6_neighbor_solicitation_or_advertisement_header_t *icmp6_nsa, icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *icmp6_nd_ell_addr, u32 sw_if_index0)
Definition: ip6_nd_inline.h:34
format_icmp6_input_trace
format_function_t format_icmp6_input_trace
Definition: icmp6.h:67
ip6_main
ip6_main_t ip6_main
Definition: ip6_forward.c:2785
ip6_nd_inline.h
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
vlib_node_runtime_t::node_index
u32 node_index
Node index.
Definition: node.h:478
ip_neighbor.h
ethernet_main
ethernet_main_t ethernet_main
Definition: init.c:45
fib_entry_is_sourced
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
Definition: fib_entry_src.c:139
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
vlib_put_next_frame
vlib_put_next_frame(vm, node, next_index, 0)
ip_neighbor_learn_dp
void ip_neighbor_learn_dp(const ip_neighbor_learn_t *l)
APIs invoked by neighbor implementation (i.s.
Definition: ip_neighbor_dp.c:28
ip6_nd_delegate_id
static ip6_link_delegate_id_t ip6_nd_delegate_id
Definition: ip6_nd.c:49
u32
unsigned int u32
Definition: types.h:88
VLIB_INIT_FUNCTION
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:172
FIB_SOURCE_IP6_ND_PROXY
@ FIB_SOURCE_IP6_ND_PROXY
IPv6 Proxy ND.
Definition: fib_source.h:95
AF_IP6
@ AF_IP6
Definition: ip_types.h:24
ICMP6_NEIGHBOR_SOLICITATION_N_NEXT
@ ICMP6_NEIGHBOR_SOLICITATION_N_NEXT
Definition: ip6_nd_inline.h:30
vlib_node_get_runtime
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
Definition: node_funcs.h:116
ip6_header_t
Definition: ip6_packet.h:294
IP6_LOOKUP_N_NEXT
@ IP6_LOOKUP_N_NEXT
Definition: adj.h:105
ip6_main_t
Definition: ip6.h:110
ip6_fib.h
icmp6_neighbor_solicitation
static uword icmp6_neighbor_solicitation(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_nd.c:319
ip6_header_t::src_address
ip6_address_t src_address
Definition: ip6_packet.h:310
vlib_main_t
Definition: main.h:102
VLIB_INITS
#define VLIB_INITS(...)
Definition: init.h:352
pool_get_zero
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
Definition: pool.h:258
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
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
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51
ip6_ll_fib_get
u32 ip6_ll_fib_get(u32 sw_if_index)
For use in the data plane.
Definition: ip6_ll_table.c:28
ip_neighbor_dp.h
ip6_nd_proxy_del
int ip6_nd_proxy_del(u32 sw_if_index, const ip6_address_t *addr)
Definition: ip6_nd_proxy.c:82
ip6_nd_get_eth_itf
static const ethernet_interface_t * ip6_nd_get_eth_itf(u32 sw_if_index)
Definition: ip6_nd.c:269
vnet_sw_interface_t::hw_if_index
u32 hw_if_index
Definition: interface.h:887
ip6_icmp_input_node
vlib_node_registration_t ip6_icmp_input_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_input_node)
Definition: icmp6.c:241
VNET_SW_INTERFACE_TYPE_HARDWARE
@ VNET_SW_INTERFACE_TYPE_HARDWARE
Definition: interface.h:764
ip6_header_t::payload_length
u16 payload_length
Definition: ip6_packet.h:301
vlib_node_runtime_t
Definition: node.h:454
ip6_nd_link_enable
static void ip6_nd_link_enable(u32 sw_if_index)
called when IP6 is enabled on a link.
Definition: ip6_nd.c:287
vnet_get_sup_sw_interface
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
Definition: interface_funcs.h:81
from
from
Definition: nat44_ei_hairpinning.c:415
INDEX_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
Definition: dpo.h:49
PREDICT_TRUE
#define PREDICT_TRUE(x)
Definition: clib.h:125
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
ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP
Definition: ip6_nd_inline.h:28
adj_get
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Definition: adj.h:470
n_left_from
n_left_from
Definition: nat44_ei_hairpinning.c:416
ip6_nd.h
format_white_space
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
ip6_nd_t_
Definition: ip6_mld.c:65
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111
VLIB_REGISTER_NODE
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169