Commit Graph

201 Commits

Author SHA1 Message Date
Gerald Combs 24d67b60ab Add a ModulePreferencesScrollArea widget which builds a scrollable frame
for a preferences module. Use it to fill in the remaining preferences.
Don't show the printing preferences since they're not used here.

Change the titles and tooltips for some of the name resolution
preferences.

Disable the capture preferences if we can't capture. This is different
from the GTK+ version which hides it completely.

Thus concludes the preferences dialog (for the time being).

svn path=/trunk/; revision=47545
2013-02-08 01:16:46 +00:00
Evan Huus 17a05dfae0 Remove unused file handle that appears to have been left over by
accident after a refactor.

svn path=/trunk/; revision=46907
2013-01-02 23:16:03 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Evan Huus fc1d83d924 Fix a double-free by setting the GSList back to NULL when we free it.
Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8101

svn path=/trunk/; revision=46583
2012-12-18 03:31:25 +00:00
Gerald Combs bd19dcd8bf Add an add_hosts_file routine that adds a "hosts" path to an array and
use it in tshark.c instead of read_hosts_file. This lets us use "-H"
multiple times. Make read_hosts_file static.

svn path=/trunk/; revision=46273
2012-11-29 00:32:39 +00:00
Anders Broman e57bf90ebe From Bill Parker:
code fails to check/test return value from select() 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7861

svn path=/trunk/; revision=45917
2012-11-05 09:18:43 +00:00
Jakub Zawadzki 829b2fc91f Make r45511 work also without HAVE_C_ARES.
svn path=/trunk/; revision=45674
2012-10-20 20:50:25 +00:00
Gerald Combs c91c1df500 Use seasonal allocation for name resolution. This effectively scrubs our
resolution information between capture files so that we don't leak host
entries from one file to another (e.g. embarassing-host-name.example.com
from file1.pcapng into a name resolution block in file2.pcapng).

host_name_lookup_cleanup and host_name_lookup_init must now be called
after each call to se_free_all. As a result we now end up reading our
various name resolution files much more than we should.

svn path=/trunk/; revision=45511
2012-10-12 21:37:02 +00:00
Guy Harris 6cfc6b1539 Fix indentation.
svn path=/trunk/; revision=45270
2012-10-02 21:15:54 +00:00
Guy Harris 73dd0321ea Get rid of the always-null and unused argument to
host_name_lookup_process().  If, in the future, we find that we need an
argument for changes we're making, we can add it then.

svn path=/trunk/; revision=45269
2012-10-02 21:13:59 +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
Chris Maynard ff63dcfa8e Jeff Morriss indicated the following and I obliged:
Actually I suppose what was meant is more about whether tp->name[0] is the NULL character (that is, that the name is empty).

But since the result of the lookup is already there in 'found' the whole condition can probably be taken out.


svn path=/trunk/; revision=43701
2012-07-13 21:20:00 +00:00
Chris Maynard 86b2f69672 tp->name can't be NULL, but perhaps tp can be?
Fixes Coverity CID 709597: Array compared against 0.

svn path=/trunk/; revision=43695
2012-07-13 20:09:29 +00:00
Anders Broman 0a27ca29b2 Add a new preference to make it possible to only use the hosts file
for a profile for name resolution.

svn path=/trunk/; revision=43659
2012-07-11 08:52:51 +00:00
Jeff Morriss 9ece26aee9 Obey the new use-external-resolvers preference when translating IP
addresses into host names (in get_host_ipaddr() and get_host_ipaddr6()).

This may resolve
http://ask.wireshark.org/questions/12542/what-is-use-external-network-name-resolver-setting

svn path=/trunk/; revision=43647
2012-07-10 15:02:23 +00:00
Jeff Morriss 7a8a40946a host_lookup() and host_lookup6() are both called even when network-name
resolution is NOT enabled (it's always been like this and I'm not sure why
and I was hesitant to change that).  So: don't use the external name resolver
unless both network-name resolution AND use-external-resolvers are enabled.

