Commit graph

177 commits

Author SHA1 Message Date
Bill Meier
2f9dfbce45 (Trivial) Whitespace cleanup.
svn path=/trunk/; revision=39513
2011-10-23 17:10:59 +00:00
Bill Meier
794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier
d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +00:00
Bill Meier
126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier
67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier
4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier
94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Anders Broman
4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Bill Meier
ad1efb6b9c (Trivial) Remove trailing whitespace from lines for a few files.
svn path=/trunk/; revision=39084
2011-09-21 23:42:55 +00:00
Anders Broman
7b0ca24a90 Change encoding type from FALSE to ENC_BIG_ENDIAN.
svn path=/trunk/; revision=37961
2011-07-11 13:41:19 +00:00
Anders Broman
66e3012f0f Make sure consumed is set.
svn path=/trunk/; revision=37959
2011-07-11 10:42:16 +00:00
Anders Broman
25d82cf3e3 From Michael Mann:
Added filters for BOOTP options of "basic" types (modeled after packet-wssap.c)

"bootp.option.length" only used when specific option filter can't be found.
"bootp.option.value" expanded to support multiple types

Converted "custom options string" to UAT

replacing many proto_tree_add_text() calls with
proto_tree_add_item(), so the BOOTP dissector is considerably more filterable

svn path=/trunk/; revision=37958
2011-07-11 10:12:40 +00:00
Bill Meier
bfa6690f20 Allow filtering on docsis-capability-type field;
Rename docs_cm_... to docsis_cm_cap_....
Do whitespace & indentation cleanup.

svn path=/trunk/; revision=37514
2011-06-02 00:56:41 +00:00
Bill Meier
a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Jörg Mayer
a6691d79c6 Fix coverity CID 855: remove an unused variable
svn path=/trunk/; revision=36559
2011-04-11 17:21:15 +00:00
Jaap Keuter
ff7eeffdb9 From Joe McEachern:
Add support the 6RD DHCP option defined in RFC 5969.

svn path=/trunk/; revision=35915
2011-02-11 08:00:21 +00:00
Jeff Morriss
be81bc949a Rename arphrdaddr_to_str() to tvb_arphrdaddr_to_str() and make it take a pointer a TVB
and an offset instead of (generally) a pointer into a TVB.

svn path=/trunk/; revision=35913
2011-02-11 03:33:11 +00:00
Jeff Morriss
d8659693ef Check for places where tvb_bytes_to_str() or tvb_get_bytes_to_str_punct()
should be used (instead of the non-tvb functions with a call to tvb_get_ptr()).

Use those functions in a bunch of places.

svn path=/trunk/; revision=35911
2011-02-11 02:43:07 +00:00
Jaap Keuter
cc3952ca4f From Hadar Shoham:
bootp option 123 has 2 chooses - coordinate based location RFC 3825 or
CableLabs DSS_ID. Add better support for having 2 DSS_ID with dynamic
size (up to 32 byte each)

svn path=/trunk/; revision=35530
2011-01-14 07:20:31 +00:00
Jeff Morriss
6cfdeed280 Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str().

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s.

Replace some memcpy()+tvb_get_ptr() with tvb_memcpy().

svn path=/trunk/; revision=35529
2011-01-14 03:44:58 +00:00
Jaap Keuter
b9b7d51226 From Hadar Shoham:
Add support to EuroCableLabs at bootp opt 60 sub 23.
according to PKT-SP-PROV1.5-I04-090624, paragraph 10.23 Device MIB Support:
type 2 is indicating EuroCableLabs.

svn path=/trunk/; revision=35350
2011-01-03 21:40:03 +00:00
Guy Harris
b3ea7f6771 Update some URLs, add another spec.
At least for one of the DOCSIS suboptions, do length checking.

svn path=/trunk/; revision=35320
2010-12-31 23:30:38 +00:00
Guy Harris
06a370929b Fix incomplete conversion from an on-the-stack buffer to an ep_allocated
buffer - the size of the latter can't be found with sizeof, as all you
have is a pointer to the buffer.  sizeof (pointer) happened, by chance,
to give the right answer on ILP32 platforms, but gave a too-big answer
on LP64 and LLP64 platforms, which meant we overflowed the buffer when
clearing it.

svn path=/trunk/; revision=35297
2010-12-29 19:40:36 +00:00
Guy Harris
a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier
62e44e3f66 Minor cleanup:
- Initialize a few static global variables;
- Remove two unnecessary calls to g_hash_table_foreach_remove;
- Do whitespace cleanup and use consistent indentation;
- Fix a few typos and fix up several comments.

svn path=/trunk/; revision=35183
2010-12-14 01:50:31 +00:00
Jeff Morriss
bcfa8de44a Add some casts to get the Windows builds going.
svn path=/trunk/; revision=34608
2010-10-21 21:02:07 +00:00
Jaap Keuter
81f60271c6 From Robert Wynn:
CableLabs has added additional TLV's to DHCP Option 60 Modem capabilities
reporting for their Docsis 2.0 devices.  Additionally, in Docsis 3.0, they have
moved the capabilities portion of Option 60 (sub-option 5) to now reside in the
vendor specific Option 125 using their Enterprise number (4491).

svn path=/trunk/; revision=34605
2010-10-21 19:01:35 +00:00
Bill Meier
7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Jeff Morriss
1fcaf7fb3f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5114 (infinite loop in
bootp dissector when dissecting packetcable MTA capabilities).

Limit the tlv_len to G_MAXUINT16 to prevent an integer overflow from causing us to
increment the working offset by 0 (thus causing us to loop).

