Commit Graph

128 Commits

Author SHA1 Message Date
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