svn path=/trunk/; revision=43645
2012-07-10 14:33:19 +00:00
Anders Broman 8762bd56a3 Group the network name resolution boxes together and make a more verbose explanation on the intended use.
svn path=/trunk/; revision=43638
2012-07-10 07:24:01 +00:00
Jeff Morriss 8f12c9d7d7 First phase of fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7380 :
Add a new name resolution option: whether or not use the configured (in the OS)
name resolver (e.g., DNS) to resolve network names.  When this option is disabled
but network name resolution is enabled then Wireshark will resolve only those
names that it can from local sources.  This includes (at least, AFAIK):

- name resolutions that Wireshark picks up on from DNS packets it decodes
- the "user hosts file" (~/.wireshark/hosts on *NIX)
- what Wireshark reads out of capture file (the PCAPNG name resolution block)

This new preference defaults to "use external resolvers" for backward
compatibility (so people turning on network name resolution will get the old
behavior).

This option can be set via Edit->Preferences and on the command line; there
remain several UIs (e.g., the "open capture file" dialog, the
View->Name Resolution menu, etc.) that don't have the new option yet.


Also expand on the "description" for the name resolution preferences: these
are used not only in the tooltips but are also written to the preferences
file.  The previous text didn't include enough context when written do the
preferences file.

svn path=/trunk/; revision=43605
2012-07-08 01:31:48 +00:00
Jakub Zawadzki 88cb14dda3 - remove no longer used #defines
- prefs.name_resolve_concurrency is now just 'name_resolve_concurrency'
- add notes about possible (?) integer overflows.

svn path=/trunk/; revision=43586
2012-07-06 07:55:58 +00:00
Jakub Zawadzki f31b3943c0 - e_addr_resolve is structure so pass it by pointer.
- name_resolve_concurrency must be only defined when used.

svn path=/trunk/; revision=43584
2012-07-06 07:34:08 +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 7f8d3e24e3 Add uint_get_manuf_name() and uint_get_manuf_name_if_known() routines,
which take an OUI, presumably fetched with a routine such as
tvb_get_ntoh24(), as an argument and attempt to look it up in the manuf
file.

Fix up the comments for all the get_manuf_name routines.

Get rid of "extern"s in definitions of functions (definitions, not
declarations).

svn path=/trunk/; revision=42054
2012-04-13 22:23:04 +00:00
Guy Harris 937e25c375 Attempt to squelch some compiler warnings.
svn path=/trunk/; revision=37678
2011-06-16 06:55:11 +00:00
Jeff Morriss da8ec2c2d6 Use proto_tree_add_item() instead of proto_tree_add_xxx() with a pointer into
the TVB.

Introduce and start using tvb_get_manuf_name() and tvb_get_manuf_name_if_known()
which do the same as the non-tvb versions but take a tvb and an offset instead
of (commonly) a pointer into a TVB.

svn path=/trunk/; revision=37317
2011-05-20 02:42:14 +00:00
Guy Harris f153eb070b Cast away some warnings about alignment; ep_alloc() guarantees
sufficient alignment for all types of data.

svn path=/trunk/; revision=37190
2011-05-16 21:42:49 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Jakub Zawadzki 453d0a8568 Introduce ip6_to_str_buf_len (little cleaner version of inet_ntop6 from wsutil/inet_ntop.c)
and use it instead of inet_ntop(AF_INET6, ...)

- Add MAX_IP6_STR_LEN define.
- use MAX_IP6_STR_LEN as a buffer size when ip6_to_str_buf() is used.

svn path=/trunk/; revision=37000
2011-05-05 20:48:21 +00:00
Gerald Combs b223e99e5a get_host_ipaddr() was returning numeric addresses in host byte order
and hostnames in network byte order. Have it return everything in
network byte order.

svn path=/trunk/; revision=36873
2011-04-26 17:13:37 +00:00
Gerald Combs aa5349924a Minor whitespace fix.
svn path=/trunk/; revision=36536
2011-04-10 16:40:29 +00:00
Bill Meier ede51600c7 Don't assign to a variable if the value won't be used: Coverity 817-821.
svn path=/trunk/; revision=36446
2011-04-04 15:31:33 +00:00
Gerald Combs fcf51fc73b Add initial pcapng name resolution record support. Wireshark has read
support; TShark has read+write support. Additionally TShark can read a
"hosts" file and write those records to a capture file.

