// routing.h - Centralized routing module for utun #ifndef ROUTING_H #define ROUTING_H #include #include // Forward declarations struct ETCP_CONN; struct UTUN_INSTANCE; /** * @brief Initialize routing module for instance * @param instance UTUN instance * @return 0 on success, -1 on error */ int routing_create(struct UTUN_INSTANCE* instance); /** * @brief Destroy routing module for instance * @param instance UTUN instance */ void routing_destroy(struct UTUN_INSTANCE* instance); /** * @brief Register ETCP connection with routing * Called from pn_init() to register connection's normalizer output queue * @param etcp ETCP connection */ void routing_add_conn(struct ETCP_CONN* etcp); /** * @brief Unregister ETCP connection from routing * Called from pn_deinit() to unregister connection's normalizer output queue * @param etcp ETCP connection */ void routing_del_conn(struct ETCP_CONN* etcp); /** * @brief Set TUN interface for routing * Called from utun_instance_init() after tun_init() * @param instance UTUN instance with configured tun */ void routing_set_tun(struct UTUN_INSTANCE* instance); #endif // ROUTING_H