aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp/api/vpe.api
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2017-05-16 14:59:29 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-05 12:07:22 +0000
commitf7a55ad74c90928d86f1bbf56590d9571c1b828f (patch)
treee00a9cfa4d28e2f8bf4acc6d4c95ccee03fb6f45 /src/vpp/api/vpe.api
parent809bc74b5b73634678e6f1444344fd1c0a89e877 (diff)
PUNT socket: External control plane processes connected via UNIX domain sockets.
An external (to VPP) process can register (over the VPP binary API) to receive control plane packets over a UNIX domain socket. The packets are prepended with a packet descriptor containing meta-data (if_index of interface, etc). Currently only UDP is supported. The socket supports sending of packets/frames as well. The sent packet is prepended with a descriptor, telling VPP to route the packet (via ip4-lookup, ip6-lookup) or as an pre-formed Ethernet frame that is sent directly to interface-output. The intended use case for this is for an external DHCP client or a RIP implementation. New configuration option: punt { socket <socket path> } To register use the punt_socket API message. TODO: - Add support for pre-routing. I.e send L3 packet to given TX interface, but do ARP/ND (ip[46]-rewrite) - Add test scripts - Support for abstract names (starting with \0) - Add rate limiting (COP) - Support for other protocols, e.g. IPv6 ND Change-Id: I4a0afc8020deebb3d9d74686dde694ee5bcb8d0f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp/api/vpe.api')
-rw-r--r--src/vpp/api/vpe.api33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/vpp/api/vpe.api b/src/vpp/api/vpe.api
index ec5ffbe9..0dee1533 100644
--- a/src/vpp/api/vpe.api
+++ b/src/vpp/api/vpe.api
@@ -991,6 +991,39 @@ autoreply define punt {
u16 l4_port;
};
+/** \brief Punt traffic to the host via socket
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param header_version - expected meta data header version (currently 1)
+ @param is_ip4 - L3 protocol 1 - IPv4, 0 - IPv6
+ @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
+ @param l4_port - TCP/UDP port to be punted
+*/
+define punt_socket_register {
+ u32 client_index;
+ u32 context;
+ u32 header_version;
+ u8 is_ip4;
+ u8 l4_protocol;
+ u16 l4_port;
+ u8 pathname[64];
+};
+
+define punt_socket_register_reply
+{
+ u32 context;
+ i32 retval;
+ u8 pathname[64];
+};
+
+autoreply define punt_socket_deregister {
+ u32 client_index;
+ u32 context;
+ u8 is_ip4;
+ u8 l4_protocol;
+ u16 l4_port;
+};
+
/** \brief Feature path enable/disable request
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request