/**
* @brief publish wildcard arp event
- * @param sw_if_index The interface on which the ARP entires are acted
+ * @param sw_if_index The interface on which the ARP entries are acted
*/
static int
vnet_nd_wc_publish (u32 sw_if_index,
ip6_neighbor_t *n = va_arg (*va, ip6_neighbor_t *);
vnet_main_t *vnm = vnet_get_main ();
vnet_sw_interface_t *si;
- u8 *flags = 0;
if (!n)
return format (s, "%=12s%=45s%=6s%=20s%=40s", "Time", "Address", "Flags",
"Link layer", "Interface");
- if (n->flags & IP_NEIGHBOR_FLAG_DYNAMIC)
- flags = format (flags, "D");
-
- if (n->flags & IP_NEIGHBOR_FLAG_STATIC)
- flags = format (flags, "S");
-
- if (n->flags & IP_NEIGHBOR_FLAG_NO_FIB_ENTRY)
- flags = format (flags, "N");
-
si = vnet_get_sw_interface (vnm, n->key.sw_if_index);
- s = format (s, "%=12U%=45U%=6s%=20U%=40U",
- format_vlib_time, vm, n->time_last_updated,
- format_ip6_address, &n->key.ip6_address,
- flags ? (char *) flags : "",
- format_mac_address_t, &n->mac,
- format_vnet_sw_interface_name, vnm, si);
-
- vec_free (flags);
- return s;
+
+ return format (s, "%=12U%=45U%=6U%=20U%=40U",
+ format_vlib_time, vm, n->time_last_updated,
+ format_ip6_address, &n->key.ip6_address,
+ format_ip_neighbor_flags, n->flags,
+ format_mac_address_t, &n->mac,
+ format_vnet_sw_interface_name, vnm, si);
}
static void
* Complete the remaining fields of the adj's rewrite to direct the
* complete of the rewrite at switch time by copying in the IP
* dst address's bytes.
- * Ofset is 2 bytes into the desintation address.
+ * Ofset is 2 bytes into the destintation address.
*/
offset = vec_len (rewrite) - 2;
adj_mcast_update_rewrite (ai, rewrite, offset);
clib_memcpy (a->link_layer_address, eth_if0->address, 6);
/* fill in default link-local address (this may be overridden) */
- ip6_link_local_address_from_ethernet_address
+ ip6_link_local_address_from_ethernet_mac_address
(&a->link_local_address, eth_if0->address);
mhash_init (&a->address_to_prefix_index, sizeof (uword),
ip6_radv_t *radv_info;
ip6_address_t a;
- /* create solicited node multicast address for this interface adddress */
+ /* create solicited node multicast address for this interface address */
ip6_set_solicited_node_multicast_address (&a, 0);
a.as_u8[0xd] = address->as_u8[0xd];