PUNT socket: External control plane processes connected via UNIX domain sockets. 21/6721/15
authorOle Troan <ot@cisco.com>
Tue, 16 May 2017 12:59:29 +0000 (14:59 +0200)
committerDamjan Marion <dmarion.lists@gmail.com>
Tue, 5 Sep 2017 12:07:22 +0000 (12:07 +0000)
commitf7a55ad74c90928d86f1bbf56590d9571c1b828f
treee00a9cfa4d28e2f8bf4acc6d4c95ccee03fb6f45
parent809bc74b5b73634678e6f1444344fd1c0a89e877
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>
src/vnet/ip/punt.c
src/vnet/ip/punt.h
src/vnet/ip/punt_error.def
src/vpp/api/api.c
src/vpp/api/vpe.api