This uses "struct addrinfo" in many places and probably won't compile on
some platforms.

svn path=/trunk/; revision=36318
2011-03-24 22:47:57 +00:00
Guy Harris d36684f364 Can we reassure Microsoft's static analyzer that 0 <= mask <= 48?
svn path=/trunk/; revision=35977
2011-02-17 09:08:11 +00:00
Gerald Combs 7b254f46fb Fix some Visual C++ static analyzer complaints.
svn path=/trunk/; revision=35971
2011-02-17 01:11:05 +00:00
Jaap Keuter fe8f565a89 Fix fo bug 5616:
Remove the filters on IPv6 Link Local and Multicast addresses, since 
these _can_ be resolved through the hosts file and manual entry.

svn path=/trunk/; revision=35651
2011-01-25 22:11:59 +00:00
Jeff Morriss 7009bfc740 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4102 :
Limit the length of manuf names to 8 characters in make-manuf (this matches
the (old) limit in addr_resolv.c).

Dynamically allocate memory to store the manuf name in epan/addr_resolv.c so
that we don't end up corrupting the UTF-8 if/when we need to truncate the
string.

svn path=/trunk/; revision=35082
2010-11-30 22:28:34 +00:00
Bill Meier c78221d4ce Rename g_resolv_flags --> gbl_resolv_flags; Also: cleanup some whitespace & indentation.
svn path=/trunk/; revision=34487
2010-10-12 13:15:08 +00:00
Gerald Combs a0b284c5db Add more information to the Info column for some ICMPv6 messages. Add a
small comment to addr_resolv.c.

svn path=/trunk/; revision=34384
2010-10-05 17:57:23 +00:00
Stig Bjørlykke 6f5b3e381c Make it compile without HAVE_C_ARES and HAVE_GETHOSTBYNAME2.
svn path=/trunk/; revision=33742
2010-08-09 11:19:15 +00:00
Bill Meier f1c540a54c Rework ethernet address resolution: step 3 of 3:
- Primarily: ethernet name lookup returns either
   unresolved or resolved ethernet name depending upon whether 
   MAC Name resolution is disabled or enabled.
   Previously: Unresolved or resolved name cached at first reference
   and then always returned for future references no matter whether
   MAC Name Resolution was enabled or disabled. 
- Also: Refactor ethernet, manuf & well-known-addr related code;

ToDo: (separately): Redisplay when 'MAC name resolution' enabled/disabled. 

svn path=/trunk/; revision=33401
2010-07-01 15:11:02 +00:00
Bill Meier 14a209b03a Rework ethernet address resolution: step 2:
- Use a new hashwka_t struct (instead of hashether_t) for 
   "well-known-address" hash entries (saves some space);
- Remove unused variable from hashether_t;
- Reorder variables within hashether_t and hashmanuf_t to minimize padding in the structures;
- Rename some variables for clarity;
- Misc whitespace changes.

svn path=/trunk/; revision=33364
2010-06-29 02:53:17 +00:00
Bill Meier 0a785ddea8 (Trivial): Whitespace revisions.
svn path=/trunk/; revision=33360
2010-06-28 22:43:13 +00:00
Bill Meier 3af757c875 Rework ethernet address resolution: step 1: simplify 'get_ether_name_if_known()'
svn path=/trunk/; revision=33359
2010-06-28 22:29:49 +00:00
Jeff Morriss 47e2d75820 Move some code (including the optional objects) into libwsutil
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Stig Bjørlykke eb279458fa Rewrite: strcpy -> g_strlcpy.
svn path=/trunk/; revision=32637
2010-05-02 20:21:39 +00:00
Jeff Morriss 0791f7beb8 Make the indentation consistent.
svn path=/trunk/; revision=32601
2010-04-29 18:17:29 +00:00
Bill Meier d99e90b2e2 Fix a gcc -Wshadow warning; Fix a comment;
Use consistent indentation.

