summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe/vpppoe.h
diff options
context:
space:
mode:
authorAndrii Melnychenko <a.melnychenko@vyos.io>2025-06-09 15:00:35 +0200
committerAndrii Melnychenko <a.melnychenko@vyos.io>2025-06-09 15:05:15 +0200
commit2b6b833a792734f29cd340359ee0d698eff46419 (patch)
tree305f80e87c121c46f49a382bd2a21617618fdd87 /accel-pppd/ctrl/pppoe/vpppoe.h
parentce7d56b27ea0a0be4d89eb4739c95790a4fc724c (diff)
downloadaccel-ppp-ng-VPP_POC.tar.gz
accel-ppp-ng-VPP_POC.zip
PoC: VPP added async VPP client.VPP_POC
Also, fixed a few crashes related to file descriptor closing. Added a few options for auditing accel - vpp behaviour. Signed-off-by: Andrii Melnychenko <a.melnychenko@vyos.io>
Diffstat (limited to 'accel-pppd/ctrl/pppoe/vpppoe.h')
-rw-r--r--accel-pppd/ctrl/pppoe/vpppoe.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/accel-pppd/ctrl/pppoe/vpppoe.h b/accel-pppd/ctrl/pppoe/vpppoe.h
index 5b41070..d56bd74 100644
--- a/accel-pppd/ctrl/pppoe/vpppoe.h
+++ b/accel-pppd/ctrl/pppoe/vpppoe.h
@@ -1,13 +1,26 @@
#ifndef VPPPOE_H
#define VPPPOE_H
-void vpppoe_init();
void vpppoe_get();
void vpppoe_put();
-int vpppoe_pppoe_session_add_del(uint8_t *client_mac, in_addr_t *client_ip, uint16_t session_id, int is_add, uint32_t *out_ifindex);
-int vpppoe_get_sw_ifname_by_index(uint32_t sw_ifindex, char *ifname, size_t len);
-int vpppoe_lcp_tun_add_del(uint32_t ifindex, const char *host_if_name, int is_add);
-int vpppoe_set_feature(uint32_t ifindex, int is_enabled, const char *feature, const char *arc);
+struct triton_context_t;
+
+typedef struct vpppoe_setup_pppoe_interface_ctx_t
+{
+ struct triton_context_t *tctx;
+ void (*callback)(struct vpppoe_setup_pppoe_interface_ctx_t *ctx);
+ void *priv;
+
+ int remove_after;
+
+ /* Output values */
+ int err; /* 0 - OK */
+ uint32_t ifindex;
+ char ifname[16];
+} vpppoe_setup_pppoe_interface_ctx_t;
+
+int vpppoe_async_add_pppoe_interface(uint8_t *client_mac, in_addr_t *client_ip, uint16_t session_id, vpppoe_setup_pppoe_interface_ctx_t *callback_ctx);
+void vpppoe_async_del_pppoe_interface(uint8_t *client_mac, in_addr_t *client_ip, uint16_t session_id, uint32_t ifindex, char *ifname);
#endif /* VPPPOE_H */ \ No newline at end of file