aboutsummaryrefslogtreecommitdiffstats
path: root/epan/address.h
AgeCommit message (Collapse)AuthorFilesLines
2015-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-15/+21
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-24Remove ADDRESS macros and just have their lower-case equivalents.Michael Mann1-8/+1
Remove calls SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL, COPY_ADDRESS, COPY_ADDRESS_SHALLOW, and ADD_ADDRESS_TO_HASH since they are no longer used. Change-Id: I53fa4cfda756d8cef8815ad0324a3b9d9f9cd490 Reviewed-on: https://code.wireshark.org/review/11238 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-08-20Add the WLAN statistics dialog.Gerald Combs1-0/+19
Instead of splitting the stats into two lists as with the GTK+ UI, add everything to an expandable tree. This allows viewing nodes on more than one network. Rename the top-level Bluetooth menu item to Wireless and put the WLAN stats dialog there. The Qt UI matches SSIDs (WlanNetworkTreeWidgetItem::isMatch) a bit differently than the GTK+ UI. Try to make the logic as plain as possible since we'll likely have to update it in the future. The addition of a custom BSSID address types means that we can't assume that everything is AT_ETHER. Add routines for checking for broadcast BSSIDs and comparing only the data portions of addresses. Move PercentBarDelegate into its own module. Use it in WlanStatisticsDialog. Change-Id: Ie4214eb00671a890871380c4a07213ebfb7585c6 Reviewed-on: https://code.wireshark.org/review/10171 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-19Added TDMoP protocol dissectorAndrew Chernyh1-1/+2
Bug: 11340 Change-Id: I04408db376718c7a5392f9521d7d75d0481ec30e Reviewed-on: https://code.wireshark.org/review/9514 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-14Don't copy zero bytes of data.Guy Harris1-2/+4
memcpy(NULL, NULL, 0) isn't guaranteed by ISO C90 to work, so don't do it. Check whether the length is zero, and don't copy if it is. (If the count is non-zero and the pointer is null, that's an error, and we should fail there, so base the test on the length, not the pointer.) Change-Id: I0b3dc1541b52670d8fef459754c9494cfcc59e5d Reviewed-on: https://code.wireshark.org/review/9633 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-29Address.h : fix api reference warningAlexis La Goutte1-0/+1
The following parameters of WMEM_COPY_ADDRESS(scope, to, from) are not documented: parameter 'scope' Change-Id: Ice1bddb55839f7aa839bdf6dec74211cf7e4d9dc Reviewed-on: https://code.wireshark.org/review/8227 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-09Add fixed length function for address types.Michael Mann1-3/+0
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c. Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file. Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4 Reviewed-on: https://code.wireshark.org/review/7038 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-02-09Eliminate the hf member out of the address structure.Michael Mann1-46/+7
Using the new address type registration, dissectors can create their own address types with their own (column) filters attached to them, eliminating the need for an address to keep track of a hf_ field. Change-Id: I2bbec256a056f403a7ac9880d5d76a0b2a21b221 Ping-Bug: 7728 Reviewed-on: https://code.wireshark.org/review/7037 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-09Add "column filter string" support to address types.Michael Mann1-3/+0
Information about dissector (filter) fields should be kept in a dissector as much as possible. Supporting "column filter string" also allows other dissectors to create their own "address types" with different column filters (because AT_ETHER isn't always an "Ethernet" address). This feature also allowed a few "dissector specific" address types to be moved to their own dissector. Change-Id: Ie9024af4db62bc2ee4f8c9d28a1d807f706f45bf Ping-Bug:7728 Reviewed-on: https://code.wireshark.org/review/7029 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-02-09Add address type registration.Michael Mann1-9/+4
Now address types are setup just like field types and must be registered with a structure that provides its string representation (and more things in the future). Address types that are limited to a single dissector are registered by the dissector. More "common" ones are globally registered. There are still a few that really belong in a dissector, but have other dependencies currently not accounted for in the address type support. Many of the "address to string" conversions that involved g_sprintf have be changed to use more "performance friendly" methods (some at the cost of needing to_str-int.h) Leaving all comments regarding this "solution" in address_to_str.c in until all have been implemented Change-Id: I494f413e016b22859c44675def11135f228796e0 Reviewed-on: https://code.wireshark.org/review/7019 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-16Update a commentPascal Quantin1-2/+2
Change-Id: I7bf1173bfb23e5f083b8aaf09476b30b4791aae0 Reviewed-on: https://code.wireshark.org/review/6577 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-6/+6
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>
2014-12-28Create FT_FCWWN field type.Michael Mann1-0/+1
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type. Change-Id: I4ca77870499fd8239584a70874998b5d194a7167 Reviewed-on: https://code.wireshark.org/review/6036 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-05Fix whitespace/indentation to match editor modelines.Bill Meier1-31/+31
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca Reviewed-on: https://code.wireshark.org/review/3452 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-20Fix the SET_ADDRESS_HF() macro.Guy Martin1-1/+1
Change-Id: I01ac342f791b578be0aab80ce8fe07a97ba5ed50 Reviewed-on: https://code.wireshark.org/review/1691 Reviewed-by: Anders Broman <a.broman58@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>
2013-12-14Fix const warnings.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54092
2013-12-08Fix some warnings: cast discards `__attribute__((const))' qualifier from ↵Jakub Zawadzki1-1/+1
pointer target type svn path=/trunk/; revision=53875
2013-12-08../../epan/address.h:63:17: warning: comma at end of enumerator list [-pedantic]Anders Broman1-1/+1
svn path=/trunk/; revision=53856
2013-12-06Add DeviceNet and J1939 dissectors. Both run on top of CAN (not necessarily ↵Michael Mann1-1/+3
always SocketCAN, but it did provide a good test environment) svn path=/trunk/; revision=53802
2013-12-03Fix warning: argument 'out/in' of command @param is not found in the ↵Alexis La Goutte1-2/+2
argument list of SE_COPY_ADDRESS(to, from) svn path=/trunk/; revision=53747
2013-12-02Fix (-W)documentation error found by ClangAlexis La Goutte1-28/+28
error: parameter 'addr*[in]' not found in the function declaration [-Werror,-Wdocumentation] svn path=/trunk/; revision=53720
2013-09-17Switch the inline functions that use tvbuffs and emem back to macros.Gerald Combs1-33/+17
This should hopefully fix linking with Solaris Studio, which doesn't remove unused inline functions by default. Fix a copy+paste error. svn path=/trunk/; revision=52122
2013-09-16address_equal → addresses_equal. Switch from address macros to functionsGerald Combs1-2/+2
in the Qt code. svn path=/trunk/; revision=52108
2013-09-16Convert each of the address.h macros to inline functions. Gerald Combs1-109/+208
Document each function. Note that we now call tvb_get_ptr() before modifying the address in tvb_set_address() and tvb_set_address_hf(). The caller doesn't have to worry about doing that any more. Add add_address_to_hash64(). svn path=/trunk/; revision=52106
2013-09-15Add the new hash algorithm to the macro we were already using. Create aEvan Huus1-0/+2
temporary address structure for the port-numbers so we can use the same macro, reducing duplication further. Add modelines. svn path=/trunk/; revision=52081
2013-09-13Remove epan.h from ftypes.h, address.h and tpg.h,Jörg Mayer1-1/+0
add it to proto.h as it contains macros that require emem.h svn path=/trunk/; revision=52001
2013-09-07Add modelines, use consistent indentation in address.hEvan Huus1-127/+150
Use the "do { } while (0)" trick to make the macros behave like regular function calls syntatically. Fix one dissector that wasn't using semicolons after the macro calls. svn path=/trunk/; revision=51819
2013-03-28From Michal Labedzki via ↵Evan Huus1-1/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8530 Enable "Decode As" for Bluetooth over USB. svn path=/trunk/; revision=48605
2013-03-07From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :Pascal Quantin1-1/+1
Remove C++ incompatibilities from ssl and ssh files svn path=/trunk/; revision=48174
2013-03-02From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :Pascal Quantin1-2/+2
Remove C++ incompatibilities from most of the dcerpc code svn path=/trunk/; revision=48023
2013-02-05a DVB-CI session number is not globally unique, it's only unique perMartin Kaiser1-1/+1
transport connection, so it's not a good choice for a circuit id use (session number|transport connection id) as circuit id svn path=/trunk/; revision=47499
2012-12-18When copying addresses, also copy the (new) hf field.Jeff Morriss1-0/+11
Use SET_ADDRESS in some dissectors that weren't using it (so that the hf field is correctly initialized). Introduce a COPY_ADDRESS_SHALLOW (which copies an address without copying the contents of the data field). svn path=/trunk/; revision=46602
2012-12-02Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). TheyJeff Morriss1-2/+30
are like the non-TVB versions except that they take a TVB and an offset instead of (frequently) a pointer into the TVB. Calling tvb_get_ptr() before modifying the rest of the fields should help fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't reproduce that problem). Replace a bunch of calls like: SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length)); with: TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length); svn path=/trunk/; revision=46324
2012-10-26Create SET_ADDRESS_HF that takes an additional hf_ value that can beEvan Huus1-1/+10
used to override the filter generated from the address column. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 (again). svn path=/trunk/; revision=45792
2012-10-26Revert revision 44921.Evan Huus1-14/+0
See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 svn path=/trunk/; revision=45791
2012-10-23Note why there's no AT_IEEE_802_15_4_LONG (that's AT_EUI64).Guy Harris1-0/+1
svn path=/trunk/; revision=45744
2012-10-23Add an AT_ value for 802.15.4 short addresses.Guy Harris1-20/+21
Note that, if you want EUI-64's to resolve the OUI in the display, hacking individual dissectors to do it themselves and use AT_STRINGZ is *not* the right way to do it. svn path=/trunk/; revision=45743
2012-09-24Get rid of ../../epan/address.h:65:19: warning: comma at end of enumerator ↵Anders Broman1-1/+1
list [-pedantic] svn path=/trunk/; revision=45102
2012-09-15From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728Evan Huus1-0/+14
Make right-click + apply-as-filter work in the packet list for non-ethernet frames (such as ieee 802.11 frames). svn path=/trunk/; revision=44921
2012-08-02From Richard Stearn: support for AX.25, including support forGuy Harris1-1/+2
LINKTYPE_AX25. svn path=/trunk/; revision=44211
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-03-01From Martin Kaiser via ↵Jeff Morriss1-1/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6890 : The attached patch for the DVB-CI dissector creates a circuit for each DVB-CI session, using the session number as circuit id. The DVB-CI session commands are: - open_session_request(resource_id) - session_opened(resource_id, newly assigned session number) - payload transfer(session_number, payload data) - close session(session_number) For now, the circuit will store the resource id and make it available (as a generated item) to subsequent packets that contain only the session number. Doing this, the resource id (which is like a tcp/udp port) can be used for filtering. svn path=/trunk/; revision=41253
2010-11-17From Slava via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5335 :Jeff Morriss1-5/+8
This patch adds to Wireshark the ability to dissect Infiniband SDP (Socket Direct Protocol) and CM MADs traffic. It also contains various other bug-fixes and enhancements. SDP traffic can be identified automatically (analyzing SDP CM MADs) or manually. SDP, or Sockets Direct Protocol, is a protocol developed by the Infiniband Trade Association which enables existing socket-based applications to transparently utilize the Infiniband capabilities. This patch is submitted on behalf of Mellanox Technologies Ltd. svn path=/trunk/; revision=34918
2010-05-13Fix up some indentationJeff Morriss1-3/+3
svn path=/trunk/; revision=32795
2008-08-12From Alexey Neyman:Anders Broman1-1/+2
Implement dissector for IPMB (DLT_IPMB_LINUX, 209). svn path=/trunk/; revision=25986
2007-04-26Make ADD_ADDRESS_TO_HASH() take a pointer to an address as an argument,Guy Harris1-2/+2
as the other address macros do. svn path=/trunk/; revision=21588
2007-04-26Use the right local variable.Guy Harris1-1/+1
svn path=/trunk/; revision=21581
2007-04-26Add missing backslash.Guy Harris1-1/+1
svn path=/trunk/; revision=21579
2007-04-26Rename HASH_ADDRESS to ADD_ADDRESS_TO_HASH, to make it clearer what itGuy Harris1-9/+9
does (i.e., it will add the address bytes to the value that's already there - it will not initialize the value, so you have to clear it before doing any hashing). svn path=/trunk/; revision=21578