svn path=/trunk/; revision=32581
2010-04-27 22:46:39 +00:00
Stig Bjørlykke 32ce531601 Added Manual IP address resolve functions.
This can later be extended with ethernet and probably other addresses.

svn path=/trunk/; revision=32571
2010-04-27 06:51:16 +00:00
Bill Meier 6812b68eb1 From Yaniv Kaul: constify parameters
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-03 18:18:50 +00:00
Bill Meier d32b4c0758 Revert SVN #32360 until Windows compilation errors corrected.
svn path=/trunk/; revision=32361
2010-04-02 15:18:03 +00:00
Bill Meier 049f9eac85 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

svn path=/trunk/; revision=32360
2010-04-02 14:37:49 +00:00
Anders Broman 4e66c899d1 From Jakub Zawadzki:
Optimizations.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4303

svn path=/trunk/; revision=31967
2010-02-23 19:28:38 +00:00
Bill Meier 21179f68bd Fix gcc -Wshadow warnings.
svn path=/trunk/; revision=31717
2010-01-28 16:03:03 +00:00
Gerald Combs fadae76f0c Fix a potential compilation problem with older versions of c-ares.
svn path=/trunk/; revision=31579
2010-01-19 23:18:23 +00:00
Gerald Combs ad69bdd7ea Have get_host_ipaddr and get_host_ipaddr6 return FALSE if network name
resolution is disabled. Fix some indentation.

svn path=/trunk/; revision=31361
2009-12-24 17:21:02 +00:00
Gerald Combs b7702fd6d7 If we're using c-ares, have get_host_ipaddr and get_host_ipaddr6 time
out after 250ms. This should fix the annoying freeze in bug 658.

svn path=/trunk/; revision=31360
2009-12-24 00:58:31 +00:00
Gerald Combs 4f30c2170e Change host_name_lookup_process to return TRUE if anything new has been
resolved since the last time it was called. Use this to redraw the packet
list and detail any time we have newly-resolved objects.

svn path=/trunk/; revision=31350
2009-12-22 20:01:06 +00:00
Jaap Keuter a529270519 Let c-ares actually resolve IPv6 addresses.
svn path=/trunk/; revision=31181
2009-12-06 08:45:52 +00:00
Jaap Keuter b30247cccb Prepare for c-ares 1.6.1 release.
svn path=/trunk/; revision=30773
2009-10-30 21:57:43 +00:00
Kovarththanan Rajaratnam f48e1b1574 Add null pointer guard
svn path=/trunk/; revision=30340
2009-10-05 18:12:16 +00:00
Stig Bjørlykke a1aee8c660 Put caqm inside INET6 guard in host_lookup6().
Removed unused functions:
- get_hostip()
- get_hostip6()
- name_resolution_changed()
- get_ether_hexa()

svn path=/trunk/; revision=30190
2009-09-29 09:49:43 +00:00
Anders Broman b61ea82d55 From Didier Gautheron:
optimizations patch http://wiki.wireshark.org/Development/Optimization
'patch.29854.diff.gz"

Clean up addr_resolv.c

svn path=/trunk/; revision=29880
2009-09-13 17:24:51 +00:00
Kovarththanan Rajaratnam c629dde8b6 Constify some functions
svn path=/trunk/; revision=29773
2009-09-07 16:17:58 +00:00
Kovarththanan Rajaratnam 98d18343c8 Whitespace changes
svn path=/trunk/; revision=29772
2009-09-07 16:07:04 +00:00
Kovarththanan Rajaratnam 72c9662da6 ntroduce some seasonal address name lookup functions which we use when NEW_PACKET_LIST is defined. This change partially reverts some parts of r29768, which didn't seem to work because it assumed that get_addr_name() would always return a seasonal string. This wasn't the case if the adddress type was AT_STRINGZ.
svn path=/trunk/; revision=29771
2009-09-07 16:05:37 +00:00
Kovarththanan Rajaratnam ea0ab046e0 Tigthen scope of local variables
svn path=/trunk/; revision=29770
2009-09-07 15:49:14 +00:00
Anders Broman 3abd049a9b Use constant strings for Addresses saves some memory.
svn path=/trunk/; revision=29768
2009-09-07 14:03:05 +00:00
Anders Broman a4ce0d3d69 Put back
http://anonsvn.wireshark.org/viewvc?view=rev&revision=29656
http://anonsvn.wireshark.org/viewvc?view=rev&revision=29658
http://anonsvn.wireshark.org/viewvc?view=rev&revision=29661
Reverted by my previous checkin.

