vcl: add api to retrieve num bytes for tx
[vpp.git] / src / vnet / ppp / ppp.c
index a0eefba..8aa8504 100644 (file)
@@ -65,7 +65,7 @@ format_ppp_header_with_length (u8 * s, va_list * args)
   ppp_header_t *h = va_arg (*args, ppp_header_t *);
   u32 max_header_bytes = va_arg (*args, u32);
   ppp_protocol_t p = clib_net_to_host_u16 (h->protocol);
-  uword indent, header_bytes;
+  u32 indent, header_bytes;
 
   header_bytes = sizeof (h[0]);
   if (max_header_bytes != 0 && header_bytes > max_header_bytes)
@@ -197,7 +197,6 @@ ppp_build_rewrite (vnet_main_t * vnm,
   return (rewrite);
 }
 
-/* *INDENT-OFF* */
 VNET_HW_INTERFACE_CLASS (ppp_hw_interface_class) = {
   .name = "PPP",
   .format_header = format_ppp_header_with_length,
@@ -205,7 +204,6 @@ VNET_HW_INTERFACE_CLASS (ppp_hw_interface_class) = {
   .build_rewrite = ppp_build_rewrite,
   .flags = VNET_HW_INTERFACE_CLASS_FLAG_P2P,
 };
-/* *INDENT-ON* */
 
 static void
 add_protocol (ppp_main_t * pm, ppp_protocol_t protocol, char *protocol_name)
@@ -229,7 +227,7 @@ ppp_init (vlib_main_t * vm)
 {
   ppp_main_t *pm = &ppp_main;
 
-  memset (pm, 0, sizeof (pm[0]));
+  clib_memset (pm, 0, sizeof (pm[0]));
   pm->vlib_main = vm;
 
   pm->protocol_info_by_name = hash_create_string (0, sizeof (uword));
@@ -244,14 +242,6 @@ ppp_init (vlib_main_t * vm)
 
 VLIB_INIT_FUNCTION (ppp_init);
 
-ppp_main_t *
-ppp_get_main (vlib_main_t * vm)
-{
-  vlib_call_init_function (vm, ppp_init);
-  return &ppp_main;
-}
-
-
 /*
  * fd.io coding-style-patch-verification: ON
  *