26#ifndef PCP_CLIENT_DB_H_
27#define PCP_CLIENT_DB_H_
46#define PCP_INV_SERVER (~0u)
48#ifdef PCP_EXPERIMENTAL
51#define MD_VAL_MAX_LEN 24
57 uint8_t val_buf[MD_VAL_MAX_LEN];
61#define FLOW_HASH_BITS 5
62#define FLOW_HASH_SIZE (2<<FLOW_HASH_BITS)
126 struct in6_addr ext_ip;
138 char *sadscp_app_name;
154#ifdef PCP_EXPERIMENTAL
165#ifdef PCP_FLOW_PRIORITY
185#ifdef PCP_EXPERIMENTAL
241#ifdef PCP_EXPERIMENTAL
242void pcp_db_add_md(
pcp_flow_t *f, uint16_t md_id,
void *val,
size_t val_len);
void(* pcp_flow_change_notify)(pcp_flow_t *f, struct sockaddr *src_addr, struct sockaddr *ext_addr, pcp_fstate_e, void *cb_arg)
pcp_errno pcp_db_foreach_flow(pcp_ctx_t *ctx, pcp_db_flow_iterate f, void *data)
pcp_server_t * get_pcp_server(pcp_ctx_t *ctx, int pcp_server_index)
void pcp_flow_clear_msg_buf(pcp_flow_t *f)
int(* pcp_db_flow_iterate)(pcp_flow_t *f, void *data)
pcp_errno pcp_db_add_flow(pcp_flow_t *f)
pcp_errno pcp_db_foreach_server(pcp_ctx_t *ctx, pcp_db_server_iterate f, void *data)
pcp_errno pcp_db_rem_flow(pcp_flow_t *f)
int(* pcp_db_server_iterate)(pcp_server_t *f, void *data)
pcp_errno pcp_free_flow(pcp_flow_t *f)
pcp_flow_t * pcp_create_flow(pcp_server_t *s, struct flow_key_data *fkd)
struct pcp_recv_msg pcp_recv_msg_t
void pcp_db_free_pcp_servers(pcp_ctx_t *ctx)
pcp_server_t * get_pcp_server_by_ip(pcp_ctx_t *ctx, struct in6_addr *ip)
pcp_flow_t * pcp_get_flow(struct flow_key_data *fkd, pcp_server_t *s)
int pcp_new_server(pcp_ctx_t *ctx, struct in6_addr *ip, uint16_t port, uint32_t scope_id)
pcp_errno pcp_delete_flow_intern(pcp_flow_t *f)
struct flow_key_data::mp_keydata map_peer
struct in6_addr pcp_server_ip
pcp_server_t * pcp_servers
size_t pcp_servers_length
pcp_flow_t * flows[FLOW_HASH_SIZE]
void * flow_change_cb_arg
pcp_socket_vt_t * virt_socket_tb
pcp_flow_change_notify flow_change_cb_fun
struct pcp_ctx_s::pcp_client_db pcp_db
uint8_t third_party_option_present
uint8_t filter_option_present
struct pcp_flow_s * next_child
struct in6_addr third_party_ip
struct in6_addr filter_ip
uint8_t pfailure_option_present
char pcp_msg_buffer[PCP_MAX_LEN]
struct sockaddr_storage rcvd_from_addr
uint16_t assigned_ext_port
struct in6_addr assigned_ext_ip
pcp_flow_t * restart_flow_msg
pcp_flow_t * ping_flow_msg
struct timeval next_timeout
struct sockaddr_storage pcp_server_saddr
pcp_server_state_e server_state
char pcp_server_paddr[INET6_ADDRSTRLEN]