diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-05-31 23:53:39 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-05-31 23:53:39 +0000 |
commit | 70384438b872a94a29f41337b946eae2fd9032eb (patch) | |
tree | 730a7fcacc2eafa007c9883ca22db95a8b790cd6 /epan/dissectors/packet-stun.c | |
parent | 42ba282e25c798c74ee34fcfdee4dc14563965f0 (diff) |
From Zach Chadwick:
TR-111, from the DSL-Forum adds two options to STUN (RFC 3489) to help
with TR-069 enabled devices traverse firewalls. TR-111 can be read here:
http://www.dslforum.org/techwork/tr/*TR-111*.pdf
This patch adds support for decoding the two optional STUN attributes
used by TR-111. One is simply a zero-length attribute, and the other a
string attribute.
Me: Changed stun.att.connection.request.binding to
stun.att.connection_request_binding
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22019 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-stun.c')
-rw-r--r-- | epan/dissectors/packet-stun.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c index de9f533c60..c3318ebb9d 100644 --- a/epan/dissectors/packet-stun.c +++ b/epan/dissectors/packet-stun.c @@ -67,7 +67,7 @@ static int stun_att_lifetime = -1; static int stun_att_magic_cookie = -1; static int stun_att_bandwidth = -1; static int stun_att_data = -1; - +static int stun_att_connection_request_binding = -1; /* Message Types */ @@ -88,6 +88,7 @@ static int stun_att_data = -1; #define SET_ACTIVE_DESTINATION_RESPONSE 0x0106 #define SET_ACTIVE_DESTINATION_ERROR_RESPONSE 0x0116 + /* Attribute Types */ #define MAPPED_ADDRESS 0x0001 #define RESPONSE_ADDRESS 0x0002 @@ -113,6 +114,8 @@ static int stun_att_data = -1; #define XOR_MAPPED_ADDRESS 0x8020 #define XOR_ONLY 0x0021 #define SERVER 0x8022 +#define CONNECTION_REQUEST_BINDING 0xc001 +#define BINDING_CHANGE 0xc002 @@ -179,6 +182,8 @@ static const value_string attributes[] = { {XOR_MAPPED_ADDRESS, "XOR_MAPPED_ADDRESS"}, {XOR_ONLY, "XOR_ONLY"}, {SERVER, "SERVER"}, + {CONNECTION_REQUEST_BINDING, "CONNECTION-REQUEST-BINDING"}, + {BINDING_CHANGE, "BINDING-CHANGE"}, {0x00, NULL} }; @@ -423,6 +428,10 @@ dissect_stun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(att_tree, stun_att_family, tvb, offset+1, 1, FALSE); break; + case CONNECTION_REQUEST_BINDING: + proto_tree_add_item(att_tree, stun_att_connection_request_binding, tvb, offset, att_length, FALSE); + break; + default: break; } @@ -552,6 +561,10 @@ proto_register_stun(void) { "Data", "stun.att.data", FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL } }, + { &stun_att_connection_request_binding, + { "Connection Request Binding", "stun.att.connection_request_binding", FT_STRING, + BASE_NONE, NULL, 0x0, "", HFILL } + }, }; /* Setup protocol subtree array */ |