Commit graph

34 commits

Author SHA1 Message Date
Jakub Zawadzki
c5a71b1006 String passed to val_to_str() must have int format specifier (%u, %d, %x, and so on...).
Fix some cases (easy to grep) by call to val_to_str_const().

svn path=/trunk/; revision=47807
2013-02-21 21:04:59 +00:00
Guy Harris
ab638bb6fc geoip_db_get_paths() is exported from libwireshark, so it has to exist
regardless of whether we have GeoIP or not.  However, regardless of
whether it's exported from GeoIP or not, it should return a g_mallocated
string.

svn path=/trunk/; revision=46798
2012-12-26 22:24:15 +00:00
Guy Harris
d4b622de36 Don't define geoip_db_get_paths() unless we have GeoIP - we don't use it
unless it's defined.

svn path=/trunk/; revision=46791
2012-12-26 20:37:50 +00:00
Jeff Morriss
3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Evan Huus
a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Bill Meier
dd5e3dcfea Fix crash in geoip_db_pref_init() when changing to a new profile.
(Use g_free() not free() for g_malloc'd memory).

svn path=/trunk/; revision=43688
2012-07-13 00:54:53 +00:00
Guy Harris
10fa9baef2 From Evan Huus:
Don't initialize GeoIP from epan_init(), as we probably haven't loaded the
preferences for it yet (thanks to it's new use of the UAT framework).

Instead, register a post_update callback with UAT and load it there. As a
bonus, this also means that applying GeoIP preferences no longer requires
restarting Wireshark - everything should Just Work with the new databases right
away.

Fixes bug 7446.

svn path=/trunk/; revision=43604
2012-07-08 01:17:19 +00:00
Guy Harris
659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Anders Broman
c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +00:00
Jakub Zawadzki
bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris
fbc8de6048 Constify the "string to return if not found" argument to
geoip_db_lookup_ipv4() and geoip_db_lookup_ipv6().

In both of those routines, "ret" is always set to a non-null value -
it's initially set to the aforementioned string - so always return it.

svn path=/trunk/; revision=43526
2012-06-28 18:43:16 +00:00
Bill Meier
34e788eb11 'tab-width/tabstop/tabSize' in editor modelines should really always be 8.
svn path=/trunk/; revision=41725
2012-03-21 18:27:10 +00:00
Gerald Combs
da0f8cf7c0 Don't stuff "(null)" into the protocol tree.
svn path=/trunk/; revision=39300
2011-10-06 20:28:40 +00:00
Gerald Combs
210262ad24 Assume all strings coming from GeoIP are ISO-8859-1. Fix IPv6
destination GeoIP lookups.

svn path=/trunk/; revision=39299
2011-10-06 19:33:15 +00:00
Stig Bjørlykke
3c551a7bce It seems like GEOIP_NETSPEED_EDITION_REV1_V6 was added to GeoIP 1.4.8.
svn path=/trunk/; revision=39291
2011-10-06 06:53:07 +00:00
Gerald Combs
aae5eb7de0 Don't break strict aliasing rules.
svn path=/trunk/; revision=39287
2011-10-06 02:43:51 +00:00
Gerald Combs
5bdb1a1e71 GEOIP_NETSPEED_EDITION_V6 → GEOIP_NETSPEED_EDITION_REV1_V6.
svn path=/trunk/; revision=39285
2011-10-05 23:59:07 +00:00
Gerald Combs
6ea68578c7 Add a dummy version of geoip_db_lookup_ipv6(). Should fix compilation on
a few of the build slaves.

svn path=/trunk/; revision=39284
2011-10-05 23:20:45 +00:00
Gerald Combs
2841728510 Fix GeoIP-sans-IPv6 compilation.
svn path=/trunk/; revision=39281
2011-10-05 22:37:00 +00:00
Gerald Combs
b9b05239f1 Add GeoIP IPv6 database support. Tested with GeoIP 1.4.7, but older
versions *should* be supported.

svn path=/trunk/; revision=39280
2011-10-05 22:27:51 +00:00
Bill Meier
6e66257c5d Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

Convert "4 space tabs" to spaces;
Use consistent indentation.

svn path=/trunk/; revision=39079
2011-09-21 17:32:35 +00:00
Stig Bjørlykke
0554530407 From Dirk via bug 6361:
Use File/Directory Dialog as a field type for UAT preferences.

svn path=/trunk/; revision=39059
2011-09-20 10:15:09 +00:00
Guy Harris
9fcc6f5625 Make some routines static that aren't used outside the source file in
which they're defined.

svn path=/trunk/; revision=37226
2011-05-17 23:36:25 +00:00
Stig Bjørlykke
44a8913445 Close dir opened by ws_dir_open().
svn path=/trunk/; revision=35619
2011-01-22 13:44:06 +00:00
Gerald Combs
0357844465 GEOIP_COUNTRY_EDITION_V6 isn't guaranteed to be defined.
svn path=/trunk/; revision=35402
2011-01-06 17:19:20 +00:00
Chris Maynard
0832037854 Add GEOIP_COUNTRY_EDITION_V6 to geoip_type_name_vals[].
svn path=/trunk/; revision=35302
2010-12-29 21:06:05 +00:00
Guy Harris
17d4d51b7d Make the third argument to a UAT copy callback a size_t (not that any of
the callbacks we have use that argument - is it really needed?).

svn path=/trunk/; revision=34694
2010-10-29 21:11:33 +00:00
Stig Bjørlykke
2f8830b4d0 From LEGO via bug 3459:
Add a callback to UAT to be called after the table has being updated,
use it to renew the snmp_ue_cache.

svn path=/trunk/; revision=32112
2010-03-04 12:50:18 +00:00
Stig Bjørlykke
62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Guy Harris
5742ede54c Add an additional "title" attribute for UAT fields; that's what's
displayed to the user.

svn path=/trunk/; revision=27462
2009-02-16 04:10:06 +00:00
Ulf Lamping
d5d3e1fa92 add display of GeoIP latitude/longitude
This is a crude hack, as the current Wireshark interface to GeoIP is not really suitable for reading several values of a single GeoIP database :-(

svn path=/trunk/; revision=27365
2009-02-04 01:02:59 +00:00
Gerald Combs
c30c410fa5 Add GeoIP to the Windows build. Fix a remaining geoip_ -> geoip_db_
conversion.

svn path=/trunk/; revision=27098
2008-12-23 18:56:31 +00:00
Guy Harris
fa910fac19 Add a newline to the end of the file.
svn path=/trunk/; revision=27067
2008-12-20 00:29:05 +00:00
Gerald Combs
7d22c0fb7f Rename geoip.[ch] to geoip_db.[ch] so we don't collide with GeoIP.h. Rename
some functions to match.

Add GeoIP lookups to the IP dissector. Add a preference for GeoIP lookups,
which is disabled by default.

svn path=/trunk/; revision=27063
2008-12-19 23:49:03 +00:00
Renamed from epan/geoip.c (Browse further)