#ifndef _TRACE_API_H #define _TRACE_API_H #include #include typedef enum { TRACE_SUCCESS = 0, TRACE_FAILURE, TRACE_PENDING } trace_ret_t; #ifndef u8 typedef unsigned char u8; #endif #ifndef u16 typedef unsigned short u16; #endif #ifndef u32 typedef unsigned int u32; #endif typedef struct _addr { u8 family; union { struct in_addr ip4; struct in6_addr ip6; } addr; } addr_t; typedef void (*async_cb)(trace_ret_t ret, void *arg); typedef struct _trace_policy { addr_t src; u16 sport; addr_t dst; u16 dport; u8 protocol; //PKT_TUPLE u16 app_type; } trace_policy_t; trace_ret_t policy_client_init(); trace_ret_t policy_client_exit(); trace_ret_t policy_async_exec(const trace_policy_t *in, async_cb cb, void *arg); trace_ret_t policy_sync_exec(const trace_policy_t *in); #endif