#include "def.h"
Go to the source code of this file.
Data Structures | |
struct | comm_msg_hello |
structure for a COMM_MSG_HELLO message payload More... | |
struct | comm_msg_pred_port |
structure to hold payload for a COMM_MSG_PORT_PRED message More... | |
struct | comm_msg_buddy_alloc |
structure to hold payload for a COMM_MSG_BUDDY_ALLOC message More... | |
struct | comm_msg_buddy_info |
structure to hold payload for a COMM_MSG_BUDDY_INFO message More... | |
struct | comm_msg_buddy_syn_seq |
structure to hold payload for a COMM_MSG_SYN_TO_BUDDY_SEQ message More... | |
struct | comm_msg_peer_syn_seq |
structure to hold the COMM_MSG_PEER_SYN_SEQ payload More... | |
struct | comm_msg_goodbye |
structure to hold the COMM_MSG_GOODBYE payload More... | |
struct | comm_msg_syn_flooded |
structure to hold the COMM_MSG_SYN_FLOODED payload More... | |
struct | comm_msg_bday_success_port |
structure to hold the COMM_MSG_BDAY_SUCCESS_PORT payload More... | |
struct | comm_msg_syn_ack_flood_seq_num |
structure to hold the COMM_MSG_SYN_ACK_FLOOD_SEQ_NUM payload More... | |
Defines | |
#define | COMM_TYPE_LEN 4 |
the length of the message type field | |
#define | COMM_LENGTH_LEN 4 |
the length of the length field | |
#define | COMM_MIN_LEN (COMM_TYPE_LEN + COMM_LENGTH_LEN) |
the minimum comminication length (header size) | |
#define | COMM_HEADER_LEN COMM_MIN_LEN |
the length of the header (same as COMM_MIN_LEN) | |
#define | COMM_MAX_LEN 1024 |
the absolute maximum a message (including payload) can be | |
#define | COMM_MSG_HELLO 0x0001 |
an intial message from a peer to helper starting everything (message includes a payload of type comm_peer_info_t) | |
#define | COMM_MSG_CONNECT_AGAIN 0x1000 |
a message from the helper to the peer asking for a second connection to facilitate port prediction | |
#define | COMM_MSG_CONNECTED_AGAIN 0x0002 |
a message from the peer to the helper indicating that a second port prediction connection has been made | |
#define | COMM_MSG_PORT_PRED 0x1002 |
a message from the helper to the peer indicating the success of the first port prediction attempt | |
#define | COMM_MSG_WAITING_FOR_BUDDY_ALLOC 0x0003 |
a message from the peer to the helper indicating the peer is now waiting to get buddy info (this message only exists to maintain the ping/pong message flow) | |
#define | COMM_MSG_BUDDY_ALLOC 0x1003 |
a message from the helper to the peer informing the peer of the the buddy's port alloc method, and whether there is support for the connection | |
#define | COMM_MSG_WAITING_FOR_BUDDY_PORT 0x0004 |
a message from the peer to the helper asking for the buddy's external port | |
#define | COMM_MSG_BUDDY_PORT 0x1004 |
a message from the helper to the peer with info about the buddy | |
#define | COMM_MSG_BUDDY_SYN_SEQ 0x0005 |
message from the peer to the helper with sequence number in the SYN packet sent to the buddy | |
#define | COMM_MSG_PEER_SYN_SEQ 0x1005 |
message from helper to peer relaying the sequence number in the SYN from the buddy that the peer should base a forged SYN/ACK on | |
#define | COMM_MSG_GOODBYE 0x0006 |
a message from the peer to the helper terminating the protocol | |
#define | COMM_MSG_SYN_FLOODED 0x0101 |
a message from the peer to the helper indicating the birthay SYN flood has be done | |
#define | COMM_MSG_BUDDY_SYN_ACK_FLOODED 0x1101 |
a message from the helper to the peer indicating that the buddy has commenced the bday synack flood | |
#define | COMM_MSG_BDAY_SUCCESS_PORT 0x0102 |
a message from the peer to the helper indicating the port that made if through the NAT | |
#define | COMM_MSG_WAITING_TO_SYN_ACK_FLOOD 0x0201 |
a message from the peer to the helper indicating the peer is ready to be told to do a birthday flood | |
#define | COMM_MSG_SYN_ACK_FLOOD_SEQ_NUM 0x1201 |
a message from the helper to the peer with the sequence number that the peer used in the SYN flood | |
#define | COMM_MSG_SYN_ACK_FLOOD_DONE 0x0202 |
a message from the peer to the helper indicating that the synack flood has been completed | |
#define | COMM_PORT_ALLOC_UNKNOWN -1 |
port allocation method is unknown | |
#define | COMM_PORT_ALLOC_SEQ 1 |
port allocation method is sequential | |
#define | COMM_PORT_ALLOC_RAND 2 |
port allocation method is random | |
#define | COMM_CONNECTION_UNSUPPORTED 0 |
unsupported connection | |
#define | COMM_CONNECTION_SUPPORTED 1 |
supported connection | |
#define | COMM_BDAY_NOT_NEEDED 0 |
birthday paradox not needed for peer | |
#define | COMM_BDAY_NEEDED 1 |
birthday paradox needed for peer | |
Typedefs | |
typedef long | comm_type_t |
a typedef for the comm type field | |
typedef unsigned long | comm_len_t |
a typdef for the comm length field | |
typedef comm_msg_hello | comm_msg_hello_t |
typedef for the COMM_MSG_HELLO payload structure | |
typedef comm_msg_pred_port | comm_msg_pred_port_t |
typedef for the COMM_MSG_PORT_PRED payload structure | |
typedef comm_msg_buddy_alloc | comm_msg_buddy_alloc_t |
typedef for the COMM_MSG_BUDDY_ALLOC payload structure | |
typedef comm_msg_buddy_info | comm_msg_buddy_port_t |
typedef for the COMM_MSG_BUDDY_PORT payload structure | |
typedef comm_msg_buddy_syn_seq | comm_msg_buddy_syn_seq_t |
a typedef for the COMM_MSG_BUDDY_SYN_SEQ message | |
typedef comm_msg_peer_syn_seq | comm_msg_peer_syn_seq_t |
typedef for the COMM_MSG_PEER_SYN_SEQ payload structure | |
typedef comm_msg_goodbye | comm_msg_goodbye_t |
typedef for the COMM_MSG_GOODBYE structure | |
typedef comm_msg_syn_flooded | comm_msg_syn_flooded_t |
a typedef for the COMM_MSG_SYN_FLOODED payload structure | |
typedef comm_msg_bday_success_port | comm_msg_bday_success_port_t |
typedef for the COMM_MSG_BDAY_SUCCESS_PORT payload structure | |
typedef comm_msg_syn_ack_flood_seq_num | comm_msg_syn_ack_flood_seq_num_t |
typedef for the COMM_MSG_SYN_ACK_FLOOD_SEQ_NUM payload structure | |
Variables | |
comm_msg_hello | __packed__ |
structure for a COMM_MSG_HELLO message payload |
Definition in file comm.h.