2006-06-02 07:11:11 +00:00
|
|
|
/* packet-tivoconnect.c
|
|
|
|
* Routines for TiVoConnect Discovery Protocol dissection
|
|
|
|
* Copyright 2006, Kees Cook <kees@outflux.net>
|
|
|
|
* IANA UDP/TCP port: 2190 (tivoconnect)
|
|
|
|
* Protocol Spec: http://tivo.com/developer/i/TiVoConnectDiscovery.pdf
|
|
|
|
*
|
|
|
|
* IANA's full name is "TiVoConnect Beacon", where as TiVo's own
|
|
|
|
* documentation calls this protocol "TiVoConnect Discovery Protocol".
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
2006-06-07 22:57:54 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2006-06-02 07:11:11 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* Copied from README.developer
|
2011-10-21 02:10:19 +00:00
|
|
|
*
|
2006-06-02 07:11:11 +00:00
|
|
|
* 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.
|
2011-10-21 02:10:19 +00:00
|
|
|
*
|
2006-06-02 07:11:11 +00:00
|
|
|
* 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.
|
2011-10-21 02:10:19 +00:00
|
|
|
*
|
2006-06-02 07:11:11 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 23:18:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2006-06-02 07:11:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO
|
|
|
|
* - split services into a subtree
|
|
|
|
* - split platform into a subtree
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include <epan/packet.h>
|
|
|
|
|
|
|
|
/* Forward declaration we need below */
|
|
|
|
void proto_reg_handoff_tivoconnect(void);
|
2013-12-10 21:30:13 +00:00
|
|
|
void proto_register_tivoconnect(void);
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_tivoconnect = -1;
|
|
|
|
static int hf_tivoconnect_flavor = -1;
|
|
|
|
static int hf_tivoconnect_method = -1;
|
|
|
|
static int hf_tivoconnect_platform = -1;
|
|
|
|
static int hf_tivoconnect_machine = -1;
|
|
|
|
static int hf_tivoconnect_identity = -1;
|
|
|
|
static int hf_tivoconnect_services = -1;
|
|
|
|
static int hf_tivoconnect_version = -1;
|
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_tivoconnect = -1;
|
|
|
|
|
|
|
|
/* Code to actually dissect the packets */
|
2006-06-09 23:06:38 +00:00
|
|
|
static int
|
2013-11-22 02:52:41 +00:00
|
|
|
dissect_tivoconnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_tcp)
|
2006-06-02 07:11:11 +00:00
|
|
|
{
|
|
|
|
/* parsing variables */
|
|
|
|
gchar * string = NULL;
|
|
|
|
gint length = -1;
|
|
|
|
/* value strings */
|
2012-12-26 05:57:06 +00:00
|
|
|
const gchar * proto_name = NULL;
|
2006-06-02 07:11:11 +00:00
|
|
|
gchar * packet_identity = NULL;
|
|
|
|
gchar * packet_machine = NULL;
|
|
|
|
|
|
|
|
/* validate that we have a tivoconnect packet */
|
2006-06-09 23:06:38 +00:00
|
|
|
if ( tvb_strncaseeql(tvb, 0, "tivoconnect", 11) != 0) {
|
|
|
|
return 0;
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
|
|
|
|
2007-12-08 09:15:23 +00:00
|
|
|
length = tvb_length(tvb);
|
2013-09-22 15:50:55 +00:00
|
|
|
string = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, 0, length);
|
2007-12-08 09:15:23 +00:00
|
|
|
|
2006-06-02 07:11:11 +00:00
|
|
|
/* Make entries in Protocol column and Info column on summary display */
|
2009-08-09 06:26:46 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TiVoConnect");
|
2011-10-21 02:10:19 +00:00
|
|
|
|
2006-06-02 07:11:11 +00:00
|
|
|
/* make a distinction between UDP and TCP packets */
|
2013-11-22 02:52:41 +00:00
|
|
|
proto_name = is_tcp ? "Discovery Connection" : "Discovery Beacon";
|
2006-06-02 07:11:11 +00:00
|
|
|
|
2010-01-13 20:32:01 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, proto_name);
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
/* Set up structures needed to add the protocol subtree and manage it */
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *tivoconnect_tree = NULL;
|
|
|
|
|
|
|
|
/* parsing variables */
|
|
|
|
guint offset = 0;
|
|
|
|
gchar * field = NULL;
|
|
|
|
|
|
|
|
/* create display subtree for the protocol */
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_tivoconnect, tvb, 0, -1, ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
tivoconnect_tree = proto_item_add_subtree(ti, ett_tivoconnect);
|
|
|
|
|
|
|
|
/* process the packet */
|
|
|
|
for ( field = strtok(string,"\n");
|
|
|
|
field;
|
|
|
|
offset+=length, field = strtok(NULL,"\n") ) {
|
|
|
|
gchar * value = NULL;
|
|
|
|
gint fieldlen;
|
|
|
|
|
2009-03-29 14:37:57 +00:00
|
|
|
length = (int)strlen(field) + 1;
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
if ( !(value=strchr(field, '=')) ) {
|
|
|
|
/* bad packet: missing the field separator */
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
*value++='\0';
|
2009-03-29 14:37:57 +00:00
|
|
|
fieldlen=(int)strlen(field)+1;
|
2006-06-02 07:11:11 +00:00
|
|
|
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
if ( g_ascii_strcasecmp(field,"tivoconnect") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_flavor, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"method") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_method, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"platform") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_platform, tvb, offset+fieldlen,
|
2011-10-16 23:38:49 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"machine") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_machine, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
packet_machine = value;
|
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"identity") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_identity, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
packet_identity = value;
|
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"services") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_services, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
|
|
|
else if ( g_ascii_strcasecmp(field,"swversion") == 0 ) {
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_tree_add_item(tivoconnect_tree,
|
|
|
|
hf_tivoconnect_version, tvb, offset+fieldlen,
|
2011-10-15 18:46:26 +00:00
|
|
|
length-fieldlen-1, ENC_ASCII|ENC_NA);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* unknown field! */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Adjust "Info" column and top of tree into more useful info */
|
|
|
|
if (packet_machine) {
|
|
|
|
proto_item_append_text(ti, ", %s", packet_machine);
|
2013-06-14 02:50:46 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_name, packet_machine);
|
|
|
|
}
|
|
|
|
if (packet_identity) {
|
|
|
|
proto_item_append_text(ti,
|
|
|
|
packet_machine ? " (%s)" : ", ID:%s",
|
|
|
|
packet_identity);
|
|
|
|
if (packet_machine) {
|
2013-06-14 02:50:46 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s (%s)",
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_name, packet_machine, packet_identity);
|
|
|
|
}
|
|
|
|
else {
|
2013-06-14 02:50:46 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ID:%s",
|
2006-06-02 07:11:11 +00:00
|
|
|
proto_name, packet_identity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If this protocol has a sub-dissector call it here, see section 1.8 */
|
|
|
|
|
2006-06-09 23:06:38 +00:00
|
|
|
return tvb_length(tvb);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|
|
|
|
|
2013-11-22 02:52:41 +00:00
|
|
|
static int
|
|
|
|
dissect_tivoconnect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|
|
|
{
|
|
|
|
return dissect_tivoconnect(tvb, pinfo, tree, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
dissect_tivoconnect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|
|
|
{
|
|
|
|
return dissect_tivoconnect(tvb, pinfo, tree, FALSE);
|
|
|
|
}
|
2006-06-02 07:11:11 +00:00
|
|
|
|
2006-06-07 22:57:54 +00:00
|
|
|
/* Register the protocol with Wireshark */
|
2006-06-02 07:11:11 +00:00
|
|
|
|
|
|
|
/* this format is require because a script is used to build the C function
|
|
|
|
that calls all the protocol registration.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_tivoconnect(void)
|
2011-10-21 02:10:19 +00:00
|
|
|
{
|
2006-06-02 07:11:11 +00:00
|
|
|
/* Setup list of header fields See Section 1.6.1 for details*/
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_tivoconnect_flavor,
|
|
|
|
{ "Flavor", "tivoconnect.flavor",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"Protocol Flavor supported by the originator", HFILL }},
|
|
|
|
{ &hf_tivoconnect_method,
|
|
|
|
{ "Method", "tivoconnect.method",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"Packet was delivered via UDP(broadcast) or TCP(connected)", HFILL }},
|
|
|
|
{ &hf_tivoconnect_platform,
|
|
|
|
{ "Platform", "tivoconnect.platform",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"System platform, either tcd(TiVo) or pc(Computer)", HFILL }},
|
|
|
|
{ &hf_tivoconnect_machine,
|
|
|
|
{ "Machine", "tivoconnect.machine",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"Human-readable system name", HFILL }},
|
|
|
|
{ &hf_tivoconnect_identity,
|
|
|
|
{ "Identity", "tivoconnect.identity",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"Unique serial number for the system", HFILL }},
|
|
|
|
{ &hf_tivoconnect_services,
|
|
|
|
{ "Services", "tivoconnect.services",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"List of available services on the system", HFILL }},
|
|
|
|
{ &hf_tivoconnect_version,
|
|
|
|
{ "Version", "tivoconnect.version",
|
2011-10-21 02:10:19 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
2006-06-02 07:11:11 +00:00
|
|
|
"System software version", HFILL }},
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_tivoconnect,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Register the protocol name and description */
|
|
|
|
proto_tivoconnect = proto_register_protocol("TiVoConnect Discovery Protocol",
|
|
|
|
"TiVoConnect", "tivoconnect");
|
|
|
|
|
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
|
|
|
proto_register_field_array(proto_tivoconnect, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_tivoconnect(void)
|
|
|
|
{
|
2013-11-22 02:52:41 +00:00
|
|
|
dissector_handle_t tivoconnect_tcp_handle, tivoconnect_udp_handle;
|
2008-09-26 22:07:45 +00:00
|
|
|
|
2013-11-22 02:52:41 +00:00
|
|
|
tivoconnect_tcp_handle = new_create_dissector_handle(dissect_tivoconnect_tcp, proto_tivoconnect);
|
|
|
|
tivoconnect_udp_handle = new_create_dissector_handle(dissect_tivoconnect_udp, proto_tivoconnect);
|
|
|
|
dissector_add_uint("udp.port", 2190, tivoconnect_udp_handle);
|
|
|
|
dissector_add_uint("tcp.port", 2190, tivoconnect_tcp_handle);
|
2006-06-02 07:11:11 +00:00
|
|
|
}
|