Commit Graph

111 Commits

Author SHA1 Message Date
Stig Bjørlykke 43cba80324 Added a missing break in hostlist_get_filter_name.
Coverity 481.

svn path=/trunk/; revision=36348
2011-03-26 15:16:40 +00:00
Stephen Fisher 9d3586b4f5 And even more -DGSEAL_ENABLE cleanup for GTK+ 3.0 preparation...
svn path=/trunk/; revision=35849
2011-02-07 18:41:38 +00:00
Bill Meier 7f0107220d Fix various instances of "unreachable code".
svn path=/trunk/; revision=35713
2011-01-30 23:27:57 +00:00
Chris Maynard 1e2ae5a88a Quote all fields when exporting to CSV. Fixes bug 2811.
svn path=/trunk/; revision=34920
2010-11-17 03:29:12 +00:00
Stig Bjørlykke 32da2562b8 We set sensitivity on the map button in ct_nb_map_switch_page_cb().
svn path=/trunk/; revision=34469
2010-10-11 08:29:25 +00:00
Stig Bjørlykke 0ca8c586d3 Use UTF8_HORIZONTAL_ELLIPSIS instead of "..." in menus.
svn path=/trunk/; revision=34346
2010-10-03 16:09:25 +00:00
Stig Bjørlykke 25d8d91add Use correct text for "Not Selected".
svn path=/trunk/; revision=34344
2010-10-03 15:26:03 +00:00
Anders Broman f92d65f0cb Remove the depricated GtkItemFactory code.
svn path=/trunk/; revision=34054
2010-09-03 08:41:04 +00:00
Jeff Morriss b4c2ed1b86 Remove some unnecessary includes: a lot of things don't need globals.h and register.h
svn path=/trunk/; revision=34017
2010-08-30 16:10:01 +00:00
Anders Broman 6e5a0a481f Remove a redundant callback.
svn path=/trunk/; revision=34015
2010-08-30 14:32:38 +00:00
Anders Broman 60f258b4e5 Convert to GTKUIManager
svn path=/trunk/; revision=34014
2010-08-30 14:23:25 +00:00
Bill Meier 6cdec04e59 (Minor) Cleanup some "event callback" function declarations/definitions:
- Add missing 'user_data' arg as needed;
- Use gboolean rather than int as the type of the value returned.
Also: Cleanup whitespace & reformat long lines in a few cases.

svn path=/trunk/; revision=33679
2010-07-30 12:41:56 +00:00
Anders Broman bc5133f53f From Didier Gautheron:
Right align and numerically sort geoip latitude and longitude info.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4030

svn path=/trunk/; revision=32054
2010-02-28 20:56:21 +00:00
Gerald Combs a1f201976b Don't try to fetch columns that don't exist.
svn path=/trunk/; revision=31902
2010-02-16 23:10:00 +00:00
Bill Meier 33cf0af255 Fix some gcc -Wshadow warnings;
Use consistent indentation.

svn path=/trunk/; revision=31727
2010-01-29 14:24:18 +00:00
Anders Broman 85d8b896a6 From Didier Gautheron:
- memory leak, free the list after walking it, ie free a NULL list, ie free nothing. I've only fixed bugs introduced by me with GTKCList to TreeView modifs, it seems there's the same bug in gtk/dlg_utils.c.

svn path=/trunk/; revision=30421
2009-10-09 09:06:22 +00:00
Anders Broman b8755d9305 From Didier Gautheron:
Treeview for hostlist. 
Notes:
- tested without and with geoip lib but only with the free DB (no lat/long data) thus 'open_as_map_cb' is not really tested.
 
- It changes the sorting of addresses if 'resolve names' is set and uses the same sorting than conversations. The old way may make more sense for ethernet though.

svn path=/trunk/; revision=30420
2009-10-09 09:01:04 +00:00
Kovarththanan Rajaratnam 8c48c6835f Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().

