tcp: Do not include the tcp_packet.h file in the ip4_packet.h
[vpp.git] / src / vnet / ip6-nd / ip6_mld.c
index bd5f848..ea70bcc 100644 (file)
 #include <vnet/ip/ip.h>
 #include <vnet/ip-neighbor/ip_neighbor_dp.h>
 
-#include <vnet/fib/ip6_fib.h>
 #include <vnet/ip/ip6_link.h>
 #include <vnet/ip/ip6_ll_table.h>
 
+#include <vnet/ethernet/ethernet.h>
+
 /**
  * @file
  * @brief IPv6 Neighbor Adjacency and Neighbor Discovery.
@@ -135,12 +136,12 @@ ip6_neighbor_del_mld_prefix (ip6_mld_t * imd, ip6_address_t * addr)
   ip6_mldp_group_t *mcast_group_info;
   uword *p;
 
-  p = mhash_get (&imd->address_to_mldp_index, &addr);
+  p = mhash_get (&imd->address_to_mldp_index, addr);
   mcast_group_info = p ? pool_elt_at_index (imd->mldp_group_pool, p[0]) : 0;
 
   if (mcast_group_info)
     {
-      mhash_unset (&imd->address_to_mldp_index, &addr,
+      mhash_unset (&imd->address_to_mldp_index, addr,
                   /* old_value */ 0);
       pool_put (imd->mldp_group_pool, mcast_group_info);
     }
@@ -257,7 +258,7 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index)
   icmp6_multicast_listener_report_header_t *rh0;
   icmp6_multicast_listener_report_packet_t *rp0;
 
-  if (! !vnet_sw_interface_is_admin_up (vnm, sw_if_index))
+  if (!vnet_sw_interface_is_admin_up (vnm, sw_if_index))
     return;
 
   imd = ip6_mld_get_itf (sw_if_index);
@@ -326,8 +327,8 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index)
   rh0->icmp.checksum = 0;
 
   /* *INDENT-OFF* */
-  pool_foreach (m, imd->mldp_group_pool,
-  ({
+  pool_foreach (m, imd->mldp_group_pool)
+   {
     rr.type = m->type;
     rr.aux_data_len_u32s = 0;
     rr.num_sources = clib_host_to_net_u16 (m->num_sources);
@@ -343,7 +344,7 @@ ip6_neighbor_send_mldpv2_report (u32 sw_if_index)
       }
 
     payload_length += sizeof( icmp6_multicast_address_record_t);
-  }));
+  }
   /* *INDENT-ON* */
 
   rh0->rsvd = 0;
@@ -388,22 +389,22 @@ ip6_mld_timer_event (vlib_main_t * vm,
 
   /* Interface ip6 radv info list */
   /* *INDENT-OFF* */
-  pool_foreach (imd, ip6_mld_pool,
-  ({
-    if(!vnet_sw_interface_is_admin_up (vnm, imd->sw_if_index))
+  pool_foreach (imd, ip6_mld_pool)
+   {
+    if (!vnet_sw_interface_is_admin_up (vnm, imd->sw_if_index))
       {
         imd->all_routers_mcast = 0;
         continue;
       }
 
     /* Make sure that we've joined the all-routers multicast group */
-    if(!imd->all_routers_mcast)
+    if (!imd->all_routers_mcast)
       {
         /* send MDLP_REPORT_EVENT message */
         ip6_neighbor_send_mldpv2_report(imd->sw_if_index);
         imd->all_routers_mcast = 1;
       }
-  }));
+  }
   /* *INDENT-ON* */
 
   return 0;
@@ -453,13 +454,13 @@ format_ip6_mld (u8 * s, va_list * args)
   s = format (s, "%UJoined group address(es):\n", format_white_space, indent);
 
   /* *INDENT-OFF* */
-  pool_foreach (m, imd->mldp_group_pool,
-  ({
+  pool_foreach (m, imd->mldp_group_pool)
+   {
     s = format (s, "%U%U\n",
                 format_white_space, indent+2,
                 format_ip6_address,
                 &m->mcast_address);
-  }));
+  }
   /* *INDENT-ON* */
 
   return (s);