Commit Graph

66 Commits

Author SHA1 Message Date
Gerald Combs 021a926793 Add support for the c-ares asynchronous DNS resolution library to the
Windows build. Add support for async IPv6 lookups. Update the ADNS
code slightly.

This is not supported (yet) on the UNIX side.

svn path=/trunk/; revision=25953
2008-08-07 21:41:48 +00:00
Bill Meier 44efa0ed2e Fix some simple cases of GTK2 deprecated API usage by using a renamed or equivalent API
gtk_timeout_add()     ==> g_timeout_add
   gtk_timeout_remove()  ==> g_source_remove()

Also: timer callback should return gboolean (not void or gint)

svn path=/trunk/; revision=25672
2008-07-08 02:25:30 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Anders Broman 36d89bb79c Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25368
2008-05-23 05:55:34 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Stig Bjørlykke 74766c736a From Andrew Feren (bug 2433):
Add support for port ranges in services.

svn path=/trunk/; revision=24934
2008-04-12 14:08:19 +00:00
Stig Bjørlykke 51060a1b5c Removed C++ style comment.
svn path=/trunk/; revision=24178
2008-01-24 18:51:54 +00:00
Stig Bjørlykke a88efc9325 From Douglas Pratley (bug 1445):
Add a "subnets" file defining a named list of subnets.

svn path=/trunk/; revision=24154
2008-01-21 21:44:34 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Stig Bjørlykke 8b4e80384a Fixed a few "statement not reached" warnings and a "assignment type mismatch" warning.
svn path=/trunk/; revision=24085
2008-01-14 09:39:55 +00:00
Anders Broman b325ef4878 Apply yet another set of the optimization patches:
Don't use g_snprintf for temporary unsigned int to ascii conversion.

svn path=/trunk/; revision=23409
2007-11-09 05:55:33 +00:00
Anders Broman 3a16fb20a3 Apply yet another set of the optimization patches:
Replace strncpy with g_strlcpy.
Add g_strlcat for GTK1 and don't use g_snprintf in GTK1 g_strlcpy
printf family is very slow.

svn path=/trunk/; revision=23273
2007-10-26 05:42:12 +00:00
Mike Duigou 6aeb75c3f0 Changes get_addr_name_buf() to use the more common convention where the provided buffer size is the entire size of the buffer including the space for the terminating \0
svn path=/trunk/; revision=23016
2007-09-28 18:23:59 +00:00
Jörg Mayer 4793614e27 Mask out only the bc/mc bit, not the locally assigned bit.
Update comment accordingly.

svn path=/trunk/; revision=22507
2007-08-15 13:21:23 +00:00
Ulf Lamping 60e81cd141 if the manuf address could not be resolved, strip off special bits (multicast, locally administered) and try again to find it
svn path=/trunk/; revision=22503
2007-08-14 23:52:51 +00:00
Ulf Lamping 1bab78bfdf remove an unused variable
svn path=/trunk/; revision=22458
2007-08-06 09:12:18 +00:00
Ulf Lamping 2aef54275a add a way to read a personal /etc/services file for TCP/UDP/... port service name resolution.
svn path=/trunk/; revision=22457
2007-08-06 08:44:26 +00:00
Bill Meier a6dab6d644 (Minor) Use _WIN32 (instead of WIN32) like the rest of Wireshark
svn path=/trunk/; revision=22030
2007-06-03 16:07:07 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 46b8669566 Fix a bunch more warnings. Add -Werror when using --with-warnings-as-errors
under gcc to tools/lemon, plugins/mate and epan/


svn path=/trunk/; revision=21204
2007-03-26 06:10:52 +00:00
Gerald Combs 063621f11b Fix potential buffer overruns in address_to_str_buf() found by Andrej
Mikus.  Add a buf_len parameter to ip_to_str_buf(), and make sure it's 
enforced.  Copy the release notes over from the 0.99.5 trunk and add a
note about the ISUP dissector (which is affected by the overrun).

svn path=/trunk/; revision=20607
2007-01-29 20:25:26 +00:00
Jaap Keuter 05aa18b522 Fix for bug 795: handle CR as line end as well
svn path=/trunk/; revision=19075
2006-08-29 16:54:39 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping b38db335d3 I don't see any reason why we should only have to look for a hosts file in the personal preferences file, but not in the datafile path, as we doing it for a lot of other config files at runtime.
Add a try to use a global hosts file if one is available ...

svn path=/trunk/; revision=17441
2006-03-02 00:06:15 +00:00
Anders Broman 0fc74ff335 From dider
file.c
time reference menu callback doesn't set  cf->filter, it dumps a core if 
you have a file big enough in find next/ find prev.

addr_resolv.c
leak memory, break list chain when snooping address.

svn path=/trunk/; revision=17419
2006-02-27 09:01:10 +00:00
Jörg Mayer 118e05db0b Ricardo Muggli:
The attached patch will fix ethereal so it will only do network address
resolution when network address resolution is enabled. Even when the
RESOLV_NETWORK flag was set ethereal would try to resolve addresses in
the add_ether_byip function.


