summaryrefslogtreecommitdiff
path: root/accel-pppd/include
diff options
context:
space:
mode:
authorDmitriyEshenko <dmitriy.eshenko@vyos.io>2021-12-10 19:43:42 +0300
committerDmitriyEshenko <dmitriy.eshenko@vyos.io>2021-12-16 23:03:52 +0300
commit737bf4d8b6e9e1bf50be69e8c99028bb2696190c (patch)
tree0fb5c5234841d6dbdd16bf5cfd18e0c841177243 /accel-pppd/include
parent51bd8165bb335a8db966c4df344810e7ef2c563c (diff)
downloadaccel-ppp-737bf4d8b6e9e1bf50be69e8c99028bb2696190c.tar.gz
accel-ppp-737bf4d8b6e9e1bf50be69e8c99028bb2696190c.zip
vrf: T10: Add VRF support
Co-authored-by: Sergey V. Lobanov <svlobanov@users.noreply.github.com> Co-authored-by: Vladislav Grishenko <themiron@users.noreply.github.com>
Diffstat (limited to 'accel-pppd/include')
-rw-r--r--accel-pppd/include/ap_net.h5
-rw-r--r--accel-pppd/include/ap_session.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/accel-pppd/include/ap_net.h b/accel-pppd/include/ap_net.h
index 984c6c1..063b893 100644
--- a/accel-pppd/include/ap_net.h
+++ b/accel-pppd/include/ap_net.h
@@ -6,6 +6,7 @@
#include "libnetlink.h"
#include "list.h"
+#include "config.h"
struct ap_net {
struct list_head entry;
@@ -33,6 +34,10 @@ struct ap_net {
int (*move_link)(struct ap_net *net, int ifindex);
int (*get_ifindex)(const char * ifname);
void (*release)(struct ap_net *net);
+#ifdef HAVE_VRF
+ int (*set_vrf)(int ifindex, int vrf_ifindex);
+#endif
+
};
extern __thread struct ap_net *net;
diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h
index 7efa110..1227718 100644
--- a/accel-pppd/include/ap_session.h
+++ b/accel-pppd/include/ap_session.h
@@ -73,6 +73,7 @@ struct ap_session
char *chan_name;
char ifname[AP_IFNAME_LEN];
char *ifname_rename;
+ char *vrf_name;
int unit_idx;
int ifindex;
char sessionid[AP_SESSIONID_LEN+1];
@@ -151,6 +152,9 @@ int ap_check_username(const char *username);
void ap_session_ifup(struct ap_session *ses);
void ap_session_ifdown(struct ap_session *ses);
int ap_session_rename(struct ap_session *ses, const char *ifname, int len);
+#ifdef HAVE_VRF
+int ap_session_vrf(struct ap_session *ses, const char *vrf_name, int len);
+#endif
int ap_session_read_stats(struct ap_session *ses, struct rtnl_link_stats *stats);