Project Alice
Loading...
Searching...
No Matches
pcp_msg_structs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pcp_request
 
struct  pcp_response
 
struct  pcp_options_hdr
 
struct  nat_pmp_announce_req
 
struct  nat_pmp_announce_resp
 
struct  nat_pmp_map_req
 
struct  nat_pmp_map_resp
 
struct  nat_pmp_inv_version_resp
 
struct  pcp_nonce
 
struct  pcp_map_v2
 
struct  pcp_map_v1
 
struct  pcp_peer_v1
 
struct  pcp_peer_v2
 
struct  pcp_sadscp_req
 
struct  pcp_sadscp_resp
 
struct  pcp_location_option
 
struct  pcp_userid_option
 
struct  pcp_deviceid_option
 
struct  pcp_prefer_fail_option
 
struct  pcp_3rd_party_option
 
struct  pcp_filter_option
 
struct  pcp_flow_priority_option
 
struct  pcp_metadata_option
 

Macros

#define PCP_MAX_LEN   1100
 
#define PCP_OPCODE_ANNOUNCE   0
 
#define PCP_OPCODE_MAP   1
 
#define PCP_OPCODE_PEER   2
 
#define PCP_OPCODE_SADSCP   3
 
#define NATPMP_OPCODE_ANNOUNCE   0
 
#define NATPMP_OPCODE_MAP_UDP   1
 
#define NATPMP_OPCODE_MAP_TCP   2
 
#define PCP_RES_SUCCESS   0
 
#define PCP_RES_UNSUPP_VERSION   1
 
#define PCP_RES_NOT_AUTHORIZED   2
 
#define PCP_RES_MALFORMED_REQUEST   3
 
#define PCP_RES_UNSUPP_OPCODE   4
 
#define PCP_RES_UNSUPP_OPTION   5
 
#define PCP_RES_MALFORMED_OPTION   6
 
#define PCP_RES_NETWORK_FAILURE   7
 
#define PCP_RES_NO_RESOURCES   8
 
#define PCP_RES_UNSUPP_PROTOCOL   9
 
#define PCP_RES_USER_EX_QUOTA   10
 
#define PCP_RES_CANNOT_PROVIDE_EXTERNAL   11
 
#define PCP_RES_ADDRESS_MISMATCH   12
 
#define PCP_RES_EXCESSIVE_REMOTE_PEERS   13
 
#define MAX_USER_ID   512
 
#define MAX_DEVICE_ID   32
 
#define MAX_GEO_STR   32
 
#define FOREACH_DEVICE(DEVICE)
 
#define GENERATE_ENUM(ENUM)   ENUM,
 
#define GENERATE_STRING(STRING)   #STRING ,
 
#define PCP_DSCP_MASK   ((1<<6)-1)
 

Typedefs

typedef enum pcp_options pcp_options_t
 
typedef struct pcp_request pcp_request_t
 
typedef struct pcp_response pcp_response_t
 
typedef struct pcp_options_hdr pcp_options_hdr_t
 
typedef struct nat_pmp_announce_req nat_pmp_announce_req_t
 
typedef struct nat_pmp_announce_resp nat_pmp_announce_resp_t
 
typedef struct nat_pmp_map_req nat_pmp_map_req_t
 
typedef struct nat_pmp_map_resp nat_pmp_map_resp_t
 
typedef struct nat_pmp_inv_version_resp nat_pmp_inv_version_resp_t
 
typedef struct pcp_map_v2 pcp_map_v2_t
 
typedef struct pcp_map_v1 pcp_map_v1_t
 
typedef struct pcp_peer_v1 pcp_peer_v1_t
 
typedef struct pcp_peer_v2 pcp_peer_v2_t
 
typedef struct pcp_sadscp_req pcp_sadscp_req_t
 
typedef struct pcp_sadscp_resp pcp_sadscp_resp_t
 
typedef struct pcp_location_option pcp_location_option_t
 
typedef struct pcp_userid_option pcp_userid_option_t
 
