aboutsummaryrefslogtreecommitdiffstats
path: root/epan/conversation.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-03packet-infiniband: Fixed duplicate conversation entriesParav Pandit1-38/+45
1. Fixed find_conversation for PT_IBQP to not lookup in reverse direction when all searches fail. This is required, because there could be valid different connection in reverse direction which mistakenly gets updated for non template cases. 2. Added support for having MAD data for upper level dissectors to process during RC packet processing. This is required because connection options are negotiated out of band using this CM exchanges (unlike in band TCP options). 3. Moved creating unidirectional connections when actually MAD packets are processed. Previously client-to-server unidirectional conversation was created when CM_RSP stage, where MAD Data of CM_REQ packet is inaccessible. 4. Fixed creating multiple conversations with same address property by eliminating create_conv_and_add_proto_data during RTU stage, which was incorrect. Now they are created during REQ and RSP frame processing. (Instead of RSP and RTU processing). 5. Added support for creating bidirectional connection that ULP can refer. This is required to keep track of oustanding transactions on a connection (requests and responses). Bug: 11363 Change-Id: I32ea084a581a58efbc16dbb7a3e267c82622c50c Tested-by: paravpandit@yahoo.com Reviewed-on: https://code.wireshark.org/review/18982 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-06-26conversation: rename shadow variableDario Lombardo1-1/+1
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911 Reviewed-on: https://code.wireshark.org/review/16104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-08Revert "Create an extended converstaion hastable taking more address ↵Anders Broman1-268/+18
information into consideration. This makes it possible to differentiate between packets on different vlans and can be expanded to handle tunnels." This reverts commit f80e9df7939be9d88062718d6c15fa2983e5e605. Change-Id: I7877b250d479c30209cfe74351069d54359757b5 Reviewed-on: https://code.wireshark.org/review/13825 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-02Create an extended converstaion hastable taking more address informationAndersBroman1-18/+268
into consideration. This makes it possible to differentiate between packets on different vlans and can be expanded to handle tunnels. Change-Id: Id36e71028702d1ba4b6b3047e822e5a62056a1e2 Reviewed-on: https://code.wireshark.org/review/13637 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-9/+9
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-03Fix address hashing broken in g4f39c60Evan Huus1-12/+12
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-11-07Remove some unnecessary includes.Guy Harris1-2/+0
Either remove them completely, or put them inside an #ifdef. Change-Id: Iceff4909e250c17812f38d94e067f7c37ab72e1b Reviewed-on: https://code.wireshark.org/review/11630 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-30STUN: register a new conversation dissector after receiving a ConnectionBind ↵Pascal Quantin1-7/+19
Success Response message According to RFC 6062, once the connection is established, data is sent as-is To stop the STUN dissector from interfering, add the ability to specify a starting frame for a conversation dissector and use it Bug: 11641 Change-Id: I65ca96bddacf70444009c0642ea22173fa68992e Reviewed-on: https://code.wireshark.org/review/11372 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>
2015-10-24More ADDRESS macro to address function conversions.Gerald Combs1-12/+12
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-8/+8
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-07-30conversation: fix indent (use tabs)Alexis La Goutte1-403/+403
Change-Id: I256c364954e1b9edd479e5f25a1d742cc216ffff Reviewed-on: https://code.wireshark.org/review/9809 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18Update some comments to reflect reality.Guy Harris1-2/+3
Get rid of references to ep_ and se_ allocation in code that now uses wmem allocation instead. Fix API documentation of conversation_table.h routines to reflect that as well - some APIs changed to pass wmem scopes. Also, zbee_sec_key_hash() now takes the output buffer as an argument and just returns it, and nobody actually uses the return value, so change it to return void. Change-Id: Ife1ec675a9322fd0f0be306a9d639ec17aad1c7a Reviewed-on: https://code.wireshark.org/review/6636 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-16Update comment to reflect the current reality.Guy Harris1-1/+2
Change-Id: I7f8c66723efc9d21ec3abc08e57db1df5f772f04 Reviewed-on: https://code.wireshark.org/review/6576 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-16SE_COPY_ADDRESS -> WMEM_COPY_ADDRESSMichael Mann1-3/+3
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-16Remove seasonal memory from everything except address resolutionsMichael Mann1-3/+3
This includes circuits, conversations and streams as well as camel and h225 dissectors. Change-Id: Ia5ee70a5e5c6bcb420f0f19df126595246a3c042 Reviewed-on: https://code.wireshark.org/review/6566 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-06Replace ep_address_to_str with address_to_str.Michael Mann1-7/+11
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>
2014-08-06we're matching against {any}/port_b, not address_bMartin Kaiser1-1/+1
Change-Id: Ief00f09225805c6c7488d92f8aa5b59c21575788 Reviewed-on: https://code.wireshark.org/review/3464 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-08conversion: do not free conversation memory on updatesPeter Wu1-2/+6
In commit 4afd70d ("Use g_hash_table_new_full to free some values"), the hashtable gained a destroy handler which frees memory. This inadvertently destroyed a conversation during key updates. Fix this by not calling _remove (and thereby calling the destroy handler), but use _steal instead. (Suggestion by Evan Huus). Bug: 10263 Change-Id: I9fa7f5a697599f42894d38718b00b9c0c1b57004 Reviewed-on: https://code.wireshark.org/review/2924 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06Use g_hash_table_new_full to free some valuesEvan Huus1-13/+9
Fixes a good 80-90KB of leaks in certain cases. Bug: 10261 Change-Id: I81d57ac67219e730b03649b9fdfc2306807bdb97 Reviewed-on: https://code.wireshark.org/review/2879 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21Add debug printing functions for conversations, sip, sdp, rtpHadriel Kaplan1-0/+54
There have been enough gnarly bus in sip/sdp/rtp that it needs to have good debug printing. Using a debugger isn't good enough because there's interaction across multiple frames and it's too hard to follow what's going on without real printed data history. Change-Id: Ifb5bb1fb580be81f988569ece79d238a9c030c34 Reviewed-on: https://code.wireshark.org/review/688 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> 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>
2014-02-25Remove trailing whitespaceBill Meier1-2/+2
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-01-04(Trivial) explicitely --> explicitlyBill Meier1-1/+1
svn path=/trunk/; revision=54594
2013-12-27Fix [-Wmissing-prototypes]Anders Broman1-2/+2
svn path=/trunk/; revision=54473
2013-11-01Allow try_conversation_dissector() to pass data to subdissectors.Michael Mann1-2/+2
svn path=/trunk/; revision=53035
2013-09-15Our hash function is no longer commutative (yay!). However, this means that weEvan Huus1-1/+7
no longer get to check both conversation directions at once "for free" because the two orderings actually result in different hashes. Do them one at a time. Sorry Anders, this may or may not cancel out some of the performance gain you were looking for. Either way, the new hash function is still an improvement. Fixes bidirectional conversation lookup, which was conveniently showing up as a DTLS decryption failure in the test suite. Go figure. svn path=/trunk/; revision=52084
2013-09-15Add the new hash algorithm to the macro we were already using. Create aEvan Huus1-84/+43
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-15Use a better hash algorithm and add a dialouge to get hastable data.Anders Broman1-9/+132
svn path=/trunk/; revision=52078
2013-07-08New Qt feature: Show related packet list items in the frame numberGerald Combs1-2/+6
column. Conversation spans (setup frame to last frame) are shown with a square bracket. Linked frames are shown with a circle. Use correct column justifications in Qt. Move common justification-related packet list code to ui/packet_list_utils.[ch]. Add a last_frame element to conversation_t. svn path=/trunk/; revision=50447
2013-03-20 From beroset:Bill Meier1-3/+3
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397 svn path=/trunk/; revision=48438
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=45016
2012-09-11Add data parameter to call_dissector_only.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=44872
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-01Remove debug code left by mistakeAnders Broman1-4/+0
svn path=/trunk/; revision=42959
2012-06-01Fix a couple of warningsAnders Broman1-4/+8
svn path=/trunk/; revision=42958
2012-04-20From Evan Huus: Clean up conversation list iterator caching. ↵Anders Broman1-23/+28
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7149 svn path=/trunk/; revision=42150
2012-04-19From Cristian Constantin:Anders Broman1-1/+6
while caching the last element from the conversation hash chain lists speeds-up the operation when the hash/chain lists are actually built, it does NOT help a lot when a certain random conversation which is in the hash table is looked-up. I did some profiling and tracing and I saw that a lot of cpu time is spent in the function conversation_lookup_hashtable() when wireshark is asked to show the "Flow Graph", "TCP Conversations", "Voip Calls". I used two types of captures with over 500k packets: - tcp packets having the _same_ src ip addr, src tcp port, dst ip addr, dst tcp port - (mostly) sip packets containing sdp payloads which advertise the _same_ ip addr, udp port for media these types of captures lead to _huge_ chain lists behind the same hash bucket (to which the conversation is actually mapped) the solution would be to cache the last found conversation into the head of the chain list and to use it whenever it is possible; most of the time the look-up will be in O(1) instead of O(n) (n - number of elements in the list). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7149 svn path=/trunk/; revision=42141
2012-04-19From Evan Huus: Convert a few instances in conversation.c to use the new ↵Anders Broman1-2/+2
macro. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142 svn path=/trunk/; revision=42138
2012-04-17From Evan Huus:Anders Broman1-64/+115
Do the right thing with conversation hash chains. Adds two new functions: conversation_insert_into_hashtable() and conversation_remove_from_hashtable() that do the right thing with conversation hash table chains and ordering and all that. Converts conversation_new(), conversation_set_addr2() and conversation_set_port2() to use the new functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7085 svn path=/trunk/; revision=42104
2012-04-13From Cristian Constantin:Anders Broman1-2/+2
There was something really wrong in conversation_lookup_hashtable(). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7066 svn path=/trunk/; revision=42044
2012-04-09Mark some function static.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=41999
2012-02-04From Cristian Constantin:Anders Broman1-15/+48
Slow loading/processing of conversations with over 500k frames. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6755 svn path=/trunk/; revision=40837
2011-10-20Delay freeing of seasonal memory until after the conversation cleanup routineJeff Morriss1-5/+32
has been called. In the conversation cleanup routine, free the GSlist for any proto_data which may have been hanging off the (se_allocated) conversation. svn path=/trunk/; revision=39484
2010-05-13As suggested in ↵Jeff Morriss1-0/+24
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. svn path=/trunk/; revision=32790
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-15/+15
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-15/+15
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-15/+15
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2009-09-06Split a bunch of init routines into init() and cleanup(). This allows us to ↵Kovarththanan Rajaratnam1-4/+15
free memory properly on shutdown. This is an initial step. There's still some work to do. svn path=/trunk/; revision=29754