svn path=/trunk/; revision=33846
2010-08-19 02:17:01 +00:00
Stig Bjørlykke
6722384a7d Added some bootp option strings from IANA.
svn path=/trunk/; revision=33571
2010-07-18 16:20:29 +00:00
Bill Meier
c8a1fac3f4 From Jason Burns: DHCP Dissector - Support for DHCP Option 150 TFTP Server Address
"According to this document DHCP Option 150 is an array of IPv4 TFTP Server
Addresses

http://cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a00800942f4.shtml#tftp_option

I fixed the capitalization of this option in the bootp dissector and changed
the type to match the actual use of the option. (ipv4_list)"

From me: Add a pointer to a draft RFC about the DHCP "TFTP Server Address" option.



svn path=/trunk/; revision=33203
2010-06-10 01:33:02 +00:00
Jaap Keuter
7e44a40238 From Lars Ruoff:
Updated and added some sanity checks to Alcatel-Lucent DHCP vendor specific options.

svn path=/trunk/; revision=32900
2010-05-19 18:09:33 +00:00
Jaap Keuter
5140e8f44e From Lars Ruoff:
Add some more robustness to Alcatel-Lucent vendor specific 
DHCP options and add some new option values.

It now supports all currently implemented option values, i.e.:
{Option Opcode Length (bytes) Content}
AVA 58 (0x3A) 2 Vlanid
IP Touch TFTP1 64 (0x40) 4 IPv4 address
IP Touch TFTP2 65 (0x41) 4 IPv4 address
APPLICATION_TYPE 66 (0x42) 1 0 (noe) / 1 (sip)
SIP URL 67 (0x43) x bytes url string

svn path=/trunk/; revision=32845
2010-05-17 18:48:44 +00:00
Bill Meier
10ffd14b8f Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
svn path=/trunk/; revision=32735
2010-05-10 15:54:57 +00:00
Gerald Combs
51d79ab620 From Hadar Shoham via bug 4750:
1. add docsis3.0 support in bootp option 60
2. change to text option 123 (Cable lab)
3. change to text option 43 sub option 8 (OUI)

svn path=/trunk/; revision=32696
2010-05-06 23:34:56 +00:00
Jaap Keuter
991e709d56 Update for RFC 4578.
svn path=/trunk/; revision=32286
2010-03-25 22:15:11 +00:00
Bill Meier
8024cbd206 (Minor) Fix a gcc -Wshadow warning.
svn path=/trunk/; revision=32233
2010-03-18 20:19:07 +00:00
Bill Meier
2f07f816b2 From Hadar Shoham: Bootp option 61
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4583

svn path=/trunk/; revision=32232
2010-03-18 19:18:02 +00:00
Stig Bjørlykke
0d8a56ef72 From Hadar Shoham via bug 4578:
Fix bootp option 125, Cablelab sun option 1, Option Request as string instead
of integer.

svn path=/trunk/; revision=32189
2010-03-14 17:32:58 +00:00
Stig Bjørlykke
fd2911dd89 Fixed decoding of CableLab "Agent Information Option" according to
CL-SP-CANN-DHCP-Reg-I03-090811.

svn path=/trunk/; revision=32169
2010-03-11 11:49:20 +00:00
Stig Bjørlykke
15a0ac519c From Hadar Shoham via bug 4567:
Add support to CL-SP-CANN-DHCP-Reg-I03-090811 at bootp option 124.

svn path=/trunk/; revision=32168
2010-03-11 09:19:36 +00:00
Stig Bjørlykke
26521245a5 Added support for V-I Vendor Class (RFC3925).
svn path=/trunk/; revision=32161
2010-03-10 11:09:47 +00:00
Stig Bjørlykke
383e289f16 Print Enterprise-number as "Name (value)".
svn path=/trunk/; revision=32159
2010-03-10 10:09:30 +00:00
Stig Bjørlykke
193e353b7a From Hadar Shoham via bug 4566:
Add support to CL-SP-CANN-DHCP-Reg-I03-090811 at bootp option 123.

svn path=/trunk/; revision=32158
2010-03-10 09:49:29 +00:00
Jaap Keuter
761414b98e Final missing end option is a protocol error too.
svn path=/trunk/; revision=31968
2010-02-23 20:04:11 +00:00
Jaap Keuter
f7e082ad35 Add expert items for missing end option in:
- vendor option field
- overloaded sname field
- overloaded file name field

Improve the overload determination of sname and file name field.

svn path=/trunk/; revision=31927
2010-02-19 22:46:07 +00:00
Jaap Keuter
a1a0bf1dbb From Hadar Shoham:
Add Packet Cable 2.0 bootp option 60 support:
sub-option 01 new type value 2 for packet cable 2.0
sub-option 1a new sun-option "Certificate Bootstrapping Support" length 01,
value 1 for support and 0 for not supported.

svn path=/trunk/; revision=31647
2010-01-24 22:06:29 +00:00
Stig Bjørlykke
8e3ca1a4f6 From Jon via bug 4344:
Decode "client last transaction time" and "associated ip"
options added to DHCP in RFC4388 as the proper types.

svn path=/trunk/; revision=31347
2009-12-22 12:07:49 +00:00
Kovarththanan Rajaratnam
a8b7853536 ..but make sure we call tvb_get_guint8() at least once ;)
svn path=/trunk/; revision=31043
2009-11-21 11:21:23 +00:00
Kovarththanan Rajaratnam
d56779b966 Don't call tvb_get_guint8() twice
svn path=/trunk/; revision=31039
2009-11-21 10:45:19 +00:00