aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lbmr.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-13Just #include wsutil/inet_aton.hJoão Valverde1-9/+2
No need for platform-specific system header boilerplate. Change-Id: I5387a0005ddb0d7aab3c5b9f28d6282053c1b0fd Reviewed-on: https://code.wireshark.org/review/13865 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-3/+3
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-30LBM: No need to cast to 'void *' [-Wcast-qual]João Valverde1-1/+1
Change-Id: Ib179fdbdfe8edf8a83b3ff0de323bd26b4bb8362 Reviewed-on: https://code.wireshark.org/review/12945 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-3/+3
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 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>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-1/+1
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> 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>
2015-09-03Address "shadow" warnings found by checkAPI script.Michael Mann1-6/+6
These aren't "true" shadow issues, but the script doesn't completely understand C syntax (for things like struct member names "time" and "index"). But fixing them creates less noise. Change-Id: I5a2db1549095824530428529e86cab453c031a04 Reviewed-on: https://code.wireshark.org/review/10368 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>
2015-08-09Trivial: Change editor-modelines tab-width specification from 4 to 8.Bill Meier1-3/+3
[There were no actual indentation changes since since none of the files contained tabs]. Change-Id: I92ff551e70274f459c466e1c1d449905e0e7dc92 Reviewed-on: https://code.wireshark.org/review/9945 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-1/+1
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+1
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-02Revert "MSVC 2015RC does not like the #defines using OFFSETOF replace them ↵Anders Broman1-564/+282
by absoulute numbers." This reverts commit 0808f4c9584b309548996388aafde51820a68932. Change-Id: I899cbeec86f34a00ded41040257e5de3ab537175 Reviewed-on: https://code.wireshark.org/review/8736 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-02MSVC 2015RC does not like the #defines using OFFSETOF replace them byAnders1-282/+564
absoulute numbers. Change-Id: I1de97be98c06bee2d7ddca38496a72e93567cbcf Reviewed-on: https://code.wireshark.org/review/8734 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-11lbmr: fix possible infinite loopEvan Huus1-2/+5
Ensure that we handle when option_len is zero so we don't go into an infinite loop. Reported by Vlad Tsyrklevich and found by the "joern" tool. Also fix what appears to be two misplaced "curr_offset" values which would have resulted in a bad loop anyways. Bug: 11036 Change-Id: I79e70fcf79015cb0add1744aff695143e11312aa Reviewed-on: https://code.wireshark.org/review/7593 Reviewed-by: David Ameiss <netshark@ameissnet.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-18Make UAT record update callbacks return a success/failure indication.Guy Harris1-1/+4
Have them return TRUE on success and FALSE on failure. Check the return value rather than whether the error string pointer is null or not. Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c Reviewed-on: https://code.wireshark.org/review/7222 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-1/+1
Copy addresses with wmem-scope instead of (forced) seasonal scope. All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes. Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2 Reviewed-on: https://code.wireshark.org/review/6564 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-13UAT error string pointers should not be const pointers.Guy Harris1-1/+1
UAT error strings are usually allocated by g_strdup() or g_strdup_printf(), and must ultimately be freed by the caller. Make the pointer-to-error-string-pointer arguments to various functions be "char **", not "const char **". Fix cases that finds where a raw string was being used, as that won't work if you try to free it; g_strdup() it instead. Add a missing free of an error string. Remove some no-longer-necessary casts. Remove some unnecessary g_strdup()s (the string being handed to it was already g_malloc()ated). Change some variable declarations to match. Put in XXX comments for some cases where the error string is just freed, without being shown to the user. Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0 Reviewed-on: https://code.wireshark.org/review/6525 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-26Fix a number of dup hf[] filter-names probably resulting from cut/paste errs.Bill Meier1-1/+1
Change-Id: I9242300b2ace3155c1506b584a90f073100a305e Reviewed-on: https://code.wireshark.org/review/5512 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-18Converted numerous proto_tree_add_none_format() calls for bitmask/flag items ↵David Ameiss1-358/+288
to proto_tree_add_bitmask(). Correctly set the length of LBT-RM and LBT-RU header blocks. Various other cosmetic cleanups. Change-Id: If19bbdeb10176b8059fd4cf657719b3b9817bc6a Reviewed-on: https://code.wireshark.org/review/4776 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-14/+14
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-18Fix warning: no previous prototype for ... [-Wmissing-prototypes]Alexis La Goutte1-1/+1
Add static before function Change-Id: I5e112bee776b149ba7390b4aa2c36cb212d2eeb5 Reviewed-on: https://code.wireshark.org/review/3694 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18Add casts to make the buildbot happy.AndersBroman1-7/+7
Change-Id: Ia77b86c83a6458210f913a691b707b7aa1b911d7 Reviewed-on: https://code.wireshark.org/review/3100 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18Split LBMR tap into 5 separate taps. Make the associated tap data use ↵David Ameiss1-249/+206
fixed-length fields. The idea is to allow user-written tap listeners easier access to the tap data. Also correct the conditions (in packet-lbmc.c) under which a subdissector would be called, if present. Change-Id: I5244cfbd17314058f7d3b9f42d647e0e6c375e14 Reviewed-on: https://code.wireshark.org/review/3007 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06Clean up handling of missing functions.Guy Harris1-1/+3
With autotools, CMake, and nmake, if we have a function, #define HAVE_{function_name_in_all_caps}, otherwise don't #define it. If we provide our own version of a function in libwsutil, make sure we have a header that declares it, and *ONLY* include that header if HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have the system declaration and our declaration colliding. Check for inet_aton, strncasecmp, and strptime with CMake, just as we do with autotools. Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in autotools. Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889 Reviewed-on: https://code.wireshark.org/review/2903 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-29Standardize the names of, and document, the taps and heuristic dissector ↵David Ameiss1-12/+12
tables made avaialble by these dissectors. Change-Id: If3a143eb9546c9de63cd32b2347000b09e0e3c93 Reviewed-on: https://code.wireshark.org/review/2688 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-1/+1
Hopefully that name makes it clear what the routiner's purpose is, and will encourage people to use it rather than using dissector_add_uint() with a bogus integer value. Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8 Reviewed-on: https://code.wireshark.org/review/2483 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-23Conversation/memory scope fixes for LBM dissectors. See bug 9718.David Ameiss1-25/+19
Change-Id: I58aa249d73ab44f5f56b1559b38b216cdb542ecb Reviewed-on: https://code.wireshark.org/review/1280 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-22Minor cleanupBill Meier1-38/+36
- Remove unneeded #includes; - Move proto_reg_handoff...(() to the end of the file as per convention; - Use dissector_add_handle() instead of using dissector_add_uint(..., 0, ...); - #if 0 an unused global function (which caused a [-Wmissing-prototypes] warning); - Remove an empty proto_reg-handoff...(); - 'if (already_registered)' not required in one case. Change-Id: I74f267c2721df13eb4d52d7f19a6ded423218a39 Reviewed-on: https://code.wireshark.org/review/1277 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-04-14Fix no previous prototype warnings.AndersBroman1-0/+3
Change-Id: I859597ebc957a58f659800ef63318f94e80feabf Reviewed-on: https://code.wireshark.org/review/1104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-10Fix two ett_ variables that weren't getting registered.Guy Harris1-0/+2
Change-Id: I0b37bf3d89a108978a6c917fc4d3a33cba456493 Reviewed-on: https://code.wireshark.org/review/1048 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-08Make sure IPv4 address structures really have 4 bytes of data.Guy Harris1-1/+2
Change-Id: If89827677f7503fc67ba9a025f28447a68a98f07 Reviewed-on: https://code.wireshark.org/review/1025 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-08Don't assume the data pointed to by an address structure is aligned.Guy Harris1-10/+5
And don't assume you can dereference the pointer nonetheless; that doesn't work on SPARC, for example - you get an unaligned-access trap. Instead, use pntoh32() to fetch IPv4 address values from the address structures. While we're at it, just use guint32 for those addresses; we don't need in_addr_t. Change-Id: I84e6c653fe33b1bc6e67d9097ce423b82f1eb0c8 Reviewed-on: https://code.wireshark.org/review/1024 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-08Fixes for Windows build post change 1006Graham Bloice1-0/+2
Windows still needs the definition of in_addr_t Change-Id: I43c417de8e8199cfa58b9d494be5e828f959f1a9 Reviewed-on: https://code.wireshark.org/review/1009 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2014-04-08On UN*X, <arpa/inet.h> suffices for struct in_addr and in_addr_t.Guy Harris1-4/+4
So don't pull in <netinet/in.h>. Also, avoid <sys/types.h> in packet-dcom.c. While we're at it, do *not* assume that pinfo->src or pinfo->dst are IPv4 addresses. Change-Id: I5fc8e859780a8d863aaf6e90a21a7039cabae0e6 Reviewed-on: https://code.wireshark.org/review/1006 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-08Fix warning found by -Wunused-const-variable (Clang 3.5)Alexis La Goutte1-0/+2
Change-Id: I4506be6ae8deda5e8d1e038b089620a15b650b03 Reviewed-on: https://code.wireshark.org/review/1000 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-07Initial checkin of LBM aka 29West dissectors. See Bug 9718.Michael Mann1-0/+6843
Change-Id: If8fcfe1971c8863f370e440f64c36eb7566f6852 Reviewed-on: https://code.wireshark.org/review/113 Reviewed-by: Michael Mann <mmann78@netscape.net>