typedef struct pcp_deviceid_option pcp_deviceid_option_t
 
typedef enum DEVICE_ENUM device_enum_e
 
typedef struct pcp_prefer_fail_option pcp_prefer_fail_option_t
 
typedef struct pcp_3rd_party_option pcp_3rd_party_option_t
 
typedef struct pcp_filter_option pcp_filter_option_t
 
typedef struct pcp_flow_priority_option pcp_flow_priority_option_t
 
typedef struct pcp_metadata_option pcp_metadata_option_t
 

Enumerations

enum  pcp_options {
  PCP_OPTION_3RD_PARTY =1 , PCP_OPTION_PREF_FAIL =2 , PCP_OPTION_FILTER =3 , PCP_OPTION_DEVICEID =96 ,
  PCP_OPTION_LOCATION =97 , PCP_OPTION_USERID =98 , PCP_OPTION_FLOW_PRIORITY =99 , PCP_OPTION_METADATA =100
}
 
enum  DEVICE_ENUM
 

Macro Definition Documentation

◆ FOREACH_DEVICE

#define FOREACH_DEVICE (   DEVICE)
Value:
DEVICE(smartphone) \
DEVICE(iphone) \
DEVICE(unknown)

Definition at line 251 of file pcp_msg_structs.h.

◆ GENERATE_ENUM

#define GENERATE_ENUM (   ENUM)    ENUM,

Definition at line 256 of file pcp_msg_structs.h.

◆ GENERATE_STRING

#define GENERATE_STRING (   STRING)    #STRING ,

Definition at line 257 of file pcp_msg_structs.h.

◆ MAX_DEVICE_ID

#define MAX_DEVICE_ID   32

Definition at line 75 of file pcp_msg_structs.h.

◆ MAX_GEO_STR

#define MAX_GEO_STR   32

Definition at line 78 of file pcp_msg_structs.h.

◆ MAX_USER_ID

#define MAX_USER_ID   512

Definition at line 72 of file pcp_msg_structs.h.

◆ NATPMP_OPCODE_ANNOUNCE

#define NATPMP_OPCODE_ANNOUNCE   0

Definition at line 38 of file pcp_msg_structs.h.

◆ NATPMP_OPCODE_MAP_TCP

#define NATPMP_OPCODE_MAP_TCP   2

Definition at line 40 of file pcp_msg_structs.h.

◆ NATPMP_OPCODE_MAP_UDP

#define NATPMP_OPCODE_MAP_UDP   1

Definition at line 39 of file pcp_msg_structs.h.

◆ PCP_DSCP_MASK

#define PCP_DSCP_MASK   ((1<<6)-1)

Definition at line 295 of file pcp_msg_structs.h.

◆ PCP_MAX_LEN

#define PCP_MAX_LEN   1100

Definition at line 33 of file pcp_msg_structs.h.

◆ PCP_OPCODE_ANNOUNCE

#define PCP_OPCODE_ANNOUNCE   0

Definition at line 34 of file pcp_msg_structs.h.

◆ PCP_OPCODE_MAP

#define PCP_OPCODE_MAP   1

Definition at line 35 of file pcp_msg_structs.h.

◆ PCP_OPCODE_PEER

#define PCP_OPCODE_PEER   2

Definition at line 36 of file pcp_msg_structs.h.

◆ PCP_OPCODE_SADSCP

#define PCP_OPCODE_SADSCP   3

Definition at line 37 of file pcp_msg_structs.h.

◆ PCP_RES_ADDRESS_MISMATCH

#define PCP_RES_ADDRESS_MISMATCH   12

Definition at line 55 of file pcp_msg_structs.h.

◆ PCP_RES_CANNOT_PROVIDE_EXTERNAL

#define PCP_RES_CANNOT_PROVIDE_EXTERNAL   11

Definition at line 54 of file pcp_msg_structs.h.

◆ PCP_RES_EXCESSIVE_REMOTE_PEERS

