Commit Graph

206 Commits

Author SHA1 Message Date
Jeff Morriss 142aaa9c5b Another part of the fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8097 :
Don't try to add a zero-length TVB to a composite TVB.

svn path=/trunk/; revision=46565
2012-12-16 16:40:36 +00:00
Jeff Morriss 0266cceef3 Make all enum_val_t's const.
svn path=/trunk/; revision=46292
2012-11-29 20:15:37 +00:00
Bill Meier c230713b57 Fix several [-Wshadow] warnings;
Also: Do some minor whitespace and formatting changes.
-This line, and those below, will be ignored--

M    dissectors/packet-bootp.c
M    dissectors/packet-bssgp.c
M    dissectors/packet-babel.c

svn path=/trunk/; revision=46191
2012-11-25 23:16:30 +00:00
Anders Broman 22d1aa1f6c From Jérôme LAFORGE:
Improvement option 120 : RFC 3396 add split option & RFC 1035 full support compression pointer


https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7969

svn path=/trunk/; revision=46042
2012-11-16 13:58:51 +00:00
Anders Broman c2d6e54458 From Jérôme LAFORGE:
[BOOTP] Add control on option length and UC_Len for option 77

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7974

svn path=/trunk/; revision=46041
2012-11-16 11:39:46 +00:00
Pascal Quantin 5c30c4715b From Jérôme LAFORGE via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7966 :
[DHCPv4] Fix bad decoding on option 119 with more than 3 fqdn

svn path=/trunk/; revision=45993
2012-11-10 21:46:06 +00:00
Jaap Keuter 51d307df06 From Jérôme LAFORGE:
Please find this patch that adds option 117 (RFC 2937).

svn path=/trunk/; revision=45963
2012-11-07 21:54:32 +00:00
Anders Broman db6feef877 Use a define for max number of characters and use that for the array size
svn path=/trunk/; revision=45904
2012-11-04 17:17:39 +00:00
Alexis La Goutte c66efd679c From Jérôme LAFORGE via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7942
[BOOTP] Implement option 119 : RFC3397 RFC3396 RFC1035

svn path=/trunk/; revision=45900
2012-11-04 16:29:15 +00:00
Alexis La Goutte 78ff79be82 From Jérôme LAFORGE via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7896 [DHCPv4] Implement RFC3004 for DHCP option 77
From me:
* Fix checkAPIs warning
* Add RFC3004 to the list of supported RFC

svn path=/trunk/; revision=45824
2012-10-29 11:10:26 +00:00
Bill Meier 8e9db03197 Minor cleanup:
- revert incorrect replacement of FALSE by ENC_BIG_ENDIAN
  done a while back;
  [The incorrect use of ENC_BIG_ENDIAN was benign since
   ENC_BIG_ENDIAN is currently defined as 0x0000000];

svn path=/trunk/; revision=45651
2012-10-18 22:22:25 +00:00
Michael Mann 8856e1a03a convert proto_tree_add_text to proto_tree_add_item and expert_add_info_format for packet-dhcpv6.c and packet-dhcp-failover.c
"Refactor" value_string in ARP dissector

svn path=/trunk/; revision=45535
2012-10-14 15:27:52 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Pascal Quantin d2715d3b5f Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7701 :
Do sanity check on option length earlier

svn path=/trunk/; revision=44785
2012-09-05 21:23:50 +00:00
Pascal Quantin 5cdcf9c280 Add dissection of SIP Servers option to DHCPv4 (RFC 3361)
svn path=/trunk/; revision=44773
2012-09-04 20:43:24 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Pascal Quantin 10f6bcc140 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7391 :
Do not use same name for filters with incompatible types

svn path=/trunk/; revision=43443
2012-06-22 20:44:52 +00:00
Guy Harris 20e4f9468f Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42476
2012-05-07 18:03:43 +00:00
Bill Meier 8bfe44619f Revert 3 conversions of spaces --> tabs (in text strings) done in SVN #42354.
svn path=/trunk/; revision=42356
2012-04-30 19:20:59 +00:00
Bill Meier 0f3c6a288e Whitespace cleanup; reformat hf[] entries.
svn path=/trunk/; revision=42354
2012-04-30 19:08:15 +00:00
pascal 8d15f366c6 Remove unused header fields
svn path=/trunk/; revision=42309
2012-04-28 13:37:41 +00:00
pascal f8f3756ab0 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7051 :
Add option 82 suboptions 150/151/152 decoding to DHCP dissector

svn path=/trunk/; revision=42308
2012-04-28 13:20:41 +00:00
Jakub Zawadzki 8fca2eb7e5 Add missing consts.
svn path=/trunk/; revision=42004
2012-04-10 10:20:20 +00:00
pascal a1d4d9ca7e From Michael Mann:
use suboption length instead of option length to terminate option 82 dissection in BOOTP

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7047

svn path=/trunk/; revision=41988
2012-04-09 14:43:13 +00:00
Bill Meier 4f8e416fdc Fix benign issue: For FT_BOOLEAN fields with a zero bitmask, use BASE_NONE for 'display'
svn path=/trunk/; revision=41385
2012-03-06 22:12:42 +00:00
Alexis La Goutte cc7151b1b9 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41317
2012-03-02 11:10:08 +00:00
Chris Maynard fc18d1f4f7 Fix some typos.
svn path=/trunk/; revision=40788
2012-02-01 02:23:51 +00:00
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