diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-02-05 17:28:51 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-02-27 11:11:24 +0100 |
| commit | 0f4977c6689441e7b3075fc7a82c1ddc9ffdfa1c (patch) | |
| tree | a4679fd142c21212e652e3253c23bec821fff7b4 /lib/vrf.h | |
| parent | 516d7591d68cf4537bb7f0603ff703e808381d03 (diff) | |
lib: add vrf-lite bind capability to vrf APIs
Because socket creation is tightly linked with socket binding for vrf
lite, the proposal is made to extend socket creation APIs and to create
a new API called vrf_bind that applies to vrf lite. The passed interface
name is the interface that will be bound to the socket passed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/vrf.h')
| -rw-r--r-- | lib/vrf.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -207,9 +207,13 @@ extern void vrf_terminate(void); /* Create a socket serving for the given VRF */ extern int vrf_socket(int domain, int type, - int protocol, vrf_id_t vrf_id); + int protocol, vrf_id_t vrf_id, + char *name); + extern int vrf_sockunion_socket(const union sockunion *su, - vrf_id_t vrf_id); + vrf_id_t vrf_id, char *name); + +extern int vrf_bind(vrf_id_t vrf_id, int fd, char *name); /* VRF ioctl operations */ extern int vrf_getaddrinfo(const char *node, const char *service, |
