1999-12-12 22:40:10 +00:00
|
|
|
/* packet-v120.c
|
|
|
|
* Routines for v120 frame disassembly
|
|
|
|
* Bert Driehuis <driehuis@playbeing.org>
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
1999-12-12 22:40:10 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
2001-12-03 04:00:26 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
1999-12-12 22:40:10 +00:00
|
|
|
* Copyright 1998
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-12 22:40:10 +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.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-12 22:40:10 +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.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-12-12 22:40:10 +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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <glib.h>
|
|
|
|
#include <string.h>
|
2002-01-21 07:37:49 +00:00
|
|
|
#include <epan/packet.h>
|
1999-12-12 22:40:10 +00:00
|
|
|
#include "xdlc.h"
|
|
|
|
|
|
|
|
static int proto_v120 = -1;
|
|
|
|
static int hf_v120_address = -1;
|
|
|
|
static int hf_v120_control = -1;
|
2004-01-03 03:51:27 +00:00
|
|
|
static int hf_v120_n_r = -1;
|
|
|
|
static int hf_v120_n_s = -1;
|
|
|
|
static int hf_v120_p = -1;
|
|
|
|
static int hf_v120_p_ext = -1;
|
|
|
|
static int hf_v120_f = -1;
|
|
|
|
static int hf_v120_f_ext = -1;
|
|
|
|
static int hf_v120_s_ftype = -1;
|
|
|
|
static int hf_v120_u_modifier_cmd = -1;
|
|
|
|
static int hf_v120_u_modifier_resp = -1;
|
|
|
|
static int hf_v120_ftype_i = -1;
|
|
|
|
static int hf_v120_ftype_s_u = -1;
|
|
|
|
static int hf_v120_ftype_s_u_ext = -1;
|
1999-12-14 06:21:19 +00:00
|
|
|
static int hf_v120_header = -1;
|
1999-12-12 22:40:10 +00:00
|
|
|
|
|
|
|
static gint ett_v120 = -1;
|
|
|
|
static gint ett_v120_address = -1;
|
|
|
|
static gint ett_v120_control = -1;
|
1999-12-14 06:21:19 +00:00
|
|
|
static gint ett_v120_header = -1;
|
|
|
|
|
2001-11-25 22:19:25 +00:00
|
|
|
static dissector_handle_t data_handle;
|
|
|
|
|
2002-04-11 09:38:03 +00:00
|
|
|
static int dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree);
|
1999-12-12 22:40:10 +00:00
|
|
|
|
2004-01-03 03:51:27 +00:00
|
|
|
/* Used only for U frames */
|
|
|
|
static const xdlc_cf_items v120_cf_items = {
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
&hf_v120_p,
|
|
|
|
&hf_v120_f,
|
|
|
|
NULL,
|
|
|
|
&hf_v120_u_modifier_cmd,
|
|
|
|
&hf_v120_u_modifier_resp,
|
|
|
|
NULL,
|
|
|
|
&hf_v120_ftype_s_u
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Used only for I and S frames */
|
|
|
|
static const xdlc_cf_items v120_cf_items_ext = {
|
|
|
|
&hf_v120_n_r,
|
|
|
|
&hf_v120_n_s,
|
|
|
|
&hf_v120_p_ext,
|
|
|
|
&hf_v120_f_ext,
|
|
|
|
&hf_v120_s_ftype,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
&hf_v120_ftype_i,
|
|
|
|
&hf_v120_ftype_s_u_ext
|
|
|
|
};
|
|
|
|
|
2000-11-29 05:16:15 +00:00
|
|
|
static void
|
2000-05-31 03:58:56 +00:00
|
|
|
dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
1999-12-12 22:40:10 +00:00
|
|
|
{
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree *v120_tree, *tc, *address_tree;
|
|
|
|
proto_item *ti;
|
|
|
|
int is_response;
|
|
|
|
int addr;
|
|
|
|
char info[80];
|
|
|
|
int v120len;
|
|
|
|
guint8 byte0, byte1;
|
|
|
|
guint16 control;
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_PROTOCOL))
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "V.120");
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2000-05-31 03:58:56 +00:00
|
|
|
|
|
|
|
byte0 = tvb_get_guint8(tvb, 0);
|
|
|
|
|
2001-12-10 00:26:21 +00:00
|
|
|
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "0x%02X", byte0);
|
2000-05-31 03:58:56 +00:00
|
|
|
|
|
|
|
byte1 = tvb_get_guint8(tvb, 1);
|
|
|
|
|
|
|
|
if ((byte0 & 0x01) != 0x00 && (byte1 && 0x01) != 0x01)
|
1999-12-12 22:40:10 +00:00
|
|
|
{
|
2001-12-10 00:26:21 +00:00
|
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Invalid V.120 frame");
|
1999-12-12 22:40:10 +00:00
|
|
|
if (tree)
|
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff". This can be used if
1) the item covers the entire packet or the remaining payload in
the packet
or
2) the item's length won't be known until it's dissected, and
will be then set with "proto_item_set_len()" - if an
exception is thrown in the dissection, it means the item ran
*past* the end of the tvbuff, so saying it runs to the end of
the tvbuff is reasonable.
Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).
In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).
Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.
Fix some indentation.
svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
|
|
|
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, -1,
|
2000-03-12 04:48:32 +00:00
|
|
|
"Invalid V.120 frame");
|
1999-12-12 22:40:10 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-10-31 07:43:10 +00:00
|
|
|
if (pinfo->p2p_dir == P2P_DIR_SENT) {
|
|
|
|
is_response = (byte0 & 0x02) ? FALSE: TRUE;
|
2001-12-10 00:26:21 +00:00
|
|
|
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
|
|
|
|
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
|
|
|
|
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
|
|
|
|
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
|
2002-10-31 07:12:42 +00:00
|
|
|
} else {
|
2002-10-31 07:43:10 +00:00
|
|
|
/* XXX - what if the direction is unknown? */
|
|
|
|
is_response = (byte0 & 0x02) ? TRUE : FALSE;
|
2002-10-31 07:12:42 +00:00
|
|
|
if(check_col(pinfo->cinfo, COL_RES_DL_DST))
|
|
|
|
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
|
|
|
|
if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
|
|
|
|
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
|
1999-12-12 22:40:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (tree) {
|
Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff". This can be used if
1) the item covers the entire packet or the remaining payload in
the packet
or
2) the item's length won't be known until it's dissected, and
will be then set with "proto_item_set_len()" - if an
exception is thrown in the dissection, it means the item ran
*past* the end of the tvbuff, so saying it runs to the end of
the tvbuff is reasonable.
Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).
In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).
Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.
Fix some indentation.
svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
|
|
|
ti = proto_tree_add_protocol_format(tree, proto_v120, tvb, 0, -1, "V.120");
|
1999-12-12 22:40:10 +00:00
|
|
|
v120_tree = proto_item_add_subtree(ti, ett_v120);
|
2000-05-31 03:58:56 +00:00
|
|
|
addr = byte1 << 8 | byte0;
|
1999-12-12 22:40:10 +00:00
|
|
|
sprintf(info, "LLI: %d C/R: %s",
|
2000-05-31 03:58:56 +00:00
|
|
|
((byte0 & 0xfc) << 5) | ((byte1 & 0xfe) >> 1),
|
|
|
|
byte0 & 0x02 ? "R" : "C");
|
|
|
|
tc = proto_tree_add_text(v120_tree, tvb,
|
1999-12-12 22:40:10 +00:00
|
|
|
0, 2,
|
1999-12-14 06:21:19 +00:00
|
|
|
"Address field: %s", info);
|
1999-12-12 22:40:10 +00:00
|
|
|
address_tree = proto_item_add_subtree(tc, ett_v120_address);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(address_tree, tvb, 0, 2,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(addr, 0x0002, 2*8,
|
1999-12-12 22:40:10 +00:00
|
|
|
"Response", "Command"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
sprintf(info, "LLI: %d", ((byte0 & 0xfc) << 5) | ((byte1 & 0xfe) >> 1));
|
|
|
|
proto_tree_add_text(address_tree, tvb, 0, 2,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_numeric_bitfield(addr, 0xfefc, 2*8, info));
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(address_tree, tvb, 0, 2,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(addr, 0x0001, 2*8,
|
1999-12-12 22:40:10 +00:00
|
|
|
"EA0 = 1 (Error)", "EA0 = 0"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(address_tree, tvb, 0, 2,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(addr, 0x0100, 2*8,
|
1999-12-12 22:40:10 +00:00
|
|
|
"EA1 = 1", "EA1 = 0 (Error)"), NULL);
|
|
|
|
}
|
2000-03-17 05:21:48 +00:00
|
|
|
else {
|
1999-12-14 06:21:19 +00:00
|
|
|
v120_tree = NULL;
|
2000-03-17 05:21:48 +00:00
|
|
|
ti = NULL;
|
|
|
|
}
|
2000-05-31 03:58:56 +00:00
|
|
|
control = dissect_xdlc_control(tvb, 2, pinfo, v120_tree, hf_v120_control,
|
2004-01-03 03:51:27 +00:00
|
|
|
ett_v120_control, &v120_cf_items, &v120_cf_items_ext,
|
2004-01-18 08:32:46 +00:00
|
|
|
NULL, NULL, is_response, TRUE, FALSE);
|
2000-03-17 05:21:48 +00:00
|
|
|
if (tree) {
|
|
|
|
v120len = 2 + XDLC_CONTROL_LEN(control, TRUE);
|
2000-05-31 03:58:56 +00:00
|
|
|
if (tvb_bytes_exist(tvb, v120len, 1))
|
2002-04-11 09:38:03 +00:00
|
|
|
v120len += dissect_v120_header(tvb, v120len, v120_tree);
|
2000-03-17 05:21:48 +00:00
|
|
|
proto_item_set_len(ti, v120len);
|
2000-05-31 03:58:56 +00:00
|
|
|
next_tvb = tvb_new_subset(tvb, v120len, -1, -1);
|
2001-11-25 22:19:25 +00:00
|
|
|
call_dissector(data_handle,next_tvb, pinfo, v120_tree);
|
2000-03-17 05:21:48 +00:00
|
|
|
}
|
1999-12-12 22:40:10 +00:00
|
|
|
}
|
|
|
|
|
2000-03-17 05:21:48 +00:00
|
|
|
static int
|
2002-04-11 09:38:03 +00:00
|
|
|
dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree)
|
1999-12-14 06:21:19 +00:00
|
|
|
{
|
|
|
|
char info[80];
|
|
|
|
int header_len, nbits;
|
|
|
|
int header;
|
|
|
|
proto_tree *h_tree, *tc;
|
2000-05-31 03:58:56 +00:00
|
|
|
guint8 byte0;
|
|
|
|
|
|
|
|
byte0 = tvb_get_guint8(tvb, offset);
|
1999-12-14 06:21:19 +00:00
|
|
|
|
2000-05-31 03:58:56 +00:00
|
|
|
if (byte0 & 0x80) {
|
1999-12-14 06:21:19 +00:00
|
|
|
header_len = 1;
|
2000-05-31 03:58:56 +00:00
|
|
|
header = byte0;
|
1999-12-14 06:21:19 +00:00
|
|
|
} else {
|
|
|
|
header_len = 2;
|
2000-05-31 03:58:56 +00:00
|
|
|
header = byte0 | tvb_get_guint8(tvb, offset + 1) << 8;
|
1999-12-14 06:21:19 +00:00
|
|
|
}
|
|
|
|
nbits = header_len * 8;
|
2000-05-31 03:58:56 +00:00
|
|
|
sprintf(info, "Header: B: %d F: %d", byte0 & 0x02 ? 1:0,
|
|
|
|
byte0 & 0x01 ? 1:0);
|
|
|
|
tc = proto_tree_add_text(tree, tvb,
|
1999-12-14 06:21:19 +00:00
|
|
|
offset, header_len,
|
2000-05-31 03:58:56 +00:00
|
|
|
"Header octet: %s (0x%02X)", info, byte0);
|
1999-12-14 06:21:19 +00:00
|
|
|
h_tree = proto_item_add_subtree(tc, ett_v120_header);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x80, nbits,
|
|
|
|
"No extension octet", "Extension octet follows"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x40, nbits,
|
|
|
|
"Break condition", "No break condition"), NULL);
|
|
|
|
sprintf(info, "Error control C1/C2: %d", (header & 0x0c) >> 2);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_numeric_bitfield(header, 0x0c, nbits, info));
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x02, nbits,
|
|
|
|
"Segmentation bit B", "No segmentation bit B"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x01, nbits,
|
|
|
|
"Segmentation bit F", "No segmentation bit F"), NULL);
|
|
|
|
if (header_len == 2) {
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x8000, nbits,
|
|
|
|
"E", "E bit not set (Error)"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x4000, nbits,
|
|
|
|
"DR", "No DR"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x2000, nbits,
|
|
|
|
"SR", "No SR"), NULL);
|
2000-05-31 03:58:56 +00:00
|
|
|
proto_tree_add_text(h_tree, tvb, offset, header_len,
|
1999-12-14 06:21:19 +00:00
|
|
|
decode_boolean_bitfield(header, 0x1000, nbits,
|
|
|
|
"RR", "No RR"), NULL);
|
|
|
|
}
|
2000-03-17 05:21:48 +00:00
|
|
|
return header_len;
|
1999-12-14 06:21:19 +00:00
|
|
|
}
|
2000-03-17 05:21:48 +00:00
|
|
|
|
1999-12-12 22:40:10 +00:00
|
|
|
void
|
|
|
|
proto_register_v120(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_v120_address,
|
|
|
|
{ "Link Address", "v120.address", FT_UINT16, BASE_HEX, NULL,
|
2001-06-18 02:18:27 +00:00
|
|
|
0x0, "", HFILL }},
|
1999-12-12 22:40:10 +00:00
|
|
|
{ &hf_v120_control,
|
2000-03-17 05:21:48 +00:00
|
|
|
{ "Control Field", "v120.control", FT_UINT16, BASE_HEX, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"", HFILL }},
|
2004-01-03 03:51:27 +00:00
|
|
|
{ &hf_v120_n_r,
|
|
|
|
{ "N(R)", "v120.control.n_r", FT_UINT16, BASE_DEC,
|
|
|
|
NULL, XDLC_N_R_EXT_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_n_s,
|
|
|
|
{ "N(S)", "v120.control.n_s", FT_UINT16, BASE_DEC,
|
|
|
|
NULL, XDLC_N_S_EXT_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_p,
|
|
|
|
{ "Poll", "v120.control.p", FT_BOOLEAN, 8,
|
|
|
|
TFS(&flags_set_truth), XDLC_P_F, "", HFILL }},
|
|
|
|
{ &hf_v120_p_ext,
|
|
|
|
{ "Poll", "v120.control.p", FT_BOOLEAN, 16,
|
|
|
|
TFS(&flags_set_truth), XDLC_P_F_EXT, "", HFILL }},
|
|
|
|
{ &hf_v120_f,
|
|
|
|
{ "Final", "v120.control.f", FT_BOOLEAN, 8,
|
|
|
|
TFS(&flags_set_truth), XDLC_P_F, "", HFILL }},
|
|
|
|
{ &hf_v120_f_ext,
|
|
|
|
{ "Final", "v120.control.f", FT_BOOLEAN, 16,
|
|
|
|
TFS(&flags_set_truth), XDLC_P_F_EXT, "", HFILL }},
|
|
|
|
{ &hf_v120_s_ftype,
|
|
|
|
{ "Supervisory frame type", "v120.control.s_ftype", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(stype_vals), XDLC_S_FTYPE_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_u_modifier_cmd,
|
|
|
|
{ "Command", "v120.control.u_modifier_cmd", FT_UINT8, BASE_HEX,
|
|
|
|
VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_u_modifier_resp,
|
|
|
|
{ "Response", "v120.control.u_modifier_resp", FT_UINT8, BASE_HEX,
|
|
|
|
VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_ftype_i,
|
|
|
|
{ "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(ftype_vals), XDLC_I_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_ftype_s_u,
|
|
|
|
{ "Frame type", "v120.control.ftype", FT_UINT8, BASE_HEX,
|
|
|
|
VALS(ftype_vals), XDLC_S_U_MASK, "", HFILL }},
|
|
|
|
{ &hf_v120_ftype_s_u_ext,
|
|
|
|
{ "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
|
|
|
|
VALS(ftype_vals), XDLC_S_U_MASK, "", HFILL }},
|
1999-12-14 06:21:19 +00:00
|
|
|
{ &hf_v120_header,
|
|
|
|
{ "Header Field", "v120.header", FT_STRING, BASE_NONE, NULL, 0x0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"", HFILL }},
|
1999-12-12 22:40:10 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_v120,
|
|
|
|
&ett_v120_address,
|
|
|
|
&ett_v120_control,
|
1999-12-14 06:21:19 +00:00
|
|
|
&ett_v120_header,
|
1999-12-12 22:40:10 +00:00
|
|
|
};
|
|
|
|
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_v120 = proto_register_protocol("Async data over ISDN (V.120)",
|
|
|
|
"V.120", "v120");
|
1999-12-12 22:40:10 +00:00
|
|
|
proto_register_field_array (proto_v120, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2002-10-31 07:12:42 +00:00
|
|
|
|
|
|
|
register_dissector("v120", dissect_v120, proto_v120);
|
1999-12-12 22:40:10 +00:00
|
|
|
}
|
2000-11-29 05:16:15 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_v120(void)
|
|
|
|
{
|
2001-12-03 04:00:26 +00:00
|
|
|
data_handle = find_dissector("data");
|
2000-11-29 05:16:15 +00:00
|
|
|
}
|