#define PCP_RES_EXCESSIVE_REMOTE_PEERS   13

Definition at line 56 of file pcp_msg_structs.h.

◆ PCP_RES_MALFORMED_OPTION

#define PCP_RES_MALFORMED_OPTION   6

Definition at line 49 of file pcp_msg_structs.h.

◆ PCP_RES_MALFORMED_REQUEST

#define PCP_RES_MALFORMED_REQUEST   3

Definition at line 46 of file pcp_msg_structs.h.

◆ PCP_RES_NETWORK_FAILURE

#define PCP_RES_NETWORK_FAILURE   7

Definition at line 50 of file pcp_msg_structs.h.

◆ PCP_RES_NO_RESOURCES

#define PCP_RES_NO_RESOURCES   8

Definition at line 51 of file pcp_msg_structs.h.

◆ PCP_RES_NOT_AUTHORIZED

#define PCP_RES_NOT_AUTHORIZED   2

Definition at line 45 of file pcp_msg_structs.h.

◆ PCP_RES_SUCCESS

#define PCP_RES_SUCCESS   0

Definition at line 43 of file pcp_msg_structs.h.

◆ PCP_RES_UNSUPP_OPCODE

#define PCP_RES_UNSUPP_OPCODE   4

Definition at line 47 of file pcp_msg_structs.h.

◆ PCP_RES_UNSUPP_OPTION

#define PCP_RES_UNSUPP_OPTION   5

Definition at line 48 of file pcp_msg_structs.h.

◆ PCP_RES_UNSUPP_PROTOCOL

#define PCP_RES_UNSUPP_PROTOCOL   9

Definition at line 52 of file pcp_msg_structs.h.

◆ PCP_RES_UNSUPP_VERSION

#define PCP_RES_UNSUPP_VERSION   1

Definition at line 44 of file pcp_msg_structs.h.

◆ PCP_RES_USER_EX_QUOTA

#define PCP_RES_USER_EX_QUOTA   10

Definition at line 53 of file pcp_msg_structs.h.

Typedef Documentation

◆ device_enum_e

typedef enum DEVICE_ENUM device_enum_e

◆ nat_pmp_announce_req_t

◆ nat_pmp_announce_resp_t

◆ nat_pmp_inv_version_resp_t

◆ nat_pmp_map_req_t

◆ nat_pmp_map_resp_t

◆ pcp_3rd_party_option_t

◆ pcp_deviceid_option_t

◆ pcp_filter_option_t

◆ pcp_flow_priority_option_t

◆ pcp_location_option_t

◆ pcp_map_v1_t

typedef struct pcp_map_v1 pcp_map_v1_t

◆ pcp_map_v2_t

typedef struct pcp_map_v2 pcp_map_v2_t

◆ pcp_metadata_option_t

◆ pcp_options_hdr_t

◆ pcp_options_t

typedef enum pcp_options pcp_options_t

◆ pcp_peer_v1_t

typedef struct pcp_peer_v1 pcp_peer_v1_t

◆ pcp_peer_v2_t

typedef struct pcp_peer_v2 pcp_peer_v2_t

◆ pcp_prefer_fail_option_t

◆ pcp_request_t

typedef struct pcp_request pcp_request_t

◆ pcp_response_t

typedef struct pcp_response pcp_response_t

◆ pcp_sadscp_req_t

◆ pcp_sadscp_resp_t

◆ pcp_userid_option_t

Enumeration Type Documentation

◆ DEVICE_ENUM

Definition at line 259 of file pcp_msg_structs.h.

◆ pcp_options

Enumerator
PCP_OPTION_3RD_PARTY 
PCP_OPTION_PREF_FAIL 
PCP_OPTION_FILTER 
PCP_OPTION_DEVICEID 
PCP_OPTION_LOCATION 
PCP_OPTION_USERID 
PCP_OPTION_FLOW_PRIORITY 
PCP_OPTION_METADATA 

Definition at line 58 of file pcp_msg_structs.h.