aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wps.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-20Remove init of proto variablesStig Bjørlykke1-264/+264
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
2023-11-17dissectors: Remove init of hf and ett variable arraysStig Bjørlykke1-1/+1
Manually remove init of hf and ett variable arrays because this cannot be easily done using the convert script.
2023-09-20Use `register_dissector()` for more protocolsDavid Perry1-1/+1
Changes several calls of `create_dissector_handle()` to instead call `register_dissector()` with a name for the dissector. This change allows affected dissectors to be findable by calls to `find_dissector()`. In turn, this opens up more command-line use for these protocols, including fuzzshark and rawshark, as well as lua use via `Dissector.get()`. This should handle all dissectors in `epan/` from `packet-w*` to `packet-z*`, meaning that nearly all dissectors can be used as described above. There remain some uses of `create_dissector_handle()` that seemed to be in highly specialized places. Where needed, move the call from the protocol handoff function to the protocol register function, save the result in a static variable, and use that variable in the handoff function. There were some calls to `create_dissector_handle()` or `register_dissector()` which passed `-1` as the protocol argument. When I saw those I corrected them to pass the actual `proto_foo` identifier instead. Closes #5612
2023-09-15Check whether value_string labels spuriously differ in capitalisationMartin Mathieson1-1/+1
2023-01-23WPS: Multi-AP Extension subelement: Profile 1/2 Backhaul STA assoc disallowedMokhtar Ben Messaoud1-1/+13
Parse Multi-AP Extension subelement flags: - Profile-1 Backhaul STA association disallowed. - Profile-2 Backhaul STA association disallowed. defined by Wi-Fi_EasyMesh_Specification_v5.0.pdf / Table 14
2022-10-09WPS: Multi-AP Profile and Multi-AP Default 802.1Q Settings subelementsMokhtar Ben Messaoud1-0/+32
Format is defined by Wi-Fi EasyMesh™ Specification Version 4.0 * 5.2.2 Backhaul STA Configuration (Table 4. Multi-AP Default 802.1Q Setting subelement format) * 7.1 AP configuration (Table 15. Multi-AP Profile subelement)
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-9/+9
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-1/+1
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-20Adding the missing generic method to support multiple vendor-defined ext typesDr. Lars Voelker1-8/+19
The current EAP dissector assumes that all vendor-defined extended types are WPS. This does not allow for adding new vendor-defined payloads. This codes cleans up the limitation. The Vendor-ID can be registered using a dissector table, while the Vendor-Type is passed as data. Change-Id: Idc75108fd42b9b2153089db503b137c6eeefe274 Signed-off-by: Dr. Lars Voelker <lars-github@larsvoelker.de> Reviewed-on: https://code.wireshark.org/review/32888 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-11WPS: no previous prototype for ‘proto_reg_handoff_wps’ ↵Alexis La Goutte1-0/+1
[-Wmissing-prototypes] Change-Id: Icb5220af362a25f081f0b5d33f92a9013723bca9 Reviewed-on: https://code.wireshark.org/review/24364 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09802.11: Correctly handle Wi-Fi Alliance Multi-AP subtype decoding.Richard Sharpe1-0/+18
Introduce a dissector table and fix a bug so that it now works by calling through a dissector table. Change-Id: Ifa3f01b3f306101b3144604a51806eaccc436373 Reviewed-on: https://code.wireshark.org/review/24319 Petri-Dish: Richard Sharpe <realrichardsharpe@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-06IEEE1905: Add a break to fix a malformed packet issue and dissect Multi-APRichard Sharpe1-0/+46
Extension types in EAPWPS. Change-Id: Ib7dca0f83897839072eaaeb9c95f406f6ad5c8e6 Reviewed-on: https://code.wireshark.org/review/24256 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-07-06convert to proto_tree_add_subtree[_format]Michael Mann1-8/+4
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce Reviewed-on: https://code.wireshark.org/review/2900 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-1/+1
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17Fix copy/paste errors in value_string.Jakub Zawadzki1-1/+1
Also make repetition_coding_indications[] standard terminated. Change-Id: Ice20e1f27f5ab4d111f893608a230b83899efc9f Reviewed-on: https://code.wireshark.org/review/2288 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-14Don't cast away constness.Guy Harris1-1/+1
svn path=/trunk/; revision=54774
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=54085
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-1/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-26/+26
svn path=/trunk/; revision=51852
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-2/+2
svn path=/trunk/; revision=49923
2013-06-12Batch of filterable expert infos with some minor cleanup I noticed while ↵Michael Mann1-31/+44
doing the filter conversions. svn path=/trunk/; revision=49893
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2012-12-23From report of Elavarasan via ↵Alexis La Goutte1-23/+155
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8099 Named field for each item in Selected Registrar Config methods is not available The structure of both the Config Methods and Selected Registrar Config Methods are the same. Display filters such as "wps.config_methods.pushbutton", "wps.config_methods.display", etc are available for the different methods in the Config methods whereas the display filters for the elements in the Selected Registrar Config methods are found to be the same as the Config method Display filters. From me : add new filter for selected_registrar config method bitmask (and also permitted config method) svn path=/trunk/; revision=46725
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-18Fix uninitialized value warnings from GCC.Evan Huus1-3/+3
svn path=/trunk/; revision=44966
2012-09-18Do some reformatting.Bill Meier1-119/+205
svn path=/trunk/; revision=44965
2012-09-18From Michael Lum: Fix typo.Bill Meier1-1/+1
svn path=/trunk/; revision=44964
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-09Add missing const attribute to some char *Jakub Zawadzki1-1/+1
Fix some "assignment discards qualifiers from pointer target type", etc svn path=/trunk/; revision=41993
2011-11-09Fix a number of proto_tree_add_item() encoding args.Bill Meier1-1/+1
svn path=/trunk/; revision=39774
2011-10-20Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.Bill Meier1-2/+2
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-10/+10
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-9/+9
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-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-84/+84
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-35/+35
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-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-02-08The checkAPI script doesn't understand arrays of value_string tables,Guy Harris1-116/+123
and that flavor of two-dimensional array requires you to declare a maximum size for the value_string tables in the array. Don't use an array of value_string tables. svn path=/trunk/; revision=35871
2011-02-07From Masashi Honma:Jaap Keuter1-16/+156
Currently the Wireshark does not support Primary Device Type dissection. I made a patch for the dissection based on "Wi-Fi Simple Configuration Specification DRAFT Version 2.0.0.51". svn path=/trunk/; revision=35867
2010-12-28From Masashi Honma:Jaap Keuter1-0/+1
EAP WPS RF band may be '2.4 GHz and 5 GHz'. svn path=/trunk/; revision=35282
2010-10-24(Minor) Some whitespace cleanup.Bill Meier1-510/+510
svn path=/trunk/; revision=34634
2010-10-24From Jouni Malinen: Add support for new WSC 2.0 attributes and valuesBill Meier1-0/+202
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5196 svn path=/trunk/; revision=34632
2009-11-09Removed an unused assignment.Stig Bjørlykke1-1/+0
svn path=/trunk/; revision=30881
2009-10-19From Jouni Malinen:Jaap Keuter1-12/+12
WPS encodes Bool attributes as single-octet values. Selected Registrar attribute is parsed correctly (packet-wps.c), but many of the other Bool attributes are marked incorrectly to use two-octet fields. This results in showing incorrect octets for some of the attributes and incorrectly marking frames invalid if a Bool attribute is included as the last attribute in a WPS IE. svn path=/trunk/; revision=30622
2009-07-07From Kovarththanan Rajaratnam:Stig Bjørlykke1-1/+1
More FT_XXX cleanup. svn path=/trunk/; revision=28971