svn path=/trunk/; revision=29747
2009-09-06 14:25:47 +00:00
Gerald Combs 72a20c1695 Pull mkstemp() into tempfile.c. That's the only place we use it now, and
it's arguably the only place we _should_ use it. Add create_tempdir() to
tempfile.c and use it to create a temp directory for IP maps. This
should fix bug 3530.

(This still doesn't work on IE 8 / Vista here. IE gives an access denied
error in OpenLayers.js, but this is a separate issue).

svn path=/trunk/; revision=28920
2009-07-02 17:20:27 +00:00
Gerald Combs e0ebc32195 Updates to create_tempfile:
- Use g_get_tmp_dir, just like get_tempfile_path.
  - Don't make the caller worry about the path buffer length.

svn path=/trunk/; revision=28915
2009-07-01 23:36:51 +00:00
Anders Broman 485fc6805b Change window_new() to dlg_window_new() and destroy the window with the top level window.
svn path=/trunk/; revision=28810
2009-06-22 15:22:37 +00:00
Anders Broman 135ca5136f Change window_new() to dlg_window_new() and destroy the window with the top level window.
svn path=/trunk/; revision=28796
2009-06-21 20:42:07 +00:00
Gerald Combs ce3d46b20c Use a unique data file name for our OpenStreetMap data. Print an error
if we don't have data for any hosts. Fixes bug 3530.

svn path=/trunk/; revision=28728
2009-06-14 22:19:08 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Bill Meier 734ec176e1 From Jakub Zawadzki: Use size of buffer [not size -1];
Also: as suggested actually use sizeof() rather than a constant.
From me:
 -Rework hostlist_port_to_str slightly to be simpler and
   more efficient;
 -Fix indentation to be consistent. 

svn path=/trunk/; revision=27771
2009-03-18 14:44:15 +00:00
Bill Meier 292cc21bb0 Use ws_fopen() [not fopen()] so that a path\filename with
non-ascii charcters will work properly.

svn path=/trunk/; revision=27675
2009-03-09 14:53:22 +00:00
Guy Harris 0bd9f9caa9 Use open_failure_alert_box() for open failures; use
copy_file_binary_mode() to copy a file, and check for it failing.

svn path=/trunk/; revision=27459
2009-02-15 22:57:47 +00:00
Stig Bjørlykke 84b134a22d Compiling on Ubuntu 8.10 gives a warning when not checking the return value
from fwrite, so added a check.  Also use size_t for nbytes.

svn path=/trunk/; revision=27451
2009-02-15 15:02:29 +00:00
Ulf Lamping c70e7b0d3b try to fix the buildbot
svn path=/trunk/; revision=27438
2009-02-12 02:33:19 +00:00
Guy Harris d78ea7720a Make the column information signed, so that -1 is a valid out-of-band
value.

Use \t, rather than literal tabs, in character strings, so it's more
obvious that they're tabs, and so that if a tool changes tabs to spaces
it won't mess things up.

Use spaces for indentation, for the benefit of editors that have
hardwired tab stops.

svn path=/trunk/; revision=27436
2009-02-12 01:44:17 +00:00
Ulf Lamping f8e5b17dbd add support for a simple GeoIP based IP Location Map, more details will follow on the dev-list
svn path=/trunk/; revision=27433
2009-02-11 20:25:17 +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
Gerald Combs 218ec164c6 GeoIP expects IPv4 addresses in host byte order.
svn path=/trunk/; revision=27097
2008-12-23 18:17:01 +00:00
Bill Meier 6fee0f704e Fix some typos and spelling
svn path=/trunk/; revision=27070
2008-12-20 01:39:16 +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
Stig Bjørlykke 8608c8f1de Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26641
2008-10-31 09:53:56 +00:00
Gerald Combs 1d1dcb604b Allow more characters in each column.
svn path=/trunk/; revision=26592
2008-10-27 21:38:40 +00:00
Stig Bjørlykke 9676190af1 Uh, new attempt to sort hostlist correct...
svn path=/trunk/; revision=26577
2008-10-27 14:40:44 +00:00
Stig Bjørlykke 164b61e7b0 Sort hostlist columns correct.
Temporary fix for adding GeoIPCity names with norwegian characters,
so we do not crash in gtk_clist_insert(). 

