aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bootp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-24Use proto_tree_add_ipv4(), not proto_tree_add_uint(), to add FT_IPV4 fields.Guy Harris1-2/+2
Change-Id: I178171e03d0ab7bedfeb9f04be01de22f7c177d4 Reviewed-on: https://code.wireshark.org/review/23679 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-27pinfo is used, so don't mark it unused.Guy Harris1-1/+1
Change-Id: Ife237343cdf051be836c2e2d3de1b00fc3902708 Reviewed-on: https://code.wireshark.org/review/23244 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-09bootp: fix 'pinfo' was marked unused but was used [-Wused-but-marked-unused]Alexis La Goutte1-6/+6
Change-Id: Ia711b3954aded55470d92d0787368a555481367d Reviewed-on: https://code.wireshark.org/review/23020 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-26Parse enterprise-numbers at run timeJoão Valverde1-5/+5
"enterprise-numbers" is converted to tab-separated values and renamed "enterprises". Unused fields are stripped. PENs are stored in a hash table loaded at run-time. User "enterprises" file is loaded from the personal config dir. Misc make-sminmpec.pl improvements and fixes. Note: names of type "Entity (formerly ...)" have the formerly part commented out for a cleaner output. Change-Id: I60c533afbe3e399077fbf432088064471ad3e1e2 Reviewed-on: https://code.wireshark.org/review/22246 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2017-05-17bootp: Always have SIP Server IP be an IP addressMichael Mann1-17/+2
Change-Id: Idf6b31748ee5aa04e8660a0eb283072da855dda2 Reviewed-on: https://code.wireshark.org/review/21692 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-04bootp: fix potential buffer overflow (read)Peter Wu1-1/+2
The Vendor class Identifier is a string (used with strncmp). Be sure to obtain a null-terminated string. Bug: 13628 Change-Id: Ic6457da171fbfa1bd18366d965d22e942fb080d6 Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1183 Bug: 13609 Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1153 Reviewed-on: https://code.wireshark.org/review/21498 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-04-25Don't crash if we have no BOOTP option preferences.Guy Harris1-3/+6
wmem_list_foreach() crashes if handed a null pointer, and saved_uat_opts will be null if there are no BOOTP option preferences. Don't do the "free saved UAT options" stuff if there aren't any saved UAT options. Bug: 13655 Change-Id: I88e64c6ebec88fc04a5adc0a85d378bbba49b383 Reviewed-on: https://code.wireshark.org/review/21329 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-24Convert BOOTP options into a dissector table.Michael Mann1-1104/+1416
This allows for much easier addition or overriding of options and use of Decode As. This includes adding heuristic dissector tables for vendor specific options. Change-Id: If52c00bbc23d89386ba3e777600f665609856de0 Reviewed-on: https://code.wireshark.org/review/21297 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-14bootp: Add Captive-Portal option (160)Alexis La Goutte1-1/+16
Thanks to David Bird for pcap Bug: 13483 Change-Id: Id53eadd5faa7599c3864840aa80a8770099baac3 Reviewed-on: https://code.wireshark.org/review/20531 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-31format_text_wmem -> format_textMichael Mann1-4/+4
All cases of the "original" format_text have been handled to add the proper wmem allocator scope. Remove the "original" format_text and replace it with one that has a wmem allocator as a parameter. Change-Id: I278b93bcb4a17ff396413b75cd332f5fc2666719 Reviewed-on: https://code.wireshark.org/review/19884 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-31Add format_text_wmem.Michael Mann1-4/+4
This allows for a wmem_allocator for users of format_text who want it (dissectors for wmem_packet_scope()). This lessens the role of current format_text functionality in hopes that it will eventually be replaced. Change-Id: I970557a65e32aa79634a3fcc654ab641b871178e Reviewed-on: https://code.wireshark.org/review/19855 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-19dns: change get_dns_name to return consumed bytes + actual name len.Dario Lombardo1-9/+14
Because of the DNS name encoding, the consumed bytes in the tvb and the length of the string of the dns name can be different. We need to handle them separately for the purpose they are. Moreover the name string can contain null bytes, then we can't rely on strlen() but we need the actual length. Subsequent calls to proto_tree_add_string() will require to pass the string to format_text() in order have non-printable characters printed. Bug: 13289 Change-Id: I6d0b295867ece265f8995f82da2c629992aeb703 Reviewed-on: https://code.wireshark.org/review/19539 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-12uat: add a reset callback.Dario Lombardo1-0/+1
This function will free the resources allocated by the caller. Change-Id: Ib486c14e4fd3c321662fb71f7fd06733ce9a64a4 Reviewed-on: https://code.wireshark.org/review/19375 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-17bootp: Update DHCP Message Type 53 ValuesAlexis La Goutte1-7/+5
Add RFC6926 and RFC7724 Change-Id: I2e10c337f3fe3043e5c36f501eb3e29b16bfcecc Reviewed-on: https://code.wireshark.org/review/19312 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-17bootp: fix indent (use tabs)Alexis La Goutte1-6/+6
Change-Id: I0c16bf29631e9376b9f3b701627bd5f8fb133397 Reviewed-on: https://code.wireshark.org/review/19311 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-16[BOOTP/DHCPv6] Add new manufacturer usage description (MUD) DHCP option, ↵Eliot Lear1-3/+21
which presents a URL. Change-Id: I152a388db2f3b8c035c80bd06dfbb9a18f10c031 Reviewed-on: https://code.wireshark.org/review/19284 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-13Adjust proto_tree_add_uint_format_value calls to use unit stringMichael Mann1-6/+3
Several calls to proto_tree_add_uint_format_value could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. There also a few cases where proto_tree_add_uint_format_value could just be proto_tree_add_uint. Added a few more "common" unit string values to unit_strings.[ch] Change-Id: Iaedff82c515269c9c31ab9100dff19f5563c932d Reviewed-on: https://code.wireshark.org/review/19242 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-02BOOTP: Fix V-I Vendor-Specific Information OptionJaap Keuter1-13/+37
Apply the same value checks to the vendor generic suboption dissection as is done for the Cable lab and ADSL forum ones. See https://ask.wireshark.org/questions/57695 for an example issue. Change-Id: I4fe07d07cf0a93f4693e5ff54dd70c008701cf41 Reviewed-on: https://code.wireshark.org/review/18999 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-4/+2
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-05bootp: use ws_strtoi function.Dario Lombardo1-2/+21
Change-Id: Id6e4f65d9f011c259931824235bbfb04362c0c71 Reviewed-on: https://code.wireshark.org/review/17813 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-18bootp: dissect option 82, sub-option 12 (Relay Agent Identifier)Martin Kaiser1-0/+8
as defined in RFC6925 Bug: 12907 Change-Id: I546d243f4b188025d8c96a1eaa0798b70a847a25 Reviewed-on: https://code.wireshark.org/review/17775 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-20BOOTP: Catch undefined Client Identifier (Option 61)Uli Heilmeier1-0/+16
[1] stats "A hardware type of 0 (zero) should be used when the value field contains an identifier other than a hardware address (e.g. a fully qualified domain name)." This commit displays these other identifier. [1] https://tools.ietf.org/html/rfc2132#section-9.14 Bug: 12766 Change-Id: I3d991164641b41fb95891b2f78411d2e98a22e0d Reviewed-on: https://code.wireshark.org/review/17180 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-07-14DHCP: correctly parse PXE options (209-210)Daniele Lacamera1-3/+14
option 209 was marked as opaque, now it's as PXELINUX config file (text) --> Fix: decorate as non-null terminated string --> CfR: IETF RFC5071 section 4.2. "Packet Format" option 210 was marked as special, and erroneously decorated as Authentication (option 90) --> Fix: decorate as non-null terminated string --> CfR: IETF RFC5071 section 5.2. "Packet Format" Bug: 12618 Change-Id: I4220c137ef4b8b7f0827496c165b0ca35b70f675 Reviewed-on: https://code.wireshark.org/review/16430 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-4/+3
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-16qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ↵Dario Lombardo1-1/+2
~SimpleStatisticsDialog. Add a reference count to stat_tap_table_ui to prevent bad deallocations. Bug: 12437 Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3 Reviewed-on: https://code.wireshark.org/review/15920 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15proto_tree_add_boolean -> proto_tree_add_bitmask_list_valueMichael Mann1-59/+97
Change-Id: Ic644042d238b5f2abcd874bca92c6dea55804ba9 Reviewed-on: https://code.wireshark.org/review/15913 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-28BOOTP: Added Boot Services Discovery Protocol (BSDP)Uli Heilmeier1-0/+320
Added Apple's Boot Services Discovery Protocol (BSDP) to Bootp. Used documentation: * http://opensource.apple.com/source/bootp/bootp-198.1/Documentation/BSDP.doc * https://en.wikipedia.org/wiki/Boot_Service_Discovery_Protocol * Files from Bug report Bug: 12427 Change-Id: I58c3fd53c164d075d5bfc12881bed66dc97236c6 Reviewed-on: https://code.wireshark.org/review/15586 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-09Give the time_[m]secs_to routines names that begin with "[un]signed_".Guy Harris1-2/+2
Indicate whether they take a signed time delta or an unsigned time delta. Export unsigned_time_secs_to_str() while we're at it. Change-Id: I0fbe87f1825efa886364caa61a3358b79d285947 Reviewed-on: https://code.wireshark.org/review/15324 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-03Move common code outside switch statement.Joerg Mayer1-40/+18
Change-Id: Id94a686c0cffd47e4d51f14e620c59fd153b3d69 Reviewed-on: https://code.wireshark.org/review/15251 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-26bootp: Add support for iSNS (RFC4174) dissectionVictor Dodon1-1/+371
Change-Id: I2d1807e631991d4115ca33d351e85c36272c209b Reviewed-on: https://code.wireshark.org/review/14523 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-27BOOTP: Add preference to determine endianness of UUID.Michael Mann1-4/+18
Spec doesn't appear to explicitly state endian format. Bug: 11544 Change-Id: I601d94523199bc3f9ce4f573d9976e328d9c816a Reviewed-on: https://code.wireshark.org/review/14201 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-22Fix some hf_ field datatype conflicts.Michael Mann1-1/+1
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES 'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING 'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES 'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES 'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER 'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32 'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d Reviewed-on: https://code.wireshark.org/review/14070 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-29Rename new_stat_tap_ui to stat_tap_table_ui.Guy Harris1-3/+3
A "new" statistics tap UI is a statistics tap UI where the statistics are maintained as tables and common code handles the tables; what matters is the tables, not that it's "new". Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba Reviewed-on: https://code.wireshark.org/review/12897 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29There's no "old" stat_tap_table, so remove "new_" from the name.Guy Harris1-4/+4
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72 Reviewed-on: https://code.wireshark.org/review/12896 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-09Convert some UDP subdissectors to "new" style.Michael Mann1-5/+7
Change-Id: I3c1ee97f68af4539b97d50b75c03ff82147dbc5e Reviewed-on: https://code.wireshark.org/review/11649 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-2/+2
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-18DHCP (bootp): Fix Dead Store (Dead assignement/Dead increment) warning found ↵Alexis La Goutte1-1/+0
by Clang Change-Id: Ie67b4fd7a3d8655f0b33c3a37b0cf08e7f248a76 Reviewed-on: https://code.wireshark.org/review/10562 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-13Squelch 64-bit-to-32-bit warnings by just casting to int.Guy Harris1-3/+3
Those lengths had better fit in an int if they're added to packet offsets. (BTW, gsize is the spawn of Satan; it should never be used except when you're dealing with GLib. It *should* have just been another name for size_t, but it's 32 bits on 64-bit Windows, which means it's narrower than size_t, which causes us some pain with g_snprintf().) Change-Id: Icd8f0632242303dbea0d80e0dad45b317097daaa Reviewed-on: https://code.wireshark.org/review/10516 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-13bootp: simplify avaya parameter parsingEvan Huus1-105/+88
Only make one pass through the parameter list, adding fields as we go. Use a wmem_strbuf to simplify string construction. Extract the "add a param" switch into its own function so it can be called from two different places. Should be far easier to reason about, and much more efficient. Change-Id: I0818e0b98cbc6d2025c776bce82e56fb72e8753a Reviewed-on: https://code.wireshark.org/review/10505 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Uli Heilmeier <openid@heilmeier.eu> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-13Bootp/DHCP: Add option 242 (Avaya IP Telephone)Uli Heilmeier1-1/+314
This commit adds handling for option 242 to bootp. The value of the Avaya option 242 is a string containing a list of several suboptions seperated by a ",". However some suboptions may have multiple values also seperated by a comma. The values may be enclosed in quotes. A real-life string e.g. looks like: MCIPADD=10.1.1.2,10.1.1.3,TLSSRVR=10.1.1.5,VLANTEST=60,L2Q=1,L2QVLAN=77 Documentation can be found here: https://downloads.avaya.com/elmodocs2/one-X_Deskphone_Edition/R1.5/output/16_300698_4/admn054.html and http://downloads.avaya.com/css/P8/documents/100068659 A set of crafted packets is attached to the bug. Bug: 11021 Change-Id: I99b557a952fd34c0fcab6d0a5311440969316973 Reviewed-on: https://code.wireshark.org/review/7443 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-08-29bootp/dhcp: fix Alcatel suboption detection bugJeffrey Smith1-1/+1
Change-Id: I4a4222f3f30bf8e996770295756dd206b5ce101b Reviewed-on: https://code.wireshark.org/review/10297 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-26bootp/dhcp: tighten check for Alcatel extensionsJeffrey Smith1-2/+36
The check for Alcatel extensions in bootp/dhcp packets is very weak, resulting in some false positives. Then when trying to parse the suboptions, the result is an error on the packet. This change eliminates some false positives by adding a test that the vendor-specific option contents match the encapsulated format described in section 8.4 of RFC2132. Change-Id: Ie4188ff900426c2d80a5694fbba5c88385625a61 Reviewed-on: https://code.wireshark.org/review/10267 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-21GSM/ANSI/CAMEL...: fix no previous prototype for '*_stat_init' ↵Alexis La Goutte1-1/+1
[-Wmissing-prototypes] Change-Id: I0aedefbb77899ebceac7fb08249faf47964d785b Reviewed-on: https://code.wireshark.org/review/10163 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-20BOOTP: fix indent (use tab)Alexis La Goutte1-5/+4
Change-Id: I32ea4d1b9cd8aa351cbdb2bab0642e4ed0c191fb Reviewed-on: https://code.wireshark.org/review/10169 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-04Convert H.225 tap stats to new "generic stat API".Gerald Combs1-1/+1
Migrate the H.225 stats similar to the recent BOOTP migration. Change-Id: I70ff7ab6cf3e9796f257412ba7d65ec9fe7f77ad Reviewed-on: https://code.wireshark.org/review/9859 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08Add SimpleStatisticsDialog.Gerald Combs1-1/+1
To do: - Refactor dynamic menu item placement. Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1 Reviewed-on: https://code.wireshark.org/review/9561 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-03Convert BOOTP/DHCP tap stats to new "generic stat API".Michael Mann1-0/+89
Change-Id: I0edc3909516452e6497a050b4617f9aafcea2688 Reviewed-on: https://code.wireshark.org/review/9112 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03bootp: try to fix OSX builtbotMartin Mathieson1-2/+2
Change-Id: I0204b6c947e302a6f38b43593e19c6b816a180a4 Reviewed-on: https://code.wireshark.org/review/9482 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>