From Vassilii Khachaturov: put protocol blurbs into tables generated

with the "-G fields" flag.

In the scripts to process that output, handle FT_UINT64, FT_INT64, and
FT_UINT_STRING.

svn path=/trunk/; revision=6012
This commit is contained in:
Guy Harris 2002-08-18 19:08:30 +00:00
parent 50dfd3eb31
commit 14cff7ceba
5 changed files with 42 additions and 25 deletions

View File

@ -1366,6 +1366,11 @@ Alfred Koebler <ak[AT]icon-sult.de> {
files for Ethernet)
}
Vassilii Khachaturov <Vassilii.Khachaturov@comverse.com> {
Put protocol blurbs into tables generated with the "-G fields"
flag
}
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.

View File

@ -9,25 +9,28 @@
# will be replaced by the pod-formatted glossary
# STDOUT is the output
#
# $Id: dfilter2pod.pl,v 1.2 2001/04/19 23:17:30 guy Exp $
# $Id: dfilter2pod.pl,v 1.3 2002/08/18 19:08:23 guy Exp $
%ftenum_names = (
'FT_NONE', 'No value',
'FT_PROTOCOL', 'Protocol',
'FT_PROTOCOL', 'Protocol',
'FT_BOOLEAN', 'Boolean',
'FT_UINT8', 'Unsigned 8-bit integer',
'FT_UINT16', 'Unsigned 16-bit integer',
'FT_UINT24', 'Unsigned 24-bit integer',
'FT_UINT32', 'Unsigned 32-bit integer',
'FT_UINT64', 'Unsigned 64-bit integer',
'FT_INT8', 'Signed 8-bit integer',
'FT_INT16', 'Signed 16-bit integer',
'FT_INT24', 'Signed 24-bit integer',
'FT_INT32', 'Signed 32-bit integer',
'FT_INT64', 'Signed 64-bit integer',
'FT_DOUBLE', 'Double-precision floating point',
'FT_ABSOLUTE_TIME', 'Date/Time stamp',
'FT_RELATIVE_TIME', 'Time duration',
'FT_STRING', 'String',
'FT_STRINGZ', 'String',
'FT_UINT_STRING', 'String',
'FT_ETHER', '6-byte Hardware (MAC) Address',
'FT_BYTES', 'Byte array',
'FT_IPv4', 'IPv4 address',
@ -49,10 +52,10 @@ while (<STDIN>) {
}
# Store header field information
else {
($junk, $name, $abbrev, $type, $parent) =
($junk, $name, $abbrev, $type, $parent, $blurb) =
split(/\t+/, $_);
push(@{$field_abbrev{$parent}}, $abbrev);
$field_info{$abbrev} = [ $name, $type ];
$field_info{$abbrev} = [ $name, $type, $blurb ];
}
}
@ -87,8 +90,12 @@ sub create_dfilter_table {
if ($field_abbrev{$proto_abbrev{$proto_name}}) {
for $field_abbrev (sort @{$field_abbrev{$proto_abbrev{$proto_name}}}) {
print " $field_abbrev ", $field_info{$field_abbrev}[0],"\n";
print " ", $ftenum_names{$field_info{$field_abbrev}[1]}, "\n\n";
print " $field_abbrev ", $field_info{$field_abbrev}[0],"\n",
" ", $ftenum_names{$field_info{$field_abbrev}[1]},
"\n";
print " ", $field_info{$field_abbrev}[2], "\n"
if $field_info{$field_abbrev}[2];
print "\n";
}
}
}

View File

@ -9,25 +9,28 @@
# will be replaced by the pod-formatted glossary
# STDOUT is the output
#
# $Id: dfilter2sgml,v 1.2 2001/04/19 23:17:30 guy Exp $
# $Id: dfilter2sgml,v 1.3 2002/08/18 19:08:23 guy Exp $
%ftenum_names = (
'FT_NONE', 'No value',
'FT_PROTOCOL', 'Protocol',
'FT_BOOLEAN', 'Boolean',
'FT_UINT8', 'Unsigned 8-bit integer',
'FT_UINT16', 'Unsigned 16-bit integer',
'FT_UINT24', 'Unsigned 24-bit integer',
'FT_UINT32', 'Unsigned 32-bit integer',
'FT_INT8', 'Signed 8-bit integer',
'FT_INT16', 'Signed 16-bit integer',
'FT_INT24', 'Signed 24-bit integer',
'FT_INT32', 'Signed 32-bit integer',
'FT_NONE', 'No value',
'FT_PROTOCOL', 'Protocol',
'FT_BOOLEAN', 'Boolean',
'FT_UINT8', 'Unsigned 8-bit integer',
'FT_UINT16', 'Unsigned 16-bit integer',
'FT_UINT24', 'Unsigned 24-bit integer',
'FT_UINT32', 'Unsigned 32-bit integer',
'FT_UINT64', 'Unsigned 64-bit integer',
'FT_INT8', 'Signed 8-bit integer',
'FT_INT16', 'Signed 16-bit integer',
'FT_INT24', 'Signed 24-bit integer',
'FT_INT32', 'Signed 32-bit integer',
'FT_INT64', 'Signed 64-bit integer',
'FT_DOUBLE', 'Double-precision floating point',
'FT_ABSOLUTE_TIME', 'Date/Time stamp',
'FT_RELATIVE_TIME', 'Time duration',
'FT_STRING', 'String',
'FT_STRINGZ', 'String',
'FT_UINT_STRING', 'String',
'FT_ETHER', '6-byte Hardware (MAC) Address',
'FT_BYTES', 'Byte array',
'FT_IPv4', 'IPv4 address',
@ -49,10 +52,10 @@ while (<STDIN>) {
}
# Store header field information
else {
($junk, $name, $abbrev, $type, $parent) =
($junk, $name, $abbrev, $type, $parent, $blurb) =
split(/\t+/, $_);
push(@{$field_abbrev{$parent}}, $abbrev);
$field_info{$abbrev} = [ $name, $type ];
$field_info{$abbrev} = [ $name, $type, $blurb ];
}
}
@ -92,11 +95,11 @@ sub create_dfilter_table {
print "<section id=\"SID$ns_proto_name\"><title>$proto_name ($proto_abbrev{$proto_name})</>\n\n";
print "<table id=\"TID$ns_proto_name\"><title>$proto_name ($proto_abbrev{$proto_name})</>\n";
print "<tgroup cols=\"3\">\n";
print "<tgroup cols=\"4\">\n";
# print "<colspec colnum=\"1\" colwidth=\"80pt\">\n";
# print "<colspec colnum=\"2\" colwidth=\"80pt\"\n>";
print "<thead>\n <row>\n ";
print "<entry>Field</>\n <entry>Field Name</>\n <entry>Type</>\n\n";
print "<entry>Field</>\n <entry>Field Name</>\n <entry>Type</>\n\n <entry>Description</>";
print " </row>\n</thead>\n<tbody>\n";
@ -109,6 +112,7 @@ sub create_dfilter_table {
print " <entry>$field_abbrev</>\n";
print " <entry>", $field_info{$field_abbrev}[0], "</>\n";
print " <entry>", $ftenum_names{$field_info{$field_abbrev}[1]}, "</>\n";
print " <entry>", $field_info{$field_abbrev}[2], "</>\n";
print " </row>\n\n";
}

View File

@ -1467,6 +1467,7 @@ B<http://www.ethereal.com>.
Hidetaka Ogawa <ogawa[AT]bs2.qnes.nec.co.jp>
Jan Kratochvil <short[AT]ucw.cz>
Alfred Koebler <ak[AT]icon-sult.de>
Vassilii Khachaturov <Vassilii.Khachaturov@comverse.com>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his
permission to use his version of snprintf.c.

View File

@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
* $Id: proto.c,v 1.71 2002/08/02 21:29:39 jmayer Exp $
* $Id: proto.c,v 1.72 2002/08/18 19:08:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -3044,8 +3044,8 @@ proto_registrar_dump_fields(void)
g_assert(parent_hfinfo);
enum_name = ftype_name(hfinfo->type);
printf("F\t%s\t%s\t%s\t%s\n", hfinfo->name, hfinfo->abbrev,
enum_name,parent_hfinfo->abbrev);
printf("F\t%s\t%s\t%s\t%s\t%s\n", hfinfo->name, hfinfo->abbrev,
enum_name,parent_hfinfo->abbrev, hfinfo->blurb);
}
}
}