5 #ifndef HAKA_PROTO_IPV4_CNX_H 6 #define HAKA_PROTO_IPV4_CNX_H 10 #include <haka/lua/ref.h> 11 #include <haka/lua/object.h> 32 struct lua_object lua_object;
34 struct cnx_stats stats[CNX_DIR_CNT];
36 struct lua_ref lua_priv;
41 struct cnx_table *cnx_table_new(
void (*cnx_release)(
struct cnx *,
bool));
42 void cnx_table_release(
struct cnx_table *table);
43 bool cnx_foreach(
struct cnx_table *table,
bool include_dropped,
bool (*callback)(
void *data,
struct cnx *,
int index),
void *data);
45 struct cnx *cnx_new(
struct cnx_table *table,
struct cnx_key *key);
46 struct cnx *cnx_get(
struct cnx_table *table,
struct cnx_key *key,
int *direction,
bool *dropped);
47 struct cnx *cnx_get_byid(
struct cnx_table *table,
uint32 id);
49 void cnx_close(
struct cnx *cnx);
50 void cnx_drop(
struct cnx *cnx);
51 void cnx_update_stat(
struct cnx *cnx,
int direction,
size_t size);
uint32 ipv4addr
Definition: ipv4-addr.h:25
unsigned HAKA_16BIT_TYPE uint16
Definition: types.h:28
unsigned HAKA_32BIT_TYPE uint32
Definition: types.h:29