Commit Graph

36 Commits

Author SHA1 Message Date
Guy Harris 8aa14236f8 Have the frame_tvbuff.c routines not use the global cfile.
Have the routines that create them take a pointer to a struct
packet_provider_data, store that in the tvbuff data, and use it to get
the wtap from which packets are being read.

While we're at it, don't include globals.h in any header files, and
include it in source files iff the source file actually uses cfile.  Add
whatever includes that requires.

Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229
Reviewed-on: https://code.wireshark.org/review/24733
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 08:31:41 +00:00
Guy Harris 3630a447d9 Get rid of unused #defines.
Change-Id: I6d4f56cddbe4378a3a7d4feb5ac16933675ac83b
Reviewed-on: https://code.wireshark.org/review/24175
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-29 22:30:04 +00:00
Anthony Coddington 193cef0bcb Attempt to clean up addr_resolv flags by removing DUMMY_ADDRESS_ENTRY
Replace with easier to understand and already present NAME_RESOLVED given dummy address is always filled.

Change-Id: If8464f89e88722aac70689749fe0d4a31c119db2
Bug: 13798
Reviewed-on: https://code.wireshark.org/review/22110
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-19 14:33:09 +00:00
Dario Lombardo a7ab65df89 addr_resolv: change g_hash to wmem_map.
Change-Id: Ice7533fbeac700dae0a46766838818a32b0d5736
Reviewed-on: https://code.wireshark.org/review/15051
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-14 19:33:04 +00:00
Peter Wu 33570f81b5 Fix misaligned read and buffer overrun
Ethernet addresses are only 6 bytes in size, reading it as a 64-bit
integer is invalid. Use unsigned 8-bit integers instead.

Caught by UBSAN and Address Sanitizer. Trigger via the Statistics menu
Resolved Addresses (Qt) or Show address resolution (GTK).

Change-Id: I628ff7cce0ea4f4e378c7968cd79a0ae34cdd20b
Reviewed-on: https://code.wireshark.org/review/10443
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
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: Evan Huus <eapache@gmail.com>
2015-09-13 02:38:19 +00:00
Michael Mann b2c81bb9e8 Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to worry about the wmem_allocator.

Change-Id: If976fe7b0c3f9cd053225096c2ac05418f061af6
Reviewed-on: https://code.wireshark.org/review/7081
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-16 12:47:02 +00:00
Michael Mann 91b5042ece "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: Ic7dee275ba0a2bd4e19c06702a867417c5624c27
Reviewed-on: https://code.wireshark.org/review/7080
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-14 15:56:21 +00:00
Anders Broman 4359cb8478 Revert ""Hide" hashether_t structure."
This reverts commit 297ef07b9b.

Change-Id: Id47f5fd221b631c95ca71e3f9315f5263bab22de
Reviewed-on: https://code.wireshark.org/review/7077
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:30 +00:00
Anders Broman 53228c4bd8 Revert "Make get_manuf_name return a const string."
This reverts commit 797ea88aef.

Change-Id: I9bc2cef0051d88c6374c6f1868b0250cba3edbd4
Reviewed-on: https://code.wireshark.org/review/7076
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 08:34:05 +00:00
Michael Mann 797ea88aef Make get_manuf_name return a const string.
Model get_manuf_name after get_ether_name so that a string (either name resolved or colon-separated bytes) is always stored in a hash table.  This will make name resolution of addresses perform a little better because it doesn't have to work about the wmem_allocator.

Change-Id: I80f465ae0845290255a659ab63310ac3cc35506e
Reviewed-on: https://code.wireshark.org/review/7075
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-02-12 07:36:20 +00:00
Michael Mann 297ef07b9b "Hide" hashether_t structure.
One use in a GUI function isn't really enough to justify making the structure public.

Change-Id: I6d70b9bacbc0fa1898150f59c0c69779a6cd5d51
Reviewed-on: https://code.wireshark.org/review/7074
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-12 07:31:05 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Bill Meier f3dd7fe1eb Fix whitespace/indentation to match editor modelines.
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca
Reviewed-on: https://code.wireshark.org/review/3452
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 20:42:21 +00:00
Bill Meier 278b76250f addr_resolution_dlg.c: "OK" button should *do* something: treat as cxl.
Also: remove vestigial line of commented-out code.

