e523398fa8
- apps/device-agent-embedded/: ESP32 WireGuard agent (C, ESP-IDF, mbedTLS) - reference/namespace-vrf/: Linux namespace/VRF network isolation docs - apps/android-agent: VPN permission check, StartResult sealed class
40 lines
690 B
C
40 lines
690 B
C
/**
|
|
* @file tunnel.h
|
|
* @brief WireGuard Tunnel Management
|
|
*/
|
|
|
|
#ifndef TUNNEL_H
|
|
#define TUNNEL_H
|
|
|
|
#include <esp_err.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "config.h"
|
|
|
|
/**
|
|
* @brief Initialize WireGuard tunnel
|
|
*/
|
|
esp_err_t tunnel_init(const wg_config_t *config);
|
|
|
|
/**
|
|
* @brief Apply configuration to tunnel
|
|
*/
|
|
esp_err_t tunnel_apply_config(const wg_config_t *config);
|
|
|
|
/**
|
|
* @brief Rebuild tunnel with new configuration
|
|
*/
|
|
esp_err_t tunnel_rebuild(const wg_config_t *config);
|
|
|
|
/**
|
|
* @brief Get last handshake timestamp (epoch seconds)
|
|
*/
|
|
int64_t tunnel_get_last_handshake(void);
|
|
|
|
/**
|
|
* @brief Check if tunnel is up
|
|
*/
|
|
bool tunnel_is_up(void);
|
|
|
|
#endif /* TUNNEL_H */
|