Message types for STUN server resolution. More...
Go to the source code of this file.
Data Structures | |
| struct | stun_trans_id |
| struct | stun_header |
| struct | stun_attr |
| struct | stun_addr |
| The format normally used for addresses carried by STUN messages. More... | |
Macros | |
| #define | STUN_IGNORE (0) |
| #define | STUN_ACCEPT (1) |
| #define | STUN_MAGIC_COOKIE 0x2112A442 |
Functions | |
| static enum StunClasses | decode_class (int msg) |
| Convert a message to a StunClass. | |
| static enum StunMethods | decode_method (int msg) |
| Convert a message to a StunMethod. | |
| static const char * | stun_msg2str (int msg) |
| Print a class and method from a STUN message. | |
| static const char * | stun_attr2str (enum StunAttributes msg) |
| Print attribute name. | |
| #define STUN_IGNORE (0) |
Definition at line 31 of file nat_stun.h.
| #define STUN_ACCEPT (1) |
Definition at line 32 of file nat_stun.h.
| #define STUN_MAGIC_COOKIE 0x2112A442 |
Definition at line 34 of file nat_stun.h.
| enum StunClasses |
STUN message classes.
| Enumerator | |
|---|---|
| INVALID_CLASS | |
| STUN_REQUEST | |
| STUN_INDICATION | |
| STUN_RESPONSE | |
| STUN_ERROR_RESPONSE | |
Definition at line 85 of file nat_stun.h.
| enum StunMethods |
| Enumerator | |
|---|---|
| INVALID_METHOD | |
| STUN_BINDING | |
| STUN_SHARED_SECRET | |
| STUN_ALLOCATE | |
| STUN_REFRESH | |
| STUN_SEND | |
| STUN_DATA | |
| STUN_CREATE_PERMISSION | |
| STUN_CHANNEL_BIND | |
Definition at line 94 of file nat_stun.h.
| enum StunAttributes |
Basic attribute types in stun messages.
Messages can also contain custom attributes (codes above 0x7fff)
Definition at line 112 of file nat_stun.h.
|
static |
Convert a message to a StunClass.
| msg | the received message |
Definition at line 143 of file nat_stun.h.
References msg.
Referenced by stun_msg2str().
|
static |
Convert a message to a StunMethod.
| msg | the received message |
Definition at line 157 of file nat_stun.h.
References msg.
Referenced by stun_msg2str().
|
static |
Print a class and method from a STUN message.
| msg |
Definition at line 173 of file nat_stun.h.
References decode_class(), decode_method(), GNUNET_snprintf(), INVALID_CLASS, INVALID_METHOD, msg, name, result, STUN_BINDING, STUN_ERROR_RESPONSE, STUN_INDICATION, STUN_REQUEST, STUN_RESPONSE, and value.
Referenced by GNUNET_NAT_stun_handle_packet_().
|
static |
Print attribute name.
| msg | with a attribute type |
Definition at line 231 of file nat_stun.h.
References msg, name, STUN_ALTERNATE_SERVER, STUN_CHANGE_ADDRESS, STUN_CHANGED_ADDRESS, STUN_ERROR_CODE, STUN_FINGERPRINT, STUN_MAPPED_ADDRESS, STUN_MESSAGE_INTEGRITY, STUN_MS_VERSION, STUN_MS_XOR_MAPPED_ADDRESS, STUN_NONCE, STUN_PASSWORD, STUN_REALM, STUN_REFLECTED_FROM, STUN_RESPONSE_ADDRESS, STUN_SOFTWARE, STUN_SOURCE_ADDRESS, STUN_UNKNOWN_ATTRIBUTES, STUN_USERNAME, STUN_XOR_MAPPED_ADDRESS, and value.