summaryrefslogtreecommitdiff
path: root/lib/vrf.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-02-05 17:28:51 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commit0f4977c6689441e7b3075fc7a82c1ddc9ffdfa1c (patch)
treea4679fd142c21212e652e3253c23bec821fff7b4 /lib/vrf.h
parent516d7591d68cf4537bb7f0603ff703e808381d03 (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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/vrf.h b/lib/vrf.h
index cb4159a0a3..062e6f3d8d 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -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,