Project Alice
|
#include "default_config.h"
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <assert.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include "pcp.h"
#include "pcp_utils.h"
#include "pcp_msg.h"
#include "pcp_msg_structs.h"
#include "pcp_logger.h"
#include "pcp_event_handler.h"
#include "pcp_server_discovery.h"
#include "net/pcp_socket.h"
Go to the source code of this file.
Classes | |
struct | pcp_flow_state_trans |
struct | pcp_flow_state_event |
struct | get_first_flow_iter_data |
struct | flow_iterator_data |
struct | pcp_server_state_machine |
struct | hserver_iter_data |
Macros | |
#define | MIN(a, b) (a<b?a:b) |
#define | MAX(a, b) (a>b?a:b) |
#define | PCP_RT(rtprev) |
#define | FLOW_TRANS_COUNT (sizeof(flow_transitions)/sizeof(*flow_transitions)) |
#define | FLOW_EVENTS_SM_COUNT (sizeof(flow_events_sm)/sizeof(*flow_events_sm)) |
#define | SERVER_STATE_MACHINE_COUNT (sizeof(server_sm)/sizeof(*server_sm)) |
Typedefs | |
typedef pcp_flow_event_e(* | handle_flow_state_event) (pcp_flow_t *f, pcp_recv_msg_t *msg) |
typedef struct pcp_flow_state_trans | pcp_flow_state_trans_t |
typedef struct pcp_flow_state_event | pcp_flow_state_events_t |
typedef pcp_server_state_e(* | handle_server_state_event) (pcp_server_t *s) |
typedef struct pcp_server_state_machine | pcp_server_state_machine_t |
Functions | |
pcp_errno | run_server_state_machine (pcp_server_t *s, pcp_event_e event) |
int | pcp_pulse (pcp_ctx_t *ctx, struct timeval *next_timeout) |
void | pcp_flow_updated (pcp_flow_t *f) |
void | pcp_set_flow_change_cb (pcp_ctx_t *ctx, pcp_flow_change_notify cb_fun, void *cb_arg) |
#define FLOW_EVENTS_SM_COUNT (sizeof(flow_events_sm)/sizeof(*flow_events_sm)) |
Definition at line 174 of file pcp_event_handler.c.
#define FLOW_TRANS_COUNT (sizeof(flow_transitions)/sizeof(*flow_transitions)) |
Definition at line 118 of file pcp_event_handler.c.
#define MAX | ( | a, | |
b | |||
) | (a>b?a:b) |
Definition at line 66 of file pcp_event_handler.c.
#define MIN | ( | a, | |
b | |||
) | (a<b?a:b) |
Definition at line 63 of file pcp_event_handler.c.
#define PCP_RT | ( | rtprev | ) |
Definition at line 68 of file pcp_event_handler.c.
#define SERVER_STATE_MACHINE_COUNT (sizeof(server_sm)/sizeof(*server_sm)) |
Definition at line 1001 of file pcp_event_handler.c.
typedef pcp_flow_event_e(* handle_flow_state_event) (pcp_flow_t *f, pcp_recv_msg_t *msg) |
Definition at line 98 of file pcp_event_handler.c.
typedef pcp_server_state_e(* handle_server_state_event) (pcp_server_t *s) |
Definition at line 961 of file pcp_event_handler.c.
typedef struct pcp_flow_state_event pcp_flow_state_events_t |
typedef struct pcp_flow_state_trans pcp_flow_state_trans_t |
typedef struct pcp_server_state_machine pcp_server_state_machine_t |
void pcp_flow_updated | ( | pcp_flow_t * | f | ) |
Definition at line 1147 of file pcp_event_handler.c.
int pcp_pulse | ( | pcp_ctx_t * | ctx, |
struct timeval * | next_timeout | ||
) |
Definition at line 1087 of file pcp_event_handler.c.
void pcp_set_flow_change_cb | ( | pcp_ctx_t * | ctx, |
pcp_flow_change_notify | cb_fun, | ||
void * | cb_arg | ||
) |
Definition at line 1168 of file pcp_event_handler.c.
pcp_errno run_server_state_machine | ( | pcp_server_t * | s, |
pcp_event_e | event | ||
) |