From 2b6b833a792734f29cd340359ee0d698eff46419 Mon Sep 17 00:00:00 2001 From: Andrii Melnychenko Date: Mon, 9 Jun 2025 15:00:35 +0200 Subject: PoC: VPP added async VPP client. Also, fixed a few crashes related to file descriptor closing. Added a few options for auditing accel - vpp behaviour. Signed-off-by: Andrii Melnychenko --- accel-pppd/ctrl/pppoe/vpppoe.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'accel-pppd/ctrl/pppoe/vpppoe.h') 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 -- cgit v1.2.3