Project Alice
Loading...
Searching...
No Matches
pcp_client_db.h File Reference
#include <stdint.h>
#include "pcp.h"
#include "pcp_event_handler.h"
#include "pcp_msg_structs.h"
Include dependency graph for pcp_client_db.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  flow_key_data
 
struct  flow_key_data::mp_keydata
 
struct  pcp_recv_msg
 
struct  pcp_ctx_s
 
struct  pcp_ctx_s::pcp_client_db
 
struct  pcp_flow_s
 
struct  pcp_server
 

Macros

#define PCP_INV_SERVER   (~0u)
 
#define FLOW_HASH_BITS   5
 
#define FLOW_HASH_SIZE   (2<<FLOW_HASH_BITS)
 

Typedefs

typedef struct pcp_recv_msg pcp_recv_msg_t
 
typedef int(* pcp_db_flow_iterate) (pcp_flow_t *f, void *data)
 
typedef int(* pcp_db_server_iterate) (pcp_server_t *f, void *data)
 

Enumerations

enum  opt_flags_e { optf_3rd_party =1 << 0 , optf_flowp =1 << 1 }
 

Functions

pcp_flow_tpcp_create_flow (pcp_server_t *s, struct flow_key_data *fkd)
 
pcp_errno pcp_free_flow (pcp_flow_t *f)
 
pcp_flow_tpcp_get_flow (struct flow_key_data *fkd, pcp_server_t *s)
 
pcp_errno pcp_db_add_flow (pcp_flow_t *f)
 
pcp_errno pcp_db_rem_flow (pcp_flow_t *f)
 
pcp_errno pcp_db_foreach_flow (pcp_ctx_t *ctx, pcp_db_flow_iterate f, void *data)
 
void pcp_flow_clear_msg_buf (pcp_flow_t *f)
 
int pcp_new_server (pcp_ctx_t *ctx, struct in6_addr *ip, uint16_t port, uint32_t scope_id)
 
pcp_errno pcp_db_foreach_server (pcp_ctx_t *ctx, pcp_db_server_iterate f, void *data)
 
pcp_server_tget_pcp_server (pcp_ctx_t *ctx, int pcp_server_index)
 
pcp_server_tget_pcp_server_by_ip (pcp_ctx_t *ctx, struct in6_addr *ip)
 
void pcp_db_free_pcp_servers (pcp_ctx_t *ctx)
 
pcp_errno pcp_delete_flow_intern (pcp_flow_t *f)
 

Macro Definition Documentation

◆ FLOW_HASH_BITS

#define FLOW_HASH_BITS   5

Definition at line 61 of file pcp_client_db.h.

◆ FLOW_HASH_SIZE

#define FLOW_HASH_SIZE   (2<<FLOW_HASH_BITS)

Definition at line 62 of file pcp_client_db.h.

◆ PCP_INV_SERVER

#define PCP_INV_SERVER   (~0u)

Definition at line 46 of file pcp_client_db.h.

Typedef Documentation

◆ pcp_db_flow_iterate

typedef int(* pcp_db_flow_iterate) (pcp_flow_t *f, void *data)

Definition at line 222 of file pcp_client_db.h.

◆ pcp_db_server_iterate

typedef int(* pcp_db_server_iterate) (pcp_server_t *f, void *data)

Definition at line 224 of file pcp_client_db.h.

◆ pcp_recv_msg_t

typedef struct pcp_recv_msg pcp_recv_msg_t

Enumeration Type Documentation

◆ opt_flags_e

Enumerator
optf_3rd_party 
optf_flowp 

Definition at line 42 of file pcp_client_db.h.

Function Documentation

◆ get_pcp_server()

pcp_server_t * get_pcp_server ( pcp_ctx_t ctx,
int  pcp_server_index 
)

Definition at line 347 of file pcp_client_db.c.

Here is the caller graph for this function:

◆ get_pcp_server_by_ip()

pcp_server_t * get_pcp_server_by_ip ( pcp_ctx_t ctx,
struct in6_addr *  ip 
)

Definition at line 412 of file pcp_client_db.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcp_create_flow()

pcp_flow_t * pcp_create_flow ( pcp_server_t s,
struct flow_key_data fkd 
)

Definition at line 64 of file pcp_client_db.c.

◆ pcp_db_add_flow()

pcp_errno pcp_db_add_flow ( pcp_flow_t f)

Definition at line 136 of file pcp_client_db.c.

◆ pcp_db_foreach_flow()

pcp_errno pcp_db_foreach_flow ( pcp_ctx_t ctx,
pcp_db_flow_iterate  f,
void *  data 
)

Definition at line 215 of file pcp_client_db.c.

Here is the caller graph for this function:

◆ pcp_db_foreach_server()

pcp_errno pcp_db_foreach_server ( pcp_ctx_t ctx,
pcp_db_server_iterate  f,
void *  data 
)

Definition at line 373 of file pcp_client_db.c.

Here is the caller graph for this function:

◆ pcp_db_free_pcp_servers()

void pcp_db_free_pcp_servers ( pcp_ctx_t ctx)

Definition at line 428 of file pcp_client_db.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcp_db_rem_flow()

pcp_errno pcp_db_rem_flow ( pcp_flow_t f)

Definition at line 187 of file pcp_client_db.c.

Here is the caller graph for this function:

◆ pcp_delete_flow_intern()

pcp_errno pcp_delete_flow_intern ( pcp_flow_t f)

Definition at line 102 of file pcp_client_db.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pcp_flow_clear_msg_buf()

void pcp_flow_clear_msg_buf ( pcp_flow_t f)

Definition at line 91 of file pcp_client_db.c.

Here is the caller graph for this function:

◆ pcp_free_flow()

pcp_errno pcp_free_flow ( pcp_flow_t f)

◆ pcp_get_flow()

pcp_flow_t * pcp_get_flow ( struct flow_key_data fkd,
pcp_server_t s 
)

Definition at line 164 of file pcp_client_db.c.

◆ pcp_new_server()

int pcp_new_server ( pcp_ctx_t ctx,
struct in6_addr *  ip,
uint16_t  port,
uint32_t  scope_id 
)

Definition at line 275 of file pcp_client_db.c.

Here is the call graph for this function:
Here is the caller graph for this function: