Commit Graph

80 Commits

Author SHA1 Message Date
Guy Harris d49241d087 Use symbolic names for ARP types.
Clean up indentation.

svn path=/trunk/; revision=13015
2005-01-13 07:49:31 +00:00
Guy Harris 71217a8007 As we've made the tap_specific_data field of a tap_packet_t structure a
const pointer (so that we don't get complaints when we make the
tap-specific data argument to "tap_queue_packet()" a const pointer,
allowing dissectors to hand const data to a tap without a complaint), we
should make the tap per-packet function take a const pointer as an
argument as well.  Do so.

In some taps, use _U_, or actually use the argument, rather than
sticking in dummy "X = X" assignments to fake use of parameters.  (This
means that the tap functions in question no longer have the notion that
they act on a particular static structure wired in.)

svn path=/trunk/; revision=12910
2005-01-01 02:57:02 +00:00
Guy Harris 1220516388 From Yaniv Kaul: add Ethernet address-to-name (or, at least, address-to-
vendor-name-and-next-three-bytes-in-hex) resolution for Ethernet/802.x
hardware addresses.

Move the ARP hardware types into a header file, for use by dissectors
other than the ARP dissector.

svn path=/trunk/; revision=12839
2004-12-26 22:26:02 +00:00
Guy Harris e20d80ea57 Use "plurality()" rather than locally-defined "PLURALIZE()" macros, and
get rid of the definition of "PLURALIZE()" in modules that don't use it.

svn path=/trunk/; revision=12791
2004-12-20 22:13:48 +00:00
Gerald Combs 7053cbed3b Rename the "boolean" enum to "val_boolean" lest the Microsoft compiler let
its displeasure be known.

svn path=/trunk/; revision=12396
2004-10-26 16:08:16 +00:00
Guy Harris 4011ff29b7 Add a "data" item to the opt_info structure, containing a "const void
*".  For val_u_byte, if non-null, it points to a "value_string" table to
be used to interpret the value.  Replace "toggle" and "yes_no" with
"boolean, and have the "data" pointer point to a "struct
true_false_string" to be used to interpret the value.

The NetBIOS-over-TCP/IP Node Type option can now be a regular val_u_byte
value, with the appropriate value_string table.

Construct the item for DHCP options by initializing it without the value
and appending the value to the item's string with
"proto_item_append_text()".

svn path=/trunk/; revision=12391
2004-10-26 07:00:23 +00:00
Guy Harris 671cd939ae Make yes_no work in "dissect_netware_ip_suboption()" the way it works
elsewhere, and replace "struct o63_opt_info" with "struct opt_info".

svn path=/trunk/; revision=12390
2004-10-25 23:25:59 +00:00
Guy Harris 32539c3e28 "struct o43pxeclient_opt_info" and "struct o43cablelabs_opt_info" look
just like "struct opt_info", except for the name of the "enum
field_type" field; use "opt_info" instead of them.  Rename the
equivalent field in "struct o63_opt_info", as well, with an eye towards
changing "struct opt_info" to be able to replace "struct o63_opt_info"
as well.

svn path=/trunk/; revision=12389
2004-10-25 09:31:13 +00:00
Guy Harris ec3230d492 Remove val_s_long as it's unimplemented and unused - put it back if it's
ever necessary.

Make some options, that have only one IPv4 address, use ipv4 rather than
ipv4_list.

Add val_u_short_list, and have val_u_short accept one and only one
16-bit integer.  Give options the appropriate type.

Shuffle the types a bit in the enum, and shuffle the cases for types
around to match the order in the enum.

svn path=/trunk/; revision=12388
2004-10-25 08:56:39 +00:00
Guy Harris b140c74433 Rename "ipv4" to "ipv4_list", as it's used for lists of IPv4 addresses,
and add a separate "ipv4"; use that in the dissector for Netware IP
options.

Add a "presence" option type, for options with no value whose presence
is significant; use that in the dissector for Netware IP options.

svn path=/trunk/; revision=12387
2004-10-25 08:33:39 +00:00
Guy Harris a7b17234c3 Pass to the the routines that dissect suboption lists the offset of the
end of the option, and have them do bounds checking.  Also, in some
places, check the suboption length.

In "dissect_netware_ip_suboption()", process the suboption length
(which, according to RFC 2242, is present in all suboptions), and use
val_u_byte rather than val_u_short for 1-byte options.

svn path=/trunk/; revision=12386
2004-10-25 08:17:11 +00:00
Guy Harris e08ef66cfe Restructure the DHCP option parsing a bit, to make it a bit clearer -
and fix some bugs that this made a bit more obvious.  Add checks of the
option length.

Clean up white space.

svn path=/trunk/; revision=12385
2004-10-24 22:53:06 +00:00
Guy Harris 7b1b2d0b1a Don't display the FQDN in the FQDN option if the length of the FQDN is
zero.

Clean up some field names and descriptions.

svn path=/trunk/; revision=12384
2004-10-24 10:30:03 +00:00
Guy Harris b248485905 Fix the length used for the name in the FQDN option.
svn path=/trunk/; revision=12383
2004-10-24 10:18:16 +00:00
Gerald Combs 7e6c4fec40 From Thomas Anders:
- change DHCP option 122 dissection to use official RFC 3495/3594 wording
  (if bootp.pkt.ccc.protocol_version preference setting is 2 or 3)
- update CableLabs specification references
- some minor cleanup (option 43 also) 

svn path=/trunk/; revision=12338
2004-10-18 14:24:25 +00:00
Guy Harris 236123a94b From Thomas Anders: DHCP option 6 enhancements:
- add full support for upcoming PacketCable 1.5
- fix bug regarding MTA/CM Device Capabilities Length
- PacketCable MTA: fix bug regarding RSVP and UGS-AD options
- make presentation more compact (similar to other TLV data dissectors)
- change some descriptions and variables to (hopefully) make more sense
  to DOCSIS/PacketCable users

svn path=/trunk/; revision=12325
2004-10-17 02:36:32 +00:00
Guy Harris cde0733be8 Clena up a few things.
Squelch a compiler warning.

svn path=/trunk/; revision=12311
2004-10-16 05:59:24 +00:00
Jörg Mayer 429ede32f8 Add support for draft-ietf-dhc-fqdn-option-07.txt
svn path=/trunk/; revision=12309
2004-10-16 02:04:08 +00:00
Jörg Mayer db564c5096 Change Client Identifier display a bit to better handle non-hw identifiers of length 7
svn path=/trunk/; revision=12308
2004-10-16 00:19:07 +00:00
Guy Harris 063b6fc3f5 Use "tvb_format_stringzpad()" rather than "tvb_format_text()", as per
RFC 2132, which says

	Options containing NVT ASCII data SHOULD NOT include a trailing
	NULL; however, the receiver of such options MUST be prepared to
	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	delete trailing nulls if they exist.
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

svn path=/trunk/; revision=12295
2004-10-14 08:02:58 +00:00
Guy Harris 96fb567289 Use "tvb_format_text()" for string items, so non-printable characters
don't get stuck into protocol tree item representations (and so that
they can be more easily found if, as, and when we get around to handling
different character encodings).

Clean up white space.

Get rid of another sprintf() on top of a string constant.

svn path=/trunk/; revision=12211
2004-10-05 23:22:36 +00:00
Guy Harris 9b9223d710 Fix a bunch of compiler warnings (and some code that was bogusly
attempting to overwrite a string constant - possibly with a longer
string!).

svn path=/trunk/; revision=12210
2004-10-05 23:02:09 +00:00
Gerald Combs 853fad671b Decode cable modem and MTA device capabilities. Make the CableLabs
Client Configuration option number configurable.  Add an option to switch
between the CCC versions defined in PKT-SP-PROV-I05-021127, IETF draft 5,
and RFC 3495.  Code contributed by CableLabs.

Remove an unneeded macro.

svn path=/trunk/; revision=12208
2004-10-05 17:44:53 +00:00
Jörg Mayer 8c788146a0 initializing unsigned variables to -1 is considered interesting
svn path=/trunk/; revision=12173
2004-10-01 12:35:55 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Jörg Mayer 96d7433ba7 Missed the second case in last change
svn path=/trunk/; revision=11790
2004-08-21 19:47:50 +00:00
Jörg Mayer 7310caf569 The chaddr element is always 16 bytes in size, although only hlen bytes are used
svn path=/trunk/; revision=11789
2004-08-21 19:41:24 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00