svn path=/trunk/; revision=29749
2009-09-06 14:53:21 +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
Anders Broman 137b886960 From Didier Gautheron:
Extracted from optimizations patch http://wiki.wireshark.org/Development/Optimization
Optimize address handling.
The address hash should be possible to use from the new_packet_list.

svn path=/trunk/; revision=29735
2009-09-06 08:59:30 +00:00
Anders Broman f0ea776605 From : Didier Gautheron
Addresse hash is slow on little endian CPU.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3973

svn path=/trunk/; revision=29692
2009-09-04 10:53:37 +00:00
Guy Harris 5dd678f0a7 Check whether "size" points to something positive, not whether "size"
itself is positive (which makes no sense for a pointer).

svn path=/trunk/; revision=29661
2009-09-01 19:31:41 +00:00
Kovarththanan Rajaratnam f8f4f0fb6b Remove superfluous NULL pointer checks wrt. g_malloc() and g_realloc()
svn path=/trunk/; revision=29658
2009-09-01 18:44:08 +00:00
Kovarththanan Rajaratnam 17f010119a From Jakub Zawadzki via. Bug 3330:
* Fix memleak (df->deprecated in dfilter_free())
* Free protocol hash tables on cleanup.
* Free protocols list on cleanup.
* Free memory allocated by fgetline() in parse_services_file()

From me:

* proto.c: set gmc_hfinfo to NULL after free
* proto.c: switch order of g_free() and g_list_remove() in proto_cleanup()

svn path=/trunk/; revision=29656
2009-09-01 18:16:55 +00:00
Anders Broman 3278582767 From Kovarththanan Rajaratnam:
Optimize column fill path.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3701

svn path=/trunk/; revision=29130
2009-07-17 08:24:06 +00:00
Stig Bjørlykke e03ac6b82e From Kovarththanan Rajaratnam via bug 3555:
Cancel hostname lookup timers if c-ares is not initialized.

svn path=/trunk/; revision=28837
2009-06-24 19:10:50 +00:00
Gerald Combs 9c5ca83acf Only #undef inet_aton if we're using ADNS on Windows.
svn path=/trunk/; revision=27920
2009-04-01 00:30:45 +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
Gerald Combs f5ee6caa67 From Frederic Leroy: Update c-ares version handling.
svn path=/trunk/; revision=27169
2009-01-06 18:31:57 +00:00
Gerald Combs dc3ed1f1e6 C-ares version check fix from Frederic Leroy, modified by me.
svn path=/trunk/; revision=27112
2008-12-24 18:12:07 +00:00
Gerald Combs 8f375871c1 Allow compilation with c-ares <= 1.4.0 (untested). While we're at it, fix
c-ares name resolution.

svn path=/trunk/; revision=27096
2008-12-23 18:15:09 +00:00
Jörg Mayer 4149a23cc5 Trivial warning fixes
svn path=/trunk/; revision=26899
2008-12-02 08:11:23 +00:00
Stig Bjørlykke 0a66244589 Do not leak the port range in parse_service_line().
svn path=/trunk/; revision=26240
2008-09-20 14:24:29 +00:00
Stig Bjørlykke a7e6165f15 Avoid an indefinite loop freeing the same data over and over again
in host_name_lookup_cleanup() when HAVE_C_ARES.

svn path=/trunk/; revision=25989
2008-08-12 16:47:54 +00:00
Gerald Combs 5906f69b88 On Windows, if we're running anything but plain Visual C++ 6 (including
VC6 plus a platform SDK), set INET6. Use that to figure out if we need
to define socklen_t for c-ares. This should fix bug 2797.

svn path=/trunk/; revision=25985
2008-08-11 21:59:59 +00:00
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