Add support for registering protocols (dissectors) over DTLS.

This is intentionally broken off of SSL to avoid confusion when UDP is involved.

Change-Id: Icfd3054be6aed2ebbd850a608efbc24f1a8f3831
Reviewed-on: https://code.wireshark.org/review/11612
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2015-11-06 14:55:19 -05:00
parent 3aefd3b5b2
commit f4921c10e6
3 changed files with 45 additions and 0 deletions

View File

@ -1487,6 +1487,7 @@ DISSECTOR_INCLUDES = \
packet-dns.h \
packet-dop.h \
packet-dsp.h \
packet-dtls.h \
packet-dtn.h \
packet-dvbci.h \
packet-enip.h \

View File

@ -1951,6 +1951,18 @@ proto_reg_handoff_dtls(void)
initialized = TRUE;
}
void
dtls_dissector_add(guint port, dissector_handle_t handle)
{
ssl_association_add("dtls.port", dtls_handle, handle, port, FALSE);
}
void
dtls_dissector_delete(guint port, dissector_handle_t handle)
{
ssl_association_remove("dtls.port", dtls_handle, handle, port, FALSE);
}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*

View File

@ -0,0 +1,32 @@
/* packet-dtls.h
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __PACKET_DTLS_H__
#define __PACKET_DTLS_H__
#include "ws_symbol_export.h"
#include <epan/packet.h>
WS_DLL_PUBLIC void dtls_dissector_add(guint port, dissector_handle_t handle);
WS_DLL_PUBLIC void dtls_dissector_delete(guint port, dissector_handle_t handle);
#endif /* __PACKET_DTLS_H__ */