Change-Id: Ieb41a0e39a4e0ec14031b1dbd38fc0d7ad47a635
Reviewed-on: https://code.wireshark.org/review/3278
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-31 04:41:13 +00:00
Bill Meier 0a12f7d261 addr_resolution_dlg.c: Fix crash when 'Statistics ! Show address resolution' is invoked.
(Introduced when the ipv4_hash_table key format was changed in 5d98ab67)

Change-Id: Ie5d1314f7c7cc8bc71dca8a2db05e34a0a7776d7
Reviewed-on: https://code.wireshark.org/review/3277
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-31 04:40:10 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Anders Broman d038be780b Flag the addresses used in the trace which has been resolved and only add those to the list used to create the NRB.
svn path=/trunk/; revision=52504
2013-10-10 19:17:48 +00:00
Martin Kaiser 52bcaf69af remove unused variable, mark unused parameter
svn path=/trunk/; revision=51954
2013-09-11 19:49:16 +00:00
Anders Broman e3cccd17f4 Get rid of some users the addrinfo_list.
svn path=/trunk/; revision=51953
2013-09-11 19:22:24 +00:00
Anders Broman d0b80c8299 Revert revision=51577.
Ref https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9082
Since this commit the IP (source and destination) address in the GUI will be
replaced with some date after I click on the entry, reverting this commit fixes
the problem.


This looks like a memory corruption. I imported an older pcap file.

svn path=/trunk/; revision=51581
2013-08-29 22:18:12 +00:00
Anders Broman 39a61a1680 Don't store address in the hastable when name resolution is off.
svn path=/trunk/; revision=51577
2013-08-29 18:59:49 +00:00
Anders Broman 4fd2487e7d addr_resolution_dlg.c: In function 'ipv6_hash_table_to_texbuff':
addr_resolution_dlg.c:185: warning: unused parameter 'key'

svn path=/trunk/; revision=51416
2013-08-18 19:18:20 +00:00
Anders Broman ccb96fd73a Use g_hastable() for IPv6 name reslution.
svn path=/trunk/; revision=51415
2013-08-18 19:02:48 +00:00
Anders Broman 93c9c4b0ff Use g_hashtable for IPv4 name resolution.
svn path=/trunk/; revision=51301
2013-08-11 19:02:26 +00:00
Anders Broman 21d5a76a68 Use a hastable for port resolution. Currently one table for the 4 protocols with resolution. SCTP and DCCP should perhaps be splited out to their own tables.
svn path=/trunk/; revision=51153
2013-08-05 16:36:24 +00:00
Jeff Morriss d4baa69fd1 Add some casts.
svn path=/trunk/; revision=51122
2013-08-02 16:20:15 +00:00
Anders Broman bcb5ff7532 - Use a hashtable for eth lookup.
Currently broken get_ether_addr().
- Show hastable content in address dlg.(temp solution).

svn path=/trunk/; revision=51119
2013-08-02 15:05:00 +00:00
Bill Meier e442680f48 gtk_widget_modify_font() has been renamed to gtk_widget_override_font() in GTK3
svn path=/trunk/; revision=50915
2013-07-26 16:19:00 +00:00
Guy Harris 9c6cae4bde Include ui/gtk/addr_resolution_dlg.h so that functions defined here are
checked against their declarations.

Fix a tpo.

svn path=/trunk/; revision=49536
2013-05-22 23:28:11 +00:00
Guy Harris 039a075699 Eliminate some includes of ui/simple_dialog.h by files that don't use
anything from it.

svn path=/trunk/; revision=49277
2013-05-13 22:50:29 +00:00
Gerald Combs b2f2059c41 Use a monospace font for the address resolution dialog so that tab
alignment will work. Add modelines and reindent.

svn path=/trunk/; revision=48777
2013-04-07 17:59:07 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Jeff Morriss 5d21ea33e4 Actually add IPv6 addresses to the display.
svn path=/trunk/; revision=48128
2013-03-06 02:18:23 +00:00
Evan Huus 52aff57285 Remove unneeded initializations, and one redundant if condition.
svn path=/trunk/; revision=46702
2012-12-22 21:14:13 +00:00
Anders Broman 5efb100bc4 Add a menu to view the current address resolution.
Future enhancments(?) to save as new hosts file.

svn path=/trunk/; revision=46307
2012-11-30 14:57:50 +00:00