summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-01-30 19:41:29 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-01-31 00:12:12 +0000
commit4d506a0a0ddb5b57cac302df2dc85b6f12e28ab7 (patch)
treeb001c14aebf7619f1bc87f3f940c8f1c88e79ed2 /epan
parent977d0769bd454e39ebaf60fe51a0eb590d2b7b95 (diff)
downloadwireshark-4d506a0a0ddb5b57cac302df2dc85b6f12e28ab7.tar.gz
coap: add support for coaps (DTLS-secured CoAP)
coaps port is defined in RFC 7252, section 12.7. CoAP (RFC 7252) is defined only for UDP, not TCP. For TCP, the frame format is slightly different (draft-ietf-core-coap-tcp-tls-05) and needs more dissector changes, so remove registration for now. Change-Id: I1fc7163086f8fe66986565aa24b579ef24f72550 Ping-Bug: 13370 Reviewed-on: https://code.wireshark.org/review/19870 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-coap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index 8bc0346f44..0cba22d6f6 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -35,6 +35,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/wmem/wmem.h>
+#include "packet-dtls.h"
void proto_register_coap(void);
@@ -93,6 +94,7 @@ static dissector_handle_t coap_handle;
/* CoAP's IANA-assigned port (UDP only) number */
#define DEFAULT_COAP_PORT 5683
+#define DEFAULT_COAPS_PORT 5684
/* indicators whether those are to be showed or not */
#define DEFAULT_COAP_CTYPE_VALUE ~0U
@@ -1258,8 +1260,8 @@ void
proto_reg_handoff_coap(void)
{
media_type_dissector_table = find_dissector_table("media_type");
- dissector_add_uint_with_preference("tcp.port", DEFAULT_COAP_PORT, coap_handle);
dissector_add_uint_with_preference("udp.port", DEFAULT_COAP_PORT, coap_handle);
+ dtls_dissector_add(DEFAULT_COAPS_PORT, coap_handle);
}
/*