VPP-1506: dump local punts and registered punt sockets
[vpp.git] / src / vnet / ip / punt.h
index 0103249..0518b2b 100644 (file)
@@ -20,7 +20,9 @@
 #ifndef included_punt_h
 #define included_punt_h
 
-#include <sys/un.h>
+#include <linux/un.h>
+#include <stdbool.h>
+
 typedef enum
 {
 #define punt_error(n,s) PUNT_ERROR_##n,
@@ -62,6 +64,7 @@ typedef struct __attribute__ ((packed))
  */
 typedef struct
 {
+  u8 protocol;
   u16 port;
   struct sockaddr_un caddr;
 } punt_client_t;
@@ -72,7 +75,7 @@ typedef struct
   char sun_path[sizeof (struct sockaddr_un)];
   punt_client_t *clients_by_dst_port4;
   punt_client_t *clients_by_dst_port6;
-  u32 unix_file_index;
+  u32 clib_file_index;
   bool is_configured;
   vlib_node_t *interface_output_node;
   u32 *ready_fds;
@@ -80,6 +83,15 @@ typedef struct
 } punt_main_t;
 extern punt_main_t punt_main;
 
+typedef struct punt_socket_detail_t_
+{
+  u8 ipv;
+  u8 l4_protocol;
+  u16 l4_port;
+  u8 pathname[108];
+} punt_socket_detail_t;
+
+punt_socket_detail_t *punt_socket_entries (u8 ipv);
 #endif
 
 /*