svn path=/trunk/; revision=17227
2006-02-09 09:18:15 +00:00
Gerald Combs b3d0b97635 Make sure we don't use the ADNS version of inet_aton; it's broken.
This fixes bug 523, but exposes more of bug 658.

The TACACS and SDP dissectors don't call inet_aton(), so don't include it.

svn path=/trunk/; revision=17056
2006-01-19 23:01:24 +00:00
Ulf Lamping a9f4ae4f99 fix #648:
Win32 only: reading a pathname from an environment var requires us to read it in as unicode somehow and convert it to utf8. Using _wgetenv should work under all circumstances on NT, using getenv and g_locale_to_utf8 on Windows OT is the best we can do in this case.


svn path=/trunk/; revision=17024
2006-01-12 22:32:29 +00:00
Guy Harris db9fba20b4 Use <wiretap/file_util.h> to include "file_util.h"; otherwise, the
include fails as we don't do -Iwiretap.

If we have it, include <sys/stat.h> in epan/filesystem.c - we need it
for stat() and the macros and structures it uses.

svn path=/trunk/; revision=16410
2005-11-07 02:47:09 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Jörg Mayer e6194537b3 Francesco Fondelli; Add dcp support
svn path=/trunk/; revision=15897
2005-09-20 15:18:28 +00:00
Guy Harris 39fd819fb4 Don't collide with the "regular" IPv6 defintions in at least some
platforms in ipv6-utils.h.

svn path=/trunk/; revision=15764
2005-09-12 06:21:35 +00:00
Ronnie Sahlberg e480a7c1e8 remove a bunch of sprintf that should be perfectly safe but for the principle of it
replace with g_snprintf()


svn path=/trunk/; revision=15621
2005-08-30 09:25:44 +00:00
Ronnie Sahlberg d4267d1272 replace some more silly rotating buffers with ep_alloc() calls
svn path=/trunk/; revision=15386
2005-08-17 09:36:20 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Gerald Combs 570d352948 Move Win32-specific variable declaration to the beginning of a function.
Fixes a recent buildbot failure.

svn path=/trunk/; revision=14962
2005-07-19 22:24:28 +00:00
Ulf Lamping 47d503303c from Graeme Hewson: "Fixes for ethereal config files"
svn path=/trunk/; revision=14956
2005-07-19 20:44:45 +00:00
Ulf Lamping d2233711d9 add get_manuf_name_if_known (returns NULL if unknown) in addition to get_manuf_name
svn path=/trunk/; revision=14405
2005-05-20 21:44:17 +00:00
Guy Harris 3a8d46d8e9 Always set "*success" in "ipxnet_addr_lookup()" before returning (thanks
and a tip of the hat to GCC 4.0's interprocedural data flow analysis for
catching this one!).

svn path=/trunk/; revision=14353
2005-05-12 02:50:27 +00:00
Guy Harris af2aab9ee1 Plug some more small leaks.
svn path=/trunk/; revision=13889
2005-03-24 03:10:31 +00:00
Luis Ontanon f0c8a7ab65 From Francisco Alcoba:
changed the behaviour of get_addr_name:
 - resolve to a name if the address supports it
 - call address_to_str if it does not, but the address is valid
 - return "NONE" if it is AT_NONE


svn path=/trunk/; revision=13463
2005-02-22 01:55:04 +00:00
Guy Harris 1f8699cca9 Fix a typo in the previous checkin.
svn path=/trunk/; revision=13090
2005-01-17 21:38:31 +00:00
Guy Harris 2aad197f9e Use WINDIR rather than SYSTEMROOT - WINDIR is apparently set on Windows
OT as well as NT, while SYSTEMROOT isn't.

If it's not set, don't bother looking for the hosts file, rather than
trying a path with a fixed drive letter.  If it is set, try the Windows
NT location first and, if that fails, the Windows OT location.

svn path=/trunk/; revision=13088
2005-01-17 19:30:31 +00:00
Guy Harris 5862d6546e Add support for a personal hosts file.
Clean up the description of the global and personal ethers and ipxnets
files.

svn path=/trunk/; revision=13017
2005-01-13 09:09:56 +00:00
Guy Harris f8b7622fd5 Put back the declaration of hostspath on Windows.
svn path=/trunk/; revision=12976
2005-01-07 11:22:18 +00:00
Guy Harris 081f202ae3 Move the open and close of the hosts file into "read_hosts_file()".
On Windows, if we don't get the SYSTEMROOT environment variable, try
various locations where the hosts file is known to exist.

svn path=/trunk/; revision=12972
2005-01-07 10:20:17 +00:00
Lars Roland 0a771e1c65 Check return value of getenv().
It can return NULL, which would lead here to strcpy(hostspath, NULL);
*Very* bad.

replace g_malloc(), strcpy() and strcat() with one single g_strconcat(). 

svn path=/trunk/; revision=12970
2005-01-07 03:19:39 +00:00
Guy Harris 0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +00:00