svn path=/trunk/; revision=26576
2008-10-27 14:17:04 +00:00
Gerald Combs 1b7064bb6a Add support for the GeoIP library. Using different database files,
GeoIP can map IP addresses to Countries, Cities, AS numbers, ISPs,
etc. If any library paths are defined AND any database files are found,
corresponding columns are added to the endpoint tables in the GUI.

To do:
  - Add columns to the conversation list
  - Add GeoIP info to "-z conv,..."
  - Create a default UAT file.

svn path=/trunk/; revision=26571
2008-10-27 04:50:57 +00:00
Stig Bjørlykke b4d9a5c868 Bring the windows to front when rescanning of packets are done.
svn path=/trunk/; revision=26436
2008-10-13 18:16:35 +00:00
Jeff Morriss dd6a15e1c7 Don't put (non-extern'd) prototypes for protect_thread_critical_region() and
unprotect_thread_critical_region() in every module in gtk/: instead have those
modules include main.h (which has the properly extern'd prototype).

This should fix the link error on HP-UX described in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2702

svn path=/trunk/; revision=25933
2008-08-05 17:33:14 +00:00
Bill Meier 56206e0002 Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_container_border_width()          ==> gtk_container_set_border_width()
  gtk_container_children()              ==> gtk_container_get_children()
  gtk_entry_new_with_max_length()       ==> gtk_entry_new(); gtk_entry_set_max_length()
  gtk_menu_append()                     ==> gtk_menu_shell_append()
  gtk_menu_prepend()                    ==> gtk_menu_shell_prepend()
  gtk_notebook_set_page()               ==> gtk_notebook_set_current_page()
  gtk_paned_gutter_size()               ==> gtk_paned_set_gutter_size()
  gtk_radio_button_group()              ==> gtk_radio_button_get_group()
  gtk_signal_connect()                  ==> g_signal_connect()
  gtk_signal_disconnect()               ==> g_signal_handler_disconnect()
  gtk_signal_emit_by_name()             ==> g_signal_emit_by_name()
  gtk_signal_handler_block_by_data()    ==> g_signal_handlers_block_matched()
  gtk_signal_handler_block_by_func()    ==> g_signal_handlers_block_by_func()
  gtk_signal_handler_unblock_by_data()  ==> g_signal-handlers_unblock_matched()
  gtk_signal_handler_unblock_by_func()  ==> g_signal-handlers_unblock_by_func()
  gtk_spin_button_get_value_as_float()  ==> gtk_spin_button_get_value()
  gtk_toggle_button_set_state()         ==> gtk_toggle_button_set_active()

svn path=/trunk/; revision=25634
2008-06-29 15:51:43 +00:00
Stig Bjørlykke 860028c634 Removed the usage of topic_available() as we now have all topics.
svn path=/trunk/; revision=25505
2008-06-21 13:36:31 +00:00
Stig Bjørlykke c89675bf8f - Use the common function for applying a selected filter.
- Allocate data for filter string instead of using a static array.

svn path=/trunk/; revision=25315
2008-05-17 23:03:17 +00:00
Stig Bjørlykke a63ad85c78 Changed to display NCP connection, as in conversations.
svn path=/trunk/; revision=25181
2008-04-25 19:42:27 +00:00
Ulf Lamping 644a474c95 sort #includes by directories
svn path=/trunk/; revision=24969
2008-04-13 03:32:24 +00:00
Ulf Lamping d4ccf577a8 where it's not necessary, remove #include "compat_macros.h"
svn path=/trunk/; revision=24922
2008-04-12 01:02:59 +00:00
Ulf Lamping 8e58ec7085 last round to replace SIGNAL_CONNECT with g_signal_connect
svn path=/trunk/; revision=24918
2008-04-11 23:16:06 +00:00
Ronnie Sahlberg 154e8f0892 add missing braces to unbreak the build
svn path=/trunk/; revision=24916
2008-04-11 23:12:24 +00:00