aboutsummaryrefslogtreecommitdiffstats
path: root/epan/conversation_table.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-22Move AT_USB to inside USB dissector.Michael Mann1-3/+14
This required some hacking in the conversation table handling, but still seemed worth it as USB address is not widely used. Maybe a "is_stringlike" property for address types... Change-Id: I628a15c17cb1f595bb292130867adbc5bea0f41a Reviewed-on: https://code.wireshark.org/review/16068 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-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-4/+4
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-15Add some casts to void * to fix (pedantic) argument mismatch notesJoão Valverde1-2/+2
Change-Id: I63e46285b4c6676d4ae57196b85fbad89964898c Reviewed-on: https://code.wireshark.org/review/13933 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-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-4/+4
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-4/+4
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 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-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-1/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-21Avoid returning malloced memory as const [-Wcast-qual]João Valverde1-7/+8
Change-Id: I0b2c03cbde963d13d07ef13284d85b922eec3be9 Reviewed-on: https://code.wireshark.org/review/13439 Reviewed-by: João Valverde <j@v6e.pt>
2015-12-28Eliminate more unnecessary casting away of constness.Guy Harris1-2/+2
Change-Id: I3d2d83d60f798703ea3fa16ba2d6e95a00f88469 Reviewed-on: https://code.wireshark.org/review/12885 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-03Fix address hashing broken in g4f39c60Evan Huus1-3/+3
We actually have to *use* the return value of the method, which the macro did for us. Change-Id: I240ca7e526a18054fe39c6c4ded902998dc2fef0 Reviewed-on: https://code.wireshark.org/review/12389 Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-10-24More ADDRESS macro to address function conversions.Gerald Combs1-3/+3
Replace remaining calls to SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL, COPY_ADDRESS, and COPY_ADDRESS_SHALLOW with their lower-case equivalents. Replace all ADD_ADDRESS_TO_HASH calls with add_address_to_hash. Change-Id: I4cff857d7a84085abe0bccd52d2605d2a468bf6f Reviewed-on: https://code.wireshark.org/review/11229 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> 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-13/+13
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-06-21Further refactor SRT stats.Michael Mann1-3/+0
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK. SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic. CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone. Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc Reviewed-on: https://code.wireshark.org/review/8894 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-03-07Get rid of an unused structure member.Guy Harris1-2/+0
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801 Reviewed-on: https://code.wireshark.org/review/7573 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-13Replace tabs by spaces when editor modelines has "expandtab"Bill Meier1-2/+2
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7 Also: tabs-stops should be 8 Reviewed-on: https://code.wireshark.org/review/7100 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-18Remove some apparently-unnecessary includes of emem.h.Guy Harris1-1/+0
Change-Id: Id50ce3e707056cca8f30052f05c451ce431b39b5 Reviewed-on: https://code.wireshark.org/review/6632 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-15Conversation Table : Copy-paste error (CID 1262415)Alexis La Goutte1-1/+1
Change-Id: I37fd8154f93763ac091528921d1b66d8e8fd56dd Reviewed-on: https://code.wireshark.org/review/6555 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-13Consistently use the "g_string_free returns a C string pointer" idiom.Guy Harris1-4/+2
g_string_free(str, FALSE) frees the GString container but not the underlying g_malloc()ed string; instead, it returns a pointer to the g_malloc()ed string. Fix those places that didn't already get the string pointer from g_string_free() to do so rather than manually extracting the string themselves. And fix one place that didn't even need to use a string - it was just scanning a C string without even modifying it. Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5 Reviewed-on: https://code.wireshark.org/review/6532 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-10Remove ep_ allocated memory from get_conversation_filter and just return a ↵Michael Mann1-9/+9
g_alloced string. Change-Id: Ie7f6b2c5479fec1a44afb5e446ef6abf304113af Reviewed-on: https://code.wireshark.org/review/6480 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10USB: Fix Conversation/Endpoint filtersMichal Labedzki1-3/+3
There were not fields for that, so simple add them. Change-Id: I489bae24ac96ea0baf395add731f4d62ccf19352 Reviewed-on: https://code.wireshark.org/review/6401 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-08Add quotation marks in Conversations/Endpoints when address is stringMichal Labedzki1-0/+22
Change-Id: I39d49542cd563db1f6d3423b4e382a9a5e1c801b Reviewed-on: https://code.wireshark.org/review/6398 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-08ep_<protocol>_port_to_display -> <protocol>_port_to_displayMichael Mann1-5/+5
Adjust any other ep_ related APIs related to the transition. Change-Id: I961b371c2c4bda557e0f1817705c27eef0dae66c Reviewed-on: https://code.wireshark.org/review/6388 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-06Replace ep_address_to_str with address_to_str.Michael Mann1-15/+22
Change-Id: I4f1078b20f41800f72a751612703ad0d4c2ae87b Reviewed-on: https://code.wireshark.org/review/6323 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>
2015-01-05Replace ep_display_to_address with wmem equivalent display_to_address.Michael Mann1-3/+3
Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI. Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9 Reviewed-on: https://code.wireshark.org/review/6318 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02tshark: Add endpoints statisticsMichael Mann1-12/+3
"stat name" has been official changed to "endpoints" for all dissectors, rather than a mixture of "host"/"endpoints" based on dissector. Change-Id: If34bcb5165b493948e784ba038ab202803a59843 Reviewed-on: https://code.wireshark.org/review/6154 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> 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>
2014-12-31Fix conversations filteringPascal Quantin1-4/+6
Change-Id: Ic615830a373deab349a0a5a62f25b131e0bcbf18 Reviewed-on: https://code.wireshark.org/review/6162 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-31tshark: endpoints statistics are not supported for now, do not list them in -zPascal Quantin1-23/+26
Move statistics registration to "GUI" callback registration Change-Id: Id27c049dc8f91d311e9231342ae40749ca0ff5fc Reviewed-on: https://code.wireshark.org/review/6151 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-24Don't do unsafe pointer castingGuy Harris1-4/+6
Don't cast a pointer-to-int into a pointer-to-pointer and pass the resulting pointer to g_hash_table_lookup_extended() - pointers and ints are *not* guaranteed to be the same size. Instead, just have a variable of type gpointer, pass a pointer to *that*, and then run that result through GPOINTER_TO_UINT(). This fixes a reproducible crash. Change-Id: I42954f222ab59866cb909b80d9dbb1d2668d2aff Reviewed-on: https://code.wireshark.org/review/5457 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].Guy Harris1-1/+1
The intent is to handle more than just command-line arguments; reflect that. Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825 Reviewed-on: https://code.wireshark.org/review/5304 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14tap_ui -> stat_tap_ui.Guy Harris1-3/+3
The old routine had stat_ in the name, as the expectation was that they were for statistics taps; that's still the expectation, so have stat_ in the data structure and routine names. Change-Id: Ic98d011012b8641173d41fa0ec4f4e625614370a Reviewed-on: https://code.wireshark.org/review/5303 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14For tap UIs, register a list of parameters and some menu information.Guy Harris1-2/+17
The intent here is to centralize more UI information so that we can move more tap UI stuff to common code. This is a beginning. Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30 Reviewed-on: https://code.wireshark.org/review/5301 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-16Fix spelling: cant-->can't, wont-->won't, etcBill Meier1-4/+4
Change-Id: Ia6c3e7a25615bf8e052c3bacf096d76df775c9c2 Reviewed-on: https://code.wireshark.org/review/4126 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-31Fix parameter 'key' not found in the function declaration (-Wdocumentation)Alexis La Goutte1-1/+1
Change-Id: Ie7f3e192d8980968da15921a8497153506df1fde Reviewed-on: https://code.wireshark.org/review/3903 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-18Refactor "common" hostlist/endpoint table functionality.Michael Mann1-18/+228
This is very similar in architecture to the changes made to the Conversation table functionality. Since all conversations have endpoints/hostlists, the "registered" list is shared for both. Change-Id: Ie8c6910a68a1b3f27c5b18c4494f49b9404a7b31 Reviewed-on: https://code.wireshark.org/review/3214 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>
2014-08-05Fix whitespace/indentation to match editor modelines.Bill Meier1-6/+6
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca Reviewed-on: https://code.wireshark.org/review/3452 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-30Apply refactored "conversation" (tap) data to TShark.Michael Mann1-2/+7
I intentionally left the fields displayed alone (so they don't exactly match Wireshark GUI), because as Guy points out in bug 6310, not sure its A Bug or A Feature. But at least all types of conversations allowed are in sync with Wireshark GUI. Bug:6310 Change-Id: I722837df510a39dadc1f9a07a99275509516698c Reviewed-on: https://code.wireshark.org/review/3212 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-07-26Refactor "common" Conversation table functionality.Michael Mann1-0/+581
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan. Also refactor "common GUI" conversation table functionality. The idea is to not have to modify the GUI when a dissector adds a new "conversation type" Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda Reviewed-on: https://code.wireshark.org/review/3113 Reviewed-by: Gerald Combs <gerald@wireshark.org>