38 #define ETHER_MAC_ADDR_LEN 6 60 #define MIN_ADV_VALID_LIFETIME 7203 61 #define DEF_ADV_VALID_LIFETIME 2592000 62 #define DEF_ADV_PREF_LIFETIME 604800 93 u8 link_layer_address[8];
123 #define DEF_MAX_RADV_INTERVAL 200 124 #define DEF_MIN_RADV_INTERVAL .75 * DEF_MAX_RADV_INTERVAL 125 #define DEF_CURR_HOP_LIMIT 64 126 #define DEF_DEF_RTR_LIFETIME 3 * DEF_MAX_RADV_INTERVAL 127 #define MAX_DEF_RTR_LIFETIME 9000 129 #define MAX_INITIAL_RTR_ADVERT_INTERVAL 16 130 #define MAX_INITIAL_RTR_ADVERTISEMENTS 3 131 #define MIN_DELAY_BETWEEN_RAS 3 132 #define MAX_DELAY_BETWEEN_RAS 1800 133 #define MAX_RA_DELAY_TIME .5 250 clib_warning (
"IPv6 is not enabled for sw_if_index %d", sw_if_index);
251 return empty_address;
254 if (radv_info ==
NULL)
257 return empty_address;
273 memcpy (r.
mac, mac,
sizeof r.
mac);
288 if (ni == (
uword) ~ 0)
320 if (ni == (
uword) ~ 0)
345 return format (s,
"%=12s%=25s%=6s%=20s%=40s",
"Time",
"Address",
"Flags",
346 "Link layer",
"Interface");
349 flags =
format (flags,
"D");
352 flags =
format (flags,
"S");
355 flags =
format (flags,
"N");
358 s =
format (s,
"%=12U%=25U%=6s%=20U%=40U",
361 flags ? (
char *) flags :
"",
405 u8 link_layer_address[6];
427 if (
NULL != link_layer_address)
431 (
u8 *) & args,
sizeof (args));
437 icmp6_neighbor_solicitation_header_t *
h;
474 h->ip.dst_address.as_u8[13] = dst->
as_u8[13];
475 h->ip.dst_address.as_u8[14] = dst->
as_u8[14];
476 h->ip.dst_address.as_u8[15] = dst->
as_u8[15];
477 h->ip.src_address = src[0];
478 h->neighbor.target_address = dst[0];
480 clib_memcpy (h->link_layer_option.ethernet_address,
483 h->neighbor.icmp.checksum =
485 ASSERT (bogus_length == 0);
528 #define IP6_NBR_MK_KEY(k, sw_if_index, addr) \ 530 k.sw_if_index = sw_if_index; \ 531 k.ip6_address = *addr; \ 578 u32 i, *to_delete = 0;
583 if (n->key.sw_if_index == sw_if_index)
584 vec_add1 (to_delete, n - nm->neighbor_pool);
590 for (i = 0; i <
vec_len (to_delete); i++)
599 for (i = 0; i <
vec_len (to_delete); i++)
684 offset =
vec_len (rewrite) - 2;
745 if ((count++ == 100) || (index == ~0))
767 u8 * link_layer_address,
768 uword n_bytes_link_layer_address,
769 int is_static,
int is_no_fib_entry)
774 int make_new_nd_cache_entry = 1;
798 make_new_nd_cache_entry = 0;
801 if (make_new_nd_cache_entry)
819 link_layer_address, n_bytes_link_layer_address);
824 if (!is_no_fib_entry)
841 link_layer_address, n_bytes_link_layer_address))
844 goto check_customers;
848 link_layer_address, n_bytes_link_layer_address);
874 while (next_index != (
u32) ~ 0)
892 while (next_index != (
u32) ~ 0)
902 (*fp) (mc->
data, link_layer_address, sw_if_index, &
ip6a_zero);
921 u8 * link_layer_address,
922 uword n_bytes_link_layer_address)
982 n2->key.sw_if_index);
1004 if (sw_if_index != ~0 && n->key.sw_if_index != sw_if_index)
1006 vec_add1 (ns, n[0]);
1064 .path =
"show ip6 neighbors",
1066 .short_help =
"show ip6 neighbors [<interface>]",
1080 int is_no_fib_entry = 0;
1094 else if (
unformat (input,
"static"))
1096 else if (
unformat (input,
"no-fib-entry"))
1097 is_no_fib_entry = 1;
1107 mac_address,
sizeof (mac_address),
1108 is_static, is_no_fib_entry);
1111 mac_address,
sizeof (mac_address));
1130 .path =
"set ip6 neighbor",
1132 .short_help =
"set ip6 neighbor [del] <interface> <ip6-address> <mac-address> [static]",
1147 uword is_solicitation)
1152 u32 *from, *to_next;
1153 u32 n_left_from, n_left_to_next, next_index, n_advertisements_sent;
1160 n_left_from = n_packets;
1170 ? ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address
1171 : ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address);
1172 n_advertisements_sent = 0;
1174 while (n_left_from > 0)
1178 while (n_left_from > 0 && n_left_to_next > 0)
1182 icmp6_neighbor_solicitation_or_advertisement_header_t *h0;
1183 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *o0;
1184 u32 bi0, options_len0, sw_if_index0, next0, error0;
1185 u32 ip6_sadd_link_local, ip6_sadd_unspecified;
1189 bi0 = to_next[0] = from[0];
1194 n_left_to_next -= 1;
1202 error0 = ICMP6_ERROR_NONE;
1204 ip6_sadd_link_local =
1206 ip6_sadd_unspecified =
1210 if (!ip6_sadd_unspecified && !ip6_sadd_link_local)
1223 error0 = ((adj0->rewrite_header.sw_if_index != sw_if_index0
1226 ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_NOT_ON_LINK
1232 ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_NOT_ON_LINK;
1236 o0 = (
void *) (h0 + 1);
1237 o0 = ((options_len0 == 8 && o0->header.type == option_type
1238 && o0->header.n_data_u64s == 1) ? o0 : 0);
1241 if (
PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 &&
1242 !ip6_sadd_unspecified))
1247 &h0->target_address,
1248 o0->ethernet_address,
1249 sizeof (o0->ethernet_address),
1253 if (is_solicitation && error0 == ICMP6_ERROR_NONE)
1262 if (~0 == fib_index)
1264 error0 = ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
1272 &h0->target_address, 128);
1277 &h0->target_address,
1285 ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
1308 ICMP6_ERROR_NEIGHBOR_SOLICITATION_SOURCE_UNKNOWN;
1314 if (is_solicitation)
1315 next0 = (error0 != ICMP6_ERROR_NONE
1321 error0 = error0 == ICMP6_ERROR_NONE ?
1322 ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_RX : error0;
1325 if (is_solicitation && error0 == ICMP6_ERROR_NONE)
1332 if (!ip6_sadd_unspecified)
1336 IP6_MULTICAST_SCOPE_link_local,
1337 IP6_MULTICAST_GROUP_ID_all_hosts);
1341 h0->icmp.type = ICMP6_neighbor_advertisement;
1351 ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address;
1354 h0->advertisement_flags = clib_host_to_net_u32
1358 h0->icmp.checksum = 0;
1362 ASSERT (bogus_length == 0);
1378 n_advertisements_sent++;
1384 to_next, n_left_to_next,
1393 ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_TX,
1394 n_advertisements_sent);
1400 #define foreach_log_level \ 1401 _ (DEBUG, "DEBUG") \ 1402 _ (INFO, "INFORMATION") \ 1403 _ (NOTICE, "NOTICE") \ 1404 _ (WARNING, "WARNING") \ 1406 _ (CRIT, "CRITICAL") \ 1407 _ (ALERT, "ALERT") \ 1408 _ (EMERG, "EMERGENCY") 1412 #define _(f,s) LOG_##f, 1432 if ((priority > LOG_EMERG) || !(logmask & (1 << priority)))
1442 .format =
"ip6 nd: (%s): %s",.format_args =
"T4T4",};
1457 _vnet_ip6_neighbor_function_list_elt_t * elt)
1463 error = elt->fp (data);
1466 elt = elt->next_ip6_neighbor_function;
1489 u32 *from, *to_next;
1490 u32 n_left_from, n_left_to_next, next_index;
1491 u32 n_advertisements_sent = 0;
1500 n_left_from = n_packets;
1509 option_type = ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address;
1511 while (n_left_from > 0)
1515 while (n_left_from > 0 && n_left_to_next > 0)
1521 icmp6_neighbor_discovery_header_t *h0;
1522 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *o0;
1524 u32 bi0, options_len0, sw_if_index0, next0, error0;
1525 u32 is_solicitation = 1, is_dropped = 0;
1526 u32 is_unspecified, is_link_local;
1528 bi0 = to_next[0] = from[0];
1533 n_left_to_next -= 1;
1544 error0 = ICMP6_ERROR_NONE;
1549 is_solicitation = 0;
1552 if (!is_unspecified && !is_link_local)
1560 error0 = (adj0->rewrite_header.sw_if_index != sw_if_index0
1562 ICMP6_ERROR_ROUTER_SOLICITATION_SOURCE_NOT_ON_LINK
1567 error0 = ICMP6_ERROR_ROUTER_SOLICITATION_SOURCE_NOT_ON_LINK;
1572 o0 = (
void *) (h0 + 1);
1573 o0 = ((options_len0 == 8
1574 && o0->header.type == option_type
1575 && o0->header.n_data_u64s == 1) ? o0 : 0);
1578 if (
PREDICT_TRUE (error0 == ICMP6_ERROR_NONE && o0 != 0 &&
1579 !is_unspecified && !is_link_local))
1583 o0->ethernet_address,
1584 sizeof (o0->ethernet_address),
1591 if (error0 == ICMP6_ERROR_NONE)
1604 (!eth_if0) ? ICMP6_ERROR_ROUTER_SOLICITATION_UNSUPPORTED_INTF
1607 if (error0 == ICMP6_ERROR_NONE)
1614 sizeof (icmp6_neighbor_discovery_header_t));
1629 ICMP6_ERROR_ROUTER_SOLICITATION_RADV_NOT_CONFIG :
1632 if (error0 == ICMP6_ERROR_NONE)
1637 if (is_solicitation)
1648 icmp6_router_advertisement_header_t rh;
1650 rh.icmp.type = ICMP6_router_advertisement;
1652 rh.icmp.checksum = 0;
1655 rh.router_lifetime_in_sec =
1656 clib_host_to_net_u16
1659 time_in_msec_between_retransmitted_neighbor_solicitations
1661 clib_host_to_net_u32 (radv_info->
1662 adv_time_in_msec_between_retransmitted_neighbor_solicitations);
1663 rh.neighbor_reachable_time_in_msec =
1664 clib_host_to_net_u32 (radv_info->
1665 adv_neighbor_reachable_time_in_msec);
1677 u16 payload_length =
1678 sizeof (icmp6_router_advertisement_header_t);
1682 (p0), bi0, (
void *) &rh,
1684 (icmp6_router_advertisement_header_t));
1688 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
1692 ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address;
1693 h.header.n_data_u64s = 1;
1701 (p0), bi0, (
void *) &h,
1703 (icmp6_neighbor_discovery_ethernet_link_layer_address_option_t));
1707 (icmp6_neighbor_discovery_ethernet_link_layer_address_option_t);
1713 icmp6_neighbor_discovery_mtu_option_t
h;
1718 h.header.type = ICMP6_NEIGHBOR_DISCOVERY_OPTION_mtu;
1719 h.header.n_data_u64s = 1;
1722 sizeof (icmp6_neighbor_discovery_mtu_option_t);
1726 (p0), bi0, (
void *) &h,
1728 (icmp6_neighbor_discovery_mtu_option_t));
1737 if(pr_info->enabled &&
1738 (!pr_info->decrement_lifetime_flag
1739 || (pr_info->pref_lifetime_expires >0)))
1742 icmp6_neighbor_discovery_prefix_information_option_t h;
1744 h.header.type = ICMP6_NEIGHBOR_DISCOVERY_OPTION_prefix_information;
1745 h.header.n_data_u64s = (sizeof(icmp6_neighbor_discovery_prefix_information_option_t) >> 3);
1747 h.dst_address_length = pr_info->prefix_len;
1749 h.flags = (pr_info->adv_on_link_flag) ? ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_FLAG_ON_LINK : 0;
1750 h.flags |= (pr_info->adv_autonomous_flag) ? ICMP6_NEIGHBOR_DISCOVERY_PREFIX_INFORMATION_AUTO : 0;
1752 if(radv_info->cease_radv && pr_info->deprecated_prefix_flag)
1754 h.valid_time = clib_host_to_net_u32(MIN_ADV_VALID_LIFETIME);
1755 h.preferred_time = 0;
1759 if(pr_info->decrement_lifetime_flag)
1761 pr_info->adv_valid_lifetime_in_secs = ((pr_info->valid_lifetime_expires > now)) ?
1762 (pr_info->valid_lifetime_expires - now) : 0;
1764 pr_info->adv_pref_lifetime_in_secs = ((pr_info->pref_lifetime_expires > now)) ?
1765 (pr_info->pref_lifetime_expires - now) : 0;
1768 h.valid_time = clib_host_to_net_u32(pr_info->adv_valid_lifetime_in_secs);
1769 h.preferred_time = clib_host_to_net_u32(pr_info->adv_pref_lifetime_in_secs) ;
1773 clib_memcpy(&h.dst_address, &pr_info->prefix, sizeof(ip6_address_t));
1775 payload_length += sizeof( icmp6_neighbor_discovery_prefix_information_option_t);
1777 vlib_buffer_add_data (vm,
1778 vlib_buffer_get_free_list_index (p0),
1780 (void *)&h, sizeof(icmp6_neighbor_discovery_prefix_information_option_t));
1798 IP6_MULTICAST_SCOPE_link_local,
1799 IP6_MULTICAST_GROUP_ID_all_hosts);
1807 clib_host_to_net_u16 (payload_length);
1809 icmp6_router_advertisement_header_t *rh0 =
1810 (icmp6_router_advertisement_header_t *) (ip0 + 1);
1811 rh0->icmp.checksum =
1814 ASSERT (bogus_length == 0);
1820 if (is_solicitation)
1832 is_dropped ? next0 :
1840 if (adj_index0 == 0)
1841 error0 = ICMP6_ERROR_DST_LOOKUP_MISS;
1845 is_dropped ? next0 :
1851 p0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
1856 if ((error0 == ICMP6_ERROR_NONE) && !is_dropped)
1859 n_advertisements_sent++;
1865 p0->error = error_node->
errors[error0];
1867 if (error0 != ICMP6_ERROR_NONE)
1871 to_next, n_left_to_next,
1881 ICMP6_ERROR_ROUTER_ADVERTISEMENTS_TX,
1882 n_advertisements_sent);
1884 return frame->n_vectors;
1895 u32 *from, *to_next;
1896 u32 n_left_from, n_left_to_next, next_index;
1897 u32 n_advertisements_rcvd = 0;
1903 n_left_from = n_packets;
1911 while (n_left_from > 0)
1915 while (n_left_from > 0 && n_left_to_next > 0)
1920 icmp6_router_advertisement_header_t *h0;
1921 u32 bi0, options_len0, sw_if_index0, next0, error0;
1923 bi0 = to_next[0] = from[0];
1928 n_left_to_next -= 1;
1936 error0 = ICMP6_ERROR_NONE;
1941 ICMP6_ERROR_ROUTER_ADVERTISEMENT_SOURCE_NOT_LINK_LOCAL : error0;
1946 n_advertisements_rcvd++;
1948 if (error0 == ICMP6_ERROR_NONE)
1960 (!eth_if0) ? ICMP6_ERROR_ROUTER_SOLICITATION_UNSUPPORTED_INTF
1963 if (error0 == ICMP6_ERROR_NONE)
1980 ICMP6_ERROR_ROUTER_SOLICITATION_RADV_NOT_CONFIG :
1983 if (error0 == ICMP6_ERROR_NONE)
1992 r.
flags = h0->flags;
1994 clib_net_to_host_u16 (h0->router_lifetime_in_sec);
1996 clib_net_to_host_u32
1997 (h0->neighbor_reachable_time_in_msec);
2003 && (h0->current_hop_limit !=
2007 "our AdvCurHopLimit on %U doesn't agree with %U",
2019 "our AdvManagedFlag on %U doesn't agree with %U",
2031 "our AdvOtherConfigFlag on %U doesn't agree with %U",
2039 time_in_msec_between_retransmitted_neighbor_solicitations
2041 adv_time_in_msec_between_retransmitted_neighbor_solicitations)
2043 time_in_msec_between_retransmitted_neighbor_solicitations
2045 clib_host_to_net_u32 (radv_info->
2046 adv_time_in_msec_between_retransmitted_neighbor_solicitations)))
2049 "our AdvRetransTimer on %U doesn't agree with %U",
2056 if ((h0->neighbor_reachable_time_in_msec &&
2058 (h0->neighbor_reachable_time_in_msec !=
2059 clib_host_to_net_u32
2063 "our AdvReachableTime on %U doesn't agree with %U",
2071 u8 *opt_hdr = (
u8 *) (h0 + 1);
2072 while (options_len0 > 0)
2074 icmp6_neighbor_discovery_option_header_t *o0 =
2075 (icmp6_neighbor_discovery_option_header_t *)
2077 int opt_len = o0->n_data_u64s << 3;
2081 if (options_len0 < 2)
2084 "malformed RA packet on %U from %U",
2095 " zero length option in RA on %U from %U",
2102 else if (opt_len > options_len0)
2105 "option length in RA packet greater than total length on %U from %U",
2113 options_len0 -= opt_len;
2116 switch (option_type)
2118 case ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address:
2120 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
2122 (icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
2125 if (opt_len <
sizeof (*h))
2128 memcpy (r.
slla, h->ethernet_address, 6);
2132 case ICMP6_NEIGHBOR_DISCOVERY_OPTION_mtu:
2134 icmp6_neighbor_discovery_mtu_option_t *
h =
2135 (icmp6_neighbor_discovery_mtu_option_t
2138 if (opt_len <
sizeof (*h))
2141 r.
mtu = clib_net_to_host_u32 (h->mtu);
2145 clib_host_to_net_u32
2149 "our AdvLinkMTU on %U doesn't agree with %U",
2158 case ICMP6_NEIGHBOR_DISCOVERY_OPTION_prefix_information:
2160 icmp6_neighbor_discovery_prefix_information_option_t
2162 (icmp6_neighbor_discovery_prefix_information_option_t
2167 u32 preferred, valid;
2169 if (opt_len <
sizeof (*h))
2179 clib_net_to_host_u32 (h->preferred_time);
2180 valid = clib_net_to_host_u32 (h->valid_time);
2184 prefix->
flags = h->flags & 0xc0;
2186 h->dst_address_length;
2195 ip6_address_mask_from_width(&mask, pr_info->prefix_len);
2197 if(pr_info->enabled &&
2198 (pr_info->prefix_len == h->dst_address_length) &&
2199 ip6_address_is_equal_masked (&pr_info->prefix, &h->dst_address, &mask))
2202 if(!pr_info->decrement_lifetime_flag &&
2203 valid != pr_info->adv_valid_lifetime_in_secs)
2205 ip6_neighbor_syslog(vm, LOG_WARNING,
2206 "our ADV validlifetime on %U for %U does not agree with %U",
2207 format_vnet_sw_if_index_name, vnm, sw_if_index0,format_ip6_address, &pr_info->prefix,
2208 format_ip6_address, &h->dst_address);
2210 if(!pr_info->decrement_lifetime_flag &&
2211 preferred != pr_info->adv_pref_lifetime_in_secs)
2213 ip6_neighbor_syslog(vm, LOG_WARNING,
2214 "our ADV preferredlifetime on %U for %U does not agree with %U",
2215 format_vnet_sw_if_index_name, vnm, sw_if_index0,format_ip6_address, &pr_info->prefix,
2216 format_ip6_address, &h->dst_address);
2234 p0->error = error_node->
errors[error0];
2236 if (error0 != ICMP6_ERROR_NONE)
2240 to_next, n_left_to_next,
2249 ICMP6_ERROR_ROUTER_ADVERTISEMENTS_RX,
2250 n_advertisements_rcvd);
2252 return frame->n_vectors;
2258 static u32 seed = 0;
2259 static u8 seed_set = 0;
2265 return random_f64 (&seed) * (to - from) + from;
2285 icmp6_router_solicitation_header_t *rh;
2302 p0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
2312 rh->neighbor.icmp.type = ICMP6_router_solicitation;
2313 rh->neighbor.icmp.code = 0;
2314 rh->neighbor.icmp.checksum = 0;
2315 rh->neighbor.reserved_must_be_zero = 0;
2317 rh->link_layer_option.header.type =
2318 ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address;
2320 rh->link_layer_option.ethernet_address))
2322 clib_warning (
"interface with sw_if_index %u has no mac address",
2327 rh->link_layer_option.header.n_data_u64s = 1;
2329 payload_length =
sizeof (rh->neighbor) +
sizeof (
u64);
2331 rh->ip.ip_version_traffic_class_and_flow_label =
2332 clib_host_to_net_u32 (0x6 << 28);
2333 rh->ip.payload_length = clib_host_to_net_u16 (payload_length);
2334 rh->ip.protocol = IP_PROTOCOL_ICMP6;
2335 rh->ip.hop_limit = 255;
2338 rh->ip.dst_address.
as_u64[0] = clib_host_to_net_u64 (0xff02L << 48);
2339 rh->ip.dst_address.as_u64[1] = clib_host_to_net_u64 (2);
2378 params = &radv_info->
params;
2380 if (radv_info->
due_time > current_time)
2399 if (params->
mrc != 0 && --radv_info->
n_left == 0)
2411 if (params->
mrd != 0
2427 uword *event_data = 0;
2428 f64 sleep_time = 1e9;
2442 due_time = current_time + 1e9;
2446 if (check_send_rs (vm, radv_info, current_time, &dt)
2453 while (due_time < current_time);
2455 sleep_time = due_time - current_time;
2465 .name =
"send-rs-process",
2478 ASSERT (~0 != sw_if_index);
2516 if (!mcast_group_info)
2526 mcast_group_info->
type = 4;
2547 if (mcast_group_info)
2576 u32 sw_if_index,
u32 is_add)
2612 mhash_unset (&a->address_to_prefix_index, &p->prefix, 0);
2616 mhash_unset (&a->address_to_mldp_index, &m->mcast_address, 0);
2644 memset (a, 0,
sizeof (a[0]));
2693 IP6_MULTICAST_SCOPE_link_local,
2694 IP6_MULTICAST_GROUP_ID_all_hosts);
2696 IP6_MULTICAST_SCOPE_link_local,
2697 IP6_MULTICAST_GROUP_ID_all_routers);
2699 IP6_MULTICAST_SCOPE_link_local,
2700 IP6_MULTICAST_GROUP_ID_mldv2_routers);
2728 icmp6_multicast_listener_report_header_t *rh0;
2729 icmp6_multicast_listener_report_packet_t *rp0;
2761 b0->
current_length =
sizeof (icmp6_multicast_listener_report_packet_t);
2763 payload_length =
sizeof (icmp6_multicast_listener_report_header_t);
2765 b0->
error = ICMP6_ERROR_NONE;
2769 rh0 = (icmp6_multicast_listener_report_header_t *) & rp0->report_hdr;
2771 memset (rp0, 0x0,
sizeof (icmp6_multicast_listener_report_packet_t));
2774 clib_host_to_net_u32 (0x6 << 28);
2776 ip0->
protocol = IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS;
2781 rh0->icmp.type = ICMP6_multicast_listener_report_v2;
2789 IP6_MULTICAST_SCOPE_link_local,
2790 IP6_MULTICAST_GROUP_ID_mldv2_routers);
2794 int num_addr_records = 0;
2795 icmp6_multicast_address_record_t rr;
2798 rh0->ext_hdr.next_hdr = IP_PROTOCOL_ICMP6;
2799 rh0->ext_hdr.n_data_u64s = 0;
2803 rh0->alert.value = 0;
2808 rh0->icmp.checksum = 0;
2814 rr.aux_data_len_u32s = 0;
2815 rr.num_sources = clib_host_to_net_u16 (m->num_sources);
2816 clib_memcpy(&rr.mcast_addr, &m->mcast_address, sizeof(ip6_address_t));
2820 vlib_buffer_add_data
2821 (vm, vlib_buffer_get_free_list_index (b0), bo0,
2822 (void *)&rr, sizeof(icmp6_multicast_address_record_t));
2824 payload_length += sizeof( icmp6_multicast_address_record_t);
2829 rh0->num_addr_records = clib_host_to_net_u16 (num_addr_records);
2836 ASSERT (bogus_length == 0);
2846 b0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
2863 .name =
"icmp6-router-solicitation",
2865 .vector_size =
sizeof (
u32),
2888 u32 n_this_frame = 0;
2889 u32 n_left_to_next = 0;
2892 icmp6_router_solicitation_header_t *h0;
2900 if( !vnet_sw_interface_is_admin_up (vnm, radv_info->sw_if_index))
2902 radv_info->initial_adverts_sent = radv_info->initial_adverts_count-1;
2903 radv_info->next_multicast_time = now;
2904 radv_info->last_multicast_time = now;
2905 radv_info->last_radv_time = 0;
2906 radv_info->all_routers_mcast = 0;
2914 ip6_neighbor_send_mldpv2_report(radv_info->sw_if_index);
2915 radv_info->all_routers_mcast = 1;
2924 f64 rfn = (radv_info->max_radv_interval - radv_info->min_radv_interval) *
2925 random_f64 (&radv_info->seed) + radv_info->min_radv_interval;
2928 if( radv_info->initial_adverts_sent > 0)
2930 radv_info->initial_adverts_sent--;
2931 if(rfn > radv_info-> initial_adverts_interval)
2932 rfn = radv_info-> initial_adverts_interval;
2935 if( radv_info->initial_adverts_sent == 0)
2936 if(radv_info->cease_radv)
2937 radv_info->send_radv = 0;
2953 b0->
current_length =
sizeof( icmp6_router_solicitation_header_t);
2954 b0->
error = ICMP6_ERROR_NONE;
2959 memset (h0, 0,
sizeof (icmp6_router_solicitation_header_t));
2961 h0->ip.ip_version_traffic_class_and_flow_label = clib_host_to_net_u32 (0x6 << 28);
2962 h0->ip.payload_length = clib_host_to_net_u16 (
sizeof (icmp6_router_solicitation_header_t)
2964 h0->ip.protocol = IP_PROTOCOL_ICMP6;
2965 h0->ip.hop_limit = 255;
2968 h0->ip.src_address.as_u64[0] = 0;
2969 h0->ip.src_address.as_u64[1] = 0;
2971 h0->ip.dst_address.as_u64[0] = 0;
2972 h0->ip.dst_address.as_u64[1] = 0;
2974 h0->neighbor.icmp.type = ICMP6_router_solicitation;
3002 f->n_vectors = n_this_frame;
3046 _vec_len (event_data) = 0;
3056 .name =
"icmp6-router-advertisement",
3058 .vector_size =
sizeof (
u32),
3072 .name =
"ip6-icmp-neighbor-discovery-event-process",
3099 .name =
"icmp6-neighbor-solicitation",
3101 .vector_size =
sizeof (
u32),
3117 .name =
"icmp6-neighbor-advertisement",
3119 .vector_size =
sizeof (
u32),
3152 u32 *from, *to_next_drop;
3153 uword n_left_from, n_left_to_next_drop;
3154 static f64 time_last_seed_change = -1e100;
3155 static u32 hash_seeds[3];
3165 if (time_now - time_last_seed_change > 1e-3)
3169 sizeof (hash_seeds));
3170 for (i = 0; i <
ARRAY_LEN (hash_seeds); i++)
3171 hash_seeds[i] = r[i];
3174 for (i = 0; i <
ARRAY_LEN (hash_bitmap); i++)
3177 time_last_seed_change = time_now;
3183 while (n_left_from > 0)
3186 to_next_drop, n_left_to_next_drop);
3188 while (n_left_from > 0 && n_left_to_next_drop > 0)
3192 u32 pi0, adj_index0, a0, b0, c0, m0, sw_if_index0, drop0;
3221 sw_if_index0 = adj0->rewrite_header.sw_if_index;
3235 c0 &=
BITS (hash_bitmap) - 1;
3239 bm0 = hash_bitmap[c0];
3240 drop0 = (bm0 & m0) != 0;
3243 hash_bitmap[c0] = bm0 | m0;
3247 to_next_drop[0] = pi0;
3249 n_left_to_next_drop -= 1;
3285 icmp6_neighbor_solicitation_header_t *h0;
3301 &h0->ip.src_address))
3321 clib_memcpy (h0->link_layer_option.ethernet_address,
3325 h0->neighbor.icmp.checksum = 0;
3326 h0->neighbor.icmp.checksum =
3330 ASSERT (bogus_length == 0);
3340 b0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
3348 n_left_to_next_drop);
3371 =
"no source address for ND solicitation",
3378 .name =
"ip6-glean",
3379 .vector_size =
sizeof (
u32),
3393 .name =
"ip6-discover-neighbor",
3394 .vector_size =
sizeof (
u32),
3410 u8 suppress,
u8 managed,
u8 other,
3411 u8 ll_option,
u8 send_unicast,
u8 cease,
3412 u8 use_lifetime,
u32 lifetime,
3413 u32 initial_count,
u32 initial_interval,
3414 u32 max_interval,
u32 min_interval,
u8 is_no)
3424 error = (ri != ~0) ? 0 : VNET_API_ERROR_INVALID_SW_IF_INDEX;
3432 if ((max_interval != 0) && (min_interval == 0))
3433 min_interval = .75 * max_interval;
3453 if (lifetime <= max_interval)
3454 return VNET_API_ERROR_INVALID_VALUE;
3457 if (min_interval != 0)
3459 if ((min_interval > .75 * max_interval) || (min_interval < 3))
3460 return VNET_API_ERROR_INVALID_VALUE;
3465 return VNET_API_ERROR_INVALID_VALUE;
3472 (suppress != 0) ? ((is_no != 0) ? 1 : 0) : radv_info->
send_radv;
3481 (send_unicast != 0) ? ((is_no) ? 0 : 1) : radv_info->
send_unicast;
3483 (cease != 0) ? ((is_no) ? 0 : 1) : radv_info->
cease_radv;
3494 (initial_interval !=
3499 if ((cease != 0) && (is_no))
3513 u8 use_default,
u32 val_lifetime,
u32 pref_lifetime,
3514 u8 no_advertise,
u8 off_link,
u8 no_autoconfig,
3515 u8 no_onlink,
u8 is_no)
3528 error = (ri != ~0) ? 0 : VNET_API_ERROR_INVALID_SW_IF_INDEX;
3548 return VNET_API_ERROR_INVALID_VALUE;
3551 return VNET_API_ERROR_INVALID_VALUE_2;
3606 return VNET_API_ERROR_INVALID_VALUE_2;
3615 if ((val_lifetime == ~0) || (pref_lifetime == ~0))
3628 prefix->
enabled = !(no_advertise != 0);
3655 u8 suppress = 0, managed = 0, other = 0;
3656 u8 suppress_ll_option = 0, send_unicast = 0, cease = 0;
3657 u8 use_lifetime = 0;
3658 u32 sw_if_index, ra_lifetime = 0, ra_initial_count =
3659 0, ra_initial_interval = 0;
3660 u32 ra_max_interval = 0, ra_min_interval = 0;
3665 int add_radv_info = 1;
3666 __attribute__ ((unused))
ip6_radv_t *radv_info = 0;
3727 else if (
unformat (line_input,
"prefix %U/%d",
3733 else if (
unformat (line_input,
"ra-managed-config-flag"))
3738 else if (
unformat (line_input,
"ra-other-config-flag"))
3743 else if (
unformat (line_input,
"ra-suppress") ||
3744 unformat (line_input,
"ra-surpress"))
3749 else if (
unformat (line_input,
"ra-suppress-link-layer") ||
3750 unformat (line_input,
"ra-surpress-link-layer"))
3752 suppress_ll_option = 1;
3755 else if (
unformat (line_input,
"ra-send-unicast"))
3760 else if (
unformat (line_input,
"ra-lifetime"))
3762 if (!
unformat (line_input,
"%d", &ra_lifetime))
3770 else if (
unformat (line_input,
"ra-initial"))
3773 (line_input,
"%d %d", &ra_initial_count, &ra_initial_interval))
3780 else if (
unformat (line_input,
"ra-interval"))
3782 if (!
unformat (line_input,
"%d", &ra_max_interval))
3788 if (!
unformat (line_input,
"%d", &ra_min_interval))
3789 ra_min_interval = 0;
3792 else if (
unformat (line_input,
"ra-cease"))
3807 suppress, managed, other,
3808 suppress_ll_option, send_unicast, cease,
3809 use_lifetime, ra_lifetime,
3810 ra_initial_count, ra_initial_interval,
3811 ra_max_interval, ra_min_interval, is_no);
3815 u32 valid_lifetime_in_secs = 0;
3816 u32 pref_lifetime_in_secs = 0;
3817 u8 use_prefix_default_values = 0;
3818 u8 no_advertise = 0;
3820 u8 no_autoconfig = 0;
3826 if (
unformat (line_input,
"default"))
3828 use_prefix_default_values = 1;
3831 else if (
unformat (line_input,
"infinite"))
3833 valid_lifetime_in_secs = ~0;
3834 pref_lifetime_in_secs = ~0;
3837 else if (
unformat (line_input,
"%d %d", &valid_lifetime_in_secs,
3838 &pref_lifetime_in_secs))
3846 while (!use_prefix_default_values &&
3849 if (
unformat (line_input,
"no-advertise"))
3851 else if (
unformat (line_input,
"off-link"))
3853 else if (
unformat (line_input,
"no-autoconfig"))
3855 else if (
unformat (line_input,
"no-onlink"))
3865 &ip6_addr, addr_len,
3866 use_prefix_default_values,
3867 valid_lifetime_in_secs,
3868 pref_lifetime_in_secs,
3870 off_link, no_autoconfig, no_onlink, is_no);
3885 for (i = 0; i <
vec_len (addrs); i++)
3930 u32 *link_scope = 0, *global_scope = 0;
3931 u32 *local_scope = 0, *unknown_scope = 0;
3938 while (ai != (
u32) ~ 0)
3993 vlib_cli_output (vm,
"\t\t%U\n", format_ip6_address,
4003 vlib_cli_output (vm,
"\t\tprefix %U, length %d\n",
4004 format_ip6_address, &p->prefix, p->prefix_len);
4017 "\tND advertised retransmit interval is %d (msec)\n",
4019 adv_time_in_msec_between_retransmitted_neighbor_solicitations);
4024 "\tND router advertisements are sent every %d seconds (min interval is %d)\n",
4025 ra_interval, ra_interval_min);
4027 "\tND router advertisements live for %d seconds\n",
4030 "\tHosts %s stateless autoconfig for addresses\n",
4089 .path =
"show ip6 interface",
4091 .short_help =
"show ip6 interface <interface>",
4121 .ilp_sw_if_index = sw_if_index,
4189 (&link_local_address, eth_if0->
address);
4196 link_local_address.
as_u64[1] =
4199 link_local_address.
as_u64[0] =
4200 clib_host_to_net_u64 (0xFE80000000000000ULL);
4202 link_local_address.
as_u8[8] &= 0xfd;
4207 .ilp_sw_if_index = sw_if_index,
4282 .path =
"enable ip6 interface",
4284 .short_help =
"enable ip6 interface <interface>",
4321 .path =
"disable ip6 interface",
4323 .short_help =
"disable ip6 interface <interface>",
4446 .short_help =
"ip6 nd <interface> ...",
4463 vnm->
api_errno = VNET_API_ERROR_ADDRESS_NOT_LINK_LOCAL;
4499 vnm->
api_errno = VNET_API_ERROR_IP6_NOT_ENABLED;
4544 .path =
"set ip6 link-local address",
4545 .short_help =
"set ip6 link-local address <interface> <ip6-address>",
4559 u32 if_address_index,
u32 is_delete)
4637 u32 new_fib_index,
u32 old_fib_index)
4641 u32 i, *to_re_add = 0;
4646 if (n->key.sw_if_index == sw_if_index)
4647 vec_add1 (to_re_add, n - nm->neighbor_pool);
4651 for (i = 0; i <
vec_len (to_re_add); i++)
4714 (im->discover_neighbor_next_index_by_hw_if_index, 32, 0 );
4755 void *data_callback,
4768 while (p && *p != ~0)
4777 int found = p && *p != ~0;
4781 return VNET_API_ERROR_ENTRY_ALREADY_EXISTS;
4788 .node_index = node_index,
4789 .type_opaque = type_opaque,
4791 .data_callback = data_callback,
4806 return VNET_API_ERROR_NO_SUCH_ENTRY;
4809 void (*fp) (
u32,
u8 *) = data_callback;
4811 (*fp) (mc->
data, 0 );
4818 if (*p == ~0 && p == first)
4832 icmp6_neighbor_solicitation_or_advertisement_header_t *ndh;
4835 if (ndh->icmp.type != ICMP6_neighbor_solicitation &&
4836 ndh->icmp.type != ICMP6_neighbor_advertisement)
4840 (p0->
flags & VLIB_BUFFER_IS_TRACED)))
4856 if (ndh->icmp.type == ICMP6_neighbor_solicitation)
4858 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *opt;
4862 opt = (
void *) (ndh + 1);
4863 if ((opt->header.type !=
4864 ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address) ||
4865 (opt->header.n_data_u64s != 1))
4880 ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address;
4882 ndh->icmp.type = ICMP6_neighbor_advertisement;
4883 ndh->advertisement_flags = clib_host_to_net_u32
4886 ndh->icmp.checksum = 0;
4887 ndh->icmp.checksum =
4892 ICMP6_ERROR_NEIGHBOR_ADVERTISEMENTS_TX, 1);
4913 ip46_address_t nh = {
4919 if (~0 == fib_index)
4920 return VNET_API_ERROR_NO_SUCH_FIB;
4933 sw_if_index, addr,
NULL, 0);
4981 .path =
"set ip6 nd proxy",
4982 .short_help =
"set ip6 nd proxy <HOST> <INTERFACE>",
4997 if (n->key.sw_if_index == sw_if_index)
4999 adj_nbr_walk_nh6 (sw_if_index,
5000 &n->key.ip6_address,
5001 ip6_nd_mk_complete_walk, n);
5027 u8 *rewrite, rewrite_len;
5034 (
"Sending unsolicitated NA IP6 address %U on sw_if_idex %d",
5040 icmp6_neighbor_solicitation_header_t *
h =
5048 IP6_MULTICAST_SCOPE_link_local,
5049 IP6_MULTICAST_GROUP_ID_all_hosts);
5050 h->ip.src_address = ip6_addr[0];
5051 h->neighbor.icmp.type = ICMP6_neighbor_advertisement;
5052 h->neighbor.target_address = ip6_addr[0];
5053 h->neighbor.advertisement_flags = clib_host_to_net_u32
5055 clib_memcpy (h->link_layer_option.ethernet_address,
5057 h->neighbor.icmp.checksum =
5059 ASSERT (bogus_length == 0);
5064 IP6_MULTICAST_GROUP_ID_all_hosts);
5067 rewrite_len =
vec_len (rewrite);
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_SOLICITED
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
ip6_radv_t * if_radv_pool
#define MIN_DELAY_BETWEEN_RAS
static void ip6_neighbor_adj_fib_add(ip6_neighbor_t *n, u32 fib_index)
#define vnet_rewrite_one_header(rw0, p0, most_likely_size)
#define DEF_DEF_RTR_LIFETIME
static void ip6_nd_mk_incomplete(adj_index_t ai)
#define pool_next_index(P, I)
Return next occupied pool index after i, useful for safe iteration.
fib_node_index_t fib_table_entry_path_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_mpls_label_t *next_hop_labels, fib_route_path_flags_t path_flags)
Add one path to an entry (aka route) in the FIB.
u32 vlib_buffer_add_data(vlib_main_t *vm, vlib_buffer_free_list_index_t free_list_index, u32 buffer_index, void *data, u32 n_data_bytes)
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
icmp6_router_solicitation_or_advertisement_next_t
ip6_discover_neighbor_next_t
static void ip6_neighbor_syslog(vlib_main_t *vm, int priority, char *fmt,...)
#define ICMP6_ROUTER_DISCOVERY_FLAG_OTHER_CONFIG_VIA_DHCP
static uword random_default_seed(void)
Default random seed (unix/linux user-mode)
static void vlib_buffer_reset(vlib_buffer_t *b)
Reset current header & length to state they were in when packet was received.
static vlib_node_registration_t ip6_icmp_neighbor_solicitation_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_solicitation_node)
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
void send_ip6_na_w_addr(vlib_main_t *vm, const ip6_address_t *ip6_addr, u32 sw_if_index)
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
int ip6_neighbor_ra_prefix(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *prefix_addr, u8 prefix_len, u8 use_default, u32 val_lifetime, u32 pref_lifetime, u8 no_advertise, u8 off_link, u8 no_autoconfig, u8 no_onlink, u8 is_no)
An indication that the rewrite is incomplete, i.e.
uword ip6_ra_publisher_node
static void ip6_nbr_probe(ip_adjacency_t *adj)
static clib_error_t * ip6_neighbor_init(vlib_main_t *vm)
static void vlib_set_next_frame_buffer(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 buffer_index)
ip_interface_address_t * if_address_pool
Pool of addresses that are assigned to interfaces.
An indication that the rewrite is complete, i.e.
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
static char * log_level_strings[]
ip6_multicast_address_scope_t
static void stop_sending_rs(vlib_main_t *vm, ip6_radv_t *ra)
static void ip6_nd_mk_complete(adj_index_t ai, ip6_neighbor_t *nbr)
mhash_t neighbor_index_by_key
void icmp6_send_router_solicitation(vlib_main_t *vm, u32 sw_if_index, u8 stop, icmp6_send_router_solicitation_params_t *params)
static void ip6_neighbor_del_mld_prefix(ip6_radv_t *radv_info, ip6_address_t *addr)
Delete a multicast Address from the advertised MLD set.
static clib_error_t * set_ip6_nd_proxy_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void vlib_error_count(vlib_main_t *vm, uword node_index, uword counter, uword increment)
static ip6_address_t * ip6_interface_address_matching_destination(ip6_main_t *im, ip6_address_t *dst, u32 sw_if_index, ip_interface_address_t **result_ia)
static uword ip6_address_is_local_unicast(ip6_address_t *a)
clib_error_t * call_ip6_neighbor_callbacks(void *data, _vnet_ip6_neighbor_function_list_elt_t *elt)
void send_ip6_na(vlib_main_t *vm, u32 sw_if_index)
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
uword mhash_unset(mhash_t *h, void *key, uword *old_value)
static f64 vlib_time_now(vlib_main_t *vm)
ip6_radv_prefix_t * adv_prefixes_pool
static void * clib_random_buffer_get_data(clib_random_buffer_t *b, uword n_bytes)
#define ethernet_buffer_header_size(b)
Determine the size of the Ethernet headers of the current frame in the buffer.
static uword ip6_address_is_global_unicast(ip6_address_t *a)
static void wc_nd_signal_report(wc_nd_report_t *r)
ip6_neighbor_t * ip6_neighbors_entries(u32 sw_if_index)
pending_resolution_t * pending_resolutions
static vlib_cli_command_t set_ip6_neighbor_command
(constructor) VLIB_CLI_COMMAND (set_ip6_neighbor_command)
static uword ip6_discover_neighbor_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_glean)
This packet is to be rewritten and forwarded to the next processing node.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
ip6_address_t * ip6_interface_first_address(ip6_main_t *im, u32 sw_if_index)
get first IPv6 interface address
word vnet_sw_interface_compare(vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
struct ip_adjacency_t_::@43::@44 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
static u64 clib_cpu_time_now(void)
#define IP6_NBR_MK_KEY(k, sw_if_index, addr)
int ip6_get_ll_address(u32 sw_if_index, ip6_address_t *addr)
int ip6_neighbor_proxy_add_del(u32 sw_if_index, ip6_address_t *addr, u8 is_del)
adj_index_t adj_glean_get(fib_protocol_t proto, u32 sw_if_index)
Get an existing glean.
#define STRUCT_OFFSET_OF(t, f)
u32 adv_pref_lifetime_in_secs
#define DEF_ADV_PREF_LIFETIME
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
u32 ip6_neighbor_sw_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
create and initialize router advertisement parameters with default values for this intfc ...
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
unformat_function_t unformat_vnet_sw_interface
static u64 random_u64(u64 *seed)
64-bit random number generator Again, constants courtesy of Donald Knuth.
int vnet_add_del_ip6_nd_change_event(vnet_main_t *vnm, void *data_callback, u32 pid, void *address_arg, uword node_index, uword type_opaque, uword data, int is_add)
#define VNET_HW_INTERFACE_FLAG_LINK_UP
u32 adv_neighbor_reachable_time_in_msec
uword ip6_ra_publisher_et
vlib_error_t * errors
Vector of errors for this node.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define hash_v3_mix32(a, b, c)
format_function_t format_vnet_sw_if_index_name
static vlib_buffer_t * vlib_buffer_copy(vlib_main_t *vm, vlib_buffer_t *b)
clib_error_t * disable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
union ip_adjacency_t_::@43 sub_type
vnet_link_t ia_link
link/ether-type 1 bytes
vlib_node_registration_t ip6_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_mcast_node)
static uword ip6_neighbor_process_timer_event(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Adjacency to punt this packet.
vlib_packet_template_t discover_neighbor_packet_template
ip6_neighbor_flags_t flags
static vlib_buffer_t * create_buffer_for_rs(vlib_main_t *vm, ip6_radv_t *radv_info)
void adj_glean_update_rewrite(adj_index_t adj_index)
adj_glean_update_rewrite
ethernet_main_t ethernet_main
fib_node_index_t ip6_fib_table_lookup_exact_match(u32 fib_index, const ip6_address_t *addr, u32 len)
static void ip6_print_addrs(vlib_main_t *vm, u32 *addrs)
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
ip6_neighbor_t * ip6_neighbors_pool(void)
#define static_always_inline
u8 * format_ethernet_address(u8 *s, va_list *args)
void * vlib_packet_template_get_packet(vlib_main_t *vm, vlib_packet_template_t *t, u32 *bi_result)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static int vnet_nd_wc_publish(u32 sw_if_index, u8 *mac, ip6_address_t *ip6)
publish wildcard arp event
#define VLIB_INIT_FUNCTION(x)
static uword ip6_glean(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
u32 local_interface_sw_if_index
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(ip6_neighbor_sw_interface_up_down)
uword wc_ip6_nd_publisher_node
#define ICMP6_NEIGHBOR_ADVERTISEMENT_FLAG_OVERRIDE
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
static clib_error_t * disable_ip6_interface_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_ip6_neighbor_ip6_entry(u8 *s, va_list *va)
static uword ip6_icmp_neighbor_discovery_event_process(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static clib_error_t * show_ip6_neighbors(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int vnet_set_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address, int is_static, int is_no_fib_entry)
#define DEF_ADV_VALID_LIFETIME
mhash_t address_to_mldp_index
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
Aggregrate type for a prefix.
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
#define clib_error_return(e, args...)
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.
void vl_api_rpc_call_main_thread(void *fp, u8 *data, u32 data_length)
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
clib_error_t * set_ip6_link_local_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address)
static clib_error_t * set_ip6_neighbor(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 * neighbor_input_next_index_by_hw_if_index
int vnet_ip6_nd_term(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *p0, ethernet_header_t *eth, ip6_header_t *ip, u32 sw_if_index, u16 bd_index)
u16 fp_len
The mask length.
const u8 * ethernet_ip6_mcast_dst_addr(void)
static void ra_signal_report(ra_report_t *r)
static f64 random_f64_from_to(f64 from, f64 to)
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
u32 time_in_msec_between_retransmitted_neighbor_solicitations
static u32 vlib_get_buffer_index(vlib_main_t *vm, void *p)
Translate buffer pointer into buffer index.
#define MAX_DELAY_BETWEEN_RAS
static heap_elt_t * first(heap_header_t *h)
f64 max_delay_between_radv
u32 adv_time_in_msec_between_retransmitted_neighbor_solicitations
#define pool_flush(VAR, POOL, BODY)
Remove all elemenets from a pool in a safe way.
vnet_api_error_t api_errno
f64 pref_lifetime_expires
IPv6 ND (seen in the link-local tables)
format_function_t format_vnet_sw_interface_name
void adj_mcast_update_rewrite(adj_index_t adj_index, u8 *rewrite, u8 offset)
adj_mcast_update_rewrite
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
void vnet_register_ip6_neighbor_resolution_event(vnet_main_t *vnm, void *address_arg, uword node_index, uword type_opaque, uword data)
u16 current_length
Nbytes between current data and the end of this buffer.
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
u32 neighbor_reachable_time_in_msec
static void ip6_neighbor_add_mld_grp(ip6_radv_t *a, ip6_multicast_address_scope_t scope, ip6_multicast_link_local_group_id_t group)
Add a multicast Address to the advertised MLD set.
int vnet_unset_ip6_ethernet_neighbor(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, uword n_bytes_link_layer_address)
static void set_unset_ip6_neighbor_rpc(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *a, u8 *link_layer_address, int is_add, int is_static, int is_no_fib_entry)
static char * ip6_discover_neighbor_error_strings[]
static clib_error_t * enable_ip6_interface_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define DEF_MAX_RADV_INTERVAL
#define IP6_MLDP_ALERT_TYPE
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX
u32 limit_neighbor_cache_size
u32 ip6_ll_fib_get(u32 sw_if_index)
For use in the data plane.
#define pool_put(P, E)
Free an object E in pool P.
#define foreach_log_level
enum icmp6_neighbor_discovery_option_type icmp6_neighbor_discovery_option_type_t
static void * vlib_process_signal_event_data(vlib_main_t *vm, uword node_index, uword type_opaque, uword n_data_elts, uword n_data_elt_bytes)
ip6_table_bind_callback_t * table_bind_callbacks
Functions to call when interface to table biding changes.
int ip6_address_compare(ip6_address_t *a1, ip6_address_t *a2)
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
ip6_discover_neighbor_error_t
u32 node_index
Node index.
mhash_t address_to_prefix_index
u16 router_lifetime_in_sec
#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.
static uword mhash_set(mhash_t *h, void *key, uword new_value, uword *old_value)
#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).
ra_report_prefix_info_t * prefixes
static uword ip6_discover_neighbor(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
ip6_add_del_interface_address_callback_t * add_del_interface_address_callbacks
void ra_set_publisher_node(uword node_index, uword event_type)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
void ip6_link_local_address_from_ethernet_mac_address(ip6_address_t *ip, u8 *mac)
static void ip6_neighbor_add_mld_prefix(ip6_radv_t *radv_info, ip6_address_t *addr)
Add a multicast Address to the advertised MLD set.
vlib_node_registration_t ip6_icmp_input_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_input_node)
#define pool_free(p)
Free a pool.
ip6_mldp_group_t * mldp_group_pool
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)
void wc_nd_set_publisher_node(uword node_index, uword event_type)
clib_error_t * enable_ip6_interface(vlib_main_t *vm, u32 sw_if_index)
void ip6_mfib_interface_enable_disable(u32 sw_if_index, int is_enable)
Add/remove the interface from the accepting list of the special MFIB entries.
icmp6_neighbor_solicitation_or_advertisement_next_t
static uword icmp6_neighbor_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
static int ip6_src_address_for_packet(ip_lookup_main_t *lm, u32 sw_if_index, const ip6_address_t *dst, ip6_address_t *src)
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
u32 n_solicitations_dropped
Adjacency to drop this packet.
#define VLIB_REGISTER_NODE(x,...)
static void vlib_buffer_copy_trace_flag(vlib_main_t *vm, vlib_buffer_t *b, u32 bi_target)
void mhash_init(mhash_t *h, uword n_value_bytes, uword n_key_bytes)
static u8 get_mac_address(u32 sw_if_index, u8 *address)
static_always_inline uword vlib_get_thread_index(void)
static ip6_address_t ip6a_zero
static int ra_publish(ra_report_t *r)
ip6_address_t mcast_address
static void ip6_neighbor_adj_fib_remove(ip6_neighbor_t *n, u32 fib_index)
#define vec_free(V)
Free vector's memory (no header).
Multicast Midchain Adjacency.
#define clib_warning(format, args...)
ip6_address_t * mcast_source_address_pool
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
#define clib_memcpy(a, b, c)
static void ip6_neighbor_table_bind(ip6_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
#define DEF_CURR_HOP_LIMIT
int adv_link_layer_address
u32 fib_node_index_t
A typedef of a node index.
static vlib_cli_command_t show_ip6_neighbors_command
(constructor) VLIB_CLI_COMMAND (show_ip6_neighbors_command)
fib_node_index_t fib_entry_index
u32 adj_index_t
An index for adjacencies.
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
#define ELOG_TYPE_DECLARE(f)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static bool check_send_rs(vlib_main_t *vm, ip6_radv_t *radv_info, f64 current_time, f64 *due_time)
static void * ip6_next_header(ip6_header_t *i)
ip6_address_t ilp_addr
the IP6 address
#define VLIB_CLI_COMMAND(x,...)
u32 initial_adverts_count
This packets follow a mid-chain adjacency.
u32 * if_address_pool_index_by_sw_if_index
Head of doubly linked list of interface addresses for each software interface.
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
ip6_add_del_interface_address_function_t * function
f64 valid_lifetime_expires
#define MAX_INITIAL_RTR_ADVERTISEMENTS
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
ip6_address_t link_local_address
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
vlib_node_registration_t send_rs_process_node
(constructor) VLIB_REGISTER_NODE (send_rs_process_node)
u32 neighbor_delete_rotor
static uword * mhash_get(mhash_t *h, const void *key)
ip6_address_t ip6_address
ip_lookup_main_t lookup_main
u32 n_advertisements_sent
static void mhash_free(mhash_t *h)
static vlib_buffer_free_list_index_t vlib_buffer_get_free_list_index(vlib_buffer_t *b)
static clib_error_t * show_ip6_interface_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 vlib_register_node(vlib_main_t *vm, vlib_node_registration_t *r)
#define hash_v3_finalize32(a, b, c)
f64 min_delay_between_radv
uword wc_ip6_nd_publisher_et
#define DEF_MIN_RADV_INTERVAL
static_always_inline uword icmp6_router_solicitation(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static int ip6_neighbor_sort(void *a1, void *a2)
static uword send_rs_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f0)
u32 * if_radv_pool_index_by_sw_if_index
u16 adv_router_lifetime_in_sec
static f64 random_f64(u32 *seed)
Generate f64 random number in the interval [0,1].
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
Aggregrate type for a prefix in the IPv6 Link-local table.
int deprecated_prefix_flag
ip6_multicast_link_local_group_id_t
static uword ip6_address_is_link_local_unicast(const ip6_address_t *a)
Route added as a result of interface configuration.
void fib_table_entry_path_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_route_path_flags_t path_flags)
remove one path to an entry (aka route) in the FIB.
mhash_t pending_resolutions_by_address
static uword icmp6_neighbor_solicitation(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static adj_walk_rc_t ip6_nd_mk_incomplete_walk(adj_index_t ai, void *ctx)
static vlib_main_t * vlib_get_main(void)
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
static u32 vlib_buffer_alloc_from_free_list(vlib_main_t *vm, u32 *buffers, u32 n_buffers, vlib_buffer_free_list_index_t index)
Allocate buffers from specific freelist into supplied array.
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
icmp6_send_router_solicitation_params_t params
ip6_address_t ip6_neighbor_get_link_local_address(u32 sw_if_index)
static ip6_neighbor_t * force_reuse_neighbor_entry(void)
struct _vlib_node_registration vlib_node_registration_t
void ethernet_ndp_change_mac(u32 sw_if_index)
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
This packets needs to go to ICMP error.
This packet is for one of our own IP addresses.
static vlib_node_registration_t ip6_icmp_router_solicitation_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_router_solicitation_node)
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)
clib_error_t * set_ip6_link_local_address_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void ip6_neighbor_send_mldpv2_report(u32 sw_if_index)
vlib_node_registration_t ip6_icmp_neighbor_discovery_event_node
static void * vlib_process_get_event_data(vlib_main_t *vm, uword *return_event_type_opaque)
static void ip6_neighbor_set_unset_rpc_callback(ip6_neighbor_set_unset_rpc_args_t *a)
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
static void ip6_set_solicited_node_multicast_address(ip6_address_t *a, u32 id)
#define FIB_NODE_INDEX_INVALID
u32 elog_string(elog_main_t *em, char *fmt,...)
add a string to the event-log string table
void icmp6_register_type(vlib_main_t *vm, icmp6_type_t type, u32 node_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b)
ip6_neighbor_public_main_t ip6_neighbor_public_main
format_function_t format_vlib_time
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
int ip6_neighbor_ra_config(vlib_main_t *vm, u32 sw_if_index, u8 suppress, u8 managed, u8 other, u8 ll_option, u8 send_unicast, u8 cease, u8 use_lifetime, u32 lifetime, u32 initial_count, u32 initial_interval, u32 max_interval, u32 min_interval, u8 is_no)
static void ip6_neighbor_add_del_interface_address(ip6_main_t *im, uword opaque, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 if_address_index, u32 is_delete)
callback when an interface address is added or deleted
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
ip6_table_bind_function_t * function
void ip6_ll_table_entry_delete(const ip6_ll_prefix_t *ilp)
Delete a IP6 link-local entry.
u8 * ethernet_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
build a rewrite string to use for sending packets of type 'link_type' to 'dst_address' ...
l2_bridge_domain_t * bd_configs
#define ICMP6_ROUTER_DISCOVERY_FLAG_ADDRESS_CONFIG_VIA_DHCP
vlib_node_registration_t ip6_glean_node
(constructor) VLIB_REGISTER_NODE (ip6_glean_node)
int decrement_lifetime_flag
#define hash_get_mem(h, key)
struct clib_bihash_value offset
template key/value backing page structure
static vlib_node_registration_t ip6_icmp_neighbor_advertisement_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_neighbor_advertisement_node)
static void vlib_buffer_init_for_free_list(vlib_buffer_t *dst, vlib_buffer_free_list_t *fl)
static clib_error_t * ip6_neighbor_sw_interface_up_down(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
f64 initial_adverts_interval
static u32 random_u32(u32 *seed)
32-bit random number generator
vnet_sw_interface_type_t type
adj_index_t mcast_adj_index
ip6_icmp_neighbor_discovery_event_type_t
adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto, vnet_link_t link_type, u32 sw_if_index)
Mcast Adjacency.
vlib_node_registration_t ip6_discover_neighbor_node
(constructor) VLIB_REGISTER_NODE (ip6_discover_neighbor_node)
#define vec_foreach(var, vec)
Vector iterator.
static uword ip6_address_is_unspecified(ip6_address_t *a)
void ip6_ethernet_update_adjacency(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
void ip6_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
u16 flags
Copy of main node flags.
u32 adv_valid_lifetime_in_secs
clib_error_t * ip6_add_del_interface_address(vlib_main_t *vm, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 is_del)
static void ip6_multicast_ethernet_address(u8 *ethernet_address, u32 group_id)
static vlib_buffer_free_list_t * vlib_buffer_get_free_list(vlib_main_t *vm, vlib_buffer_free_list_index_t free_list_index)
static void * ip_interface_address_get_address(ip_lookup_main_t *lm, ip_interface_address_t *a)
static ip6_neighbor_t * ip6_nd_find(u32 sw_if_index, const ip6_address_t *addr)
mhash_t mac_changes_by_address
static void ip6_link_local_address_from_ethernet_address(ip6_address_t *a, u8 *ethernet_address)
static adj_walk_rc_t ip6_nd_mk_complete_walk(adj_index_t ai, void *ctx)
#define MAX_INITIAL_RTR_ADVERT_INTERVAL
#define VLIB_NODE_FLAG_TRACE
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
fib_node_index_t ip6_ll_table_entry_update(const ip6_ll_prefix_t *ilp, fib_route_path_flags_t flags)
Update an entry in the table.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
clib_error_t * ip6_neighbor_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
f64 max_rtr_default_lifetime
static vlib_node_registration_t ip6_icmp_router_advertisement_node
(constructor) VLIB_REGISTER_NODE (ip6_icmp_router_advertisement_node)
ip6_neighbor_t * neighbor_pool
void adj_nbr_update_rewrite(adj_index_t adj_index, adj_nbr_rewrite_flag_t flags, u8 *rewrite)
adj_nbr_update_rewrite
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
ip6_address_t dst_address
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
clib_random_buffer_t random_buffer
static_always_inline uword icmp6_router_advertisement(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
#define MAX_DEF_RTR_LIFETIME
static ip6_neighbor_main_t ip6_neighbor_main
pending_resolution_t * mac_changes
int ip6_interface_enabled(vlib_main_t *vm, u32 sw_if_index)
static void ip6_set_reserved_multicast_address(ip6_address_t *a, ip6_multicast_address_scope_t scope, u16 id)
u32 next_this_sw_interface
clib_error_t * ip6_set_neighbor_limit(u32 neighbor_limit)
format_function_t format_icmp6_input_trace
u8 * format_ip6_forward_next_trace(u8 *s, va_list *args)
void adj_nbr_walk_nh6(u32 sw_if_index, const ip6_address_t *addr, adj_walk_cb_t cb, void *ctx)
Walk adjacencies on a link with a given v6 next-hop.
static uword pool_elts(void *v)
Number of active elements in a pool.