Commit cd1cf97f authored by Dafydd Harries's avatar Dafydd Harries

expand STUN attribute enums to those introduced by drafts

darcs-hash:20070129203259-c9803-11f6c8486effd21c9ff343a1e97e42a6c4e91f6a.gz
parent f8a1f922
......@@ -15,18 +15,41 @@ typedef enum {
STUN_MESSAGE_SHARED_SECRET_ERROR_RESPONSE = 0x112
} StunMessageType;
/* a = defined by RFC 3489
* b = defined by RFC 3489bis
* c = defined by draft-ietf-behave-turn-02
*/
typedef enum {
STUN_ATTRIBUTE_MAPPED_ADDRESS = 0x1,
STUN_ATTRIBUTE_RESPONSE_ADDRESS = 0x2,
STUN_ATTRIBUTE_CHANGE_REQUEST = 0x3,
STUN_ATTRIBUTE_CHANGED_ADDRESS = 0x4,
STUN_ATTRIBUTE_SOURCE_ADDRESS = 0x5,
STUN_ATTRIBUTE_USERNAME = 0x6,
STUN_ATTRIBUTE_PASSWORD = 0x7,
STUN_ATTRIBUTE_MESSAGE_INTEGRITY = 0x8,
STUN_ATTRIBUTE_ERROR_CODE = 0x9,
STUN_ATTRIBUTE_UNKNOWN_ATTRIBUTES = 0xa,
STUN_ATTRIBUTE_REFLECTED_FROM = 0xb
// mandatory parameters (<= 0x7fff)
STUN_ATTRIBUTE_MAPPED_ADDRESS = 0x0001, // ab
STUN_ATTRIBUTE_RESPONSE_ADDRESS = 0x0002, // a
STUN_ATTRIBUTE_CHANGE_REQUEST = 0x0003, // a
STUN_ATTRIBUTE_CHANGED_ADDRESS = 0x0004, // a
STUN_ATTRIBUTE_SOURCE_ADDRESS = 0x0005, // a
STUN_ATTRIBUTE_USERNAME = 0x0006, // ab
STUN_ATTRIBUTE_PASSWORD = 0x0007, // ab
STUN_ATTRIBUTE_MESSAGE_INTEGRITY = 0x0008, // ab
STUN_ATTRIBUTE_ERROR_CODE = 0x0009, // ab
STUN_ATTRIBUTE_UNKNOWN_ATTRIBUTES = 0x000a, // ab
STUN_ATTRIBUTE_REFLECTED_FROM = 0x000b, // a
STUN_ATTRIBUTE_REALM = 0x0014, // b
STUN_ATTRIBUTE_NONCE = 0x0015, // b
STUN_ATTRIBUTE_LIFETIME = 0x000D, // c
STUN_ATTRIBUTE_BANDWIDTH = 0x0010, // c
STUN_ATTRIBUTE_REMOTE_ADDRESS = 0x0012, // c
STUN_ATTRIBUTE_DATA = 0x0013, // c
STUN_ATTRIBUTE_RELAY_ADDRESS = 0x0016, // c
STUN_ATTRIBUTE_REQUESTED_PORT_PROPS = 0x0018, // c
STUN_ATTRIBUTE_REQUESTED_TRANSPORT = 0x0019, // c
STUN_ATTRIBUTE_REQUESTED_IP = 0x0022, // c
STUN_ATTRIBUTE_TIMER_VAL = 0x0021, // c
// optional parameters (> 0x7fff)
STUN_ATTRIBUTE_XOR_MAPPED_ADDRESS = 0x8020, // b
STUN_ATTRIBUTE_FINGERPRINT = 0x8023, // b
STUN_ATTRIBUTE_SERVER = 0x8022, // b
SUTN_ATTRIBUTE_ALTERNATE_SERVER = 0x8023, // b
STUN_ATTRIBUTE_REFRESH_INTERVAL = 0x8024, // b
} StunAttributeType;
typedef struct _StunAttribute StunAttribute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment