aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nbns.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.wmeier1-4/+4
Also: remove trailing whitespace for a number of files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39503 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-6/+6
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39328 f5534014-38df-0310-8fa8-9805f1628bb7
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵wmeier1-3/+3
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39288 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-19Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.wmeier1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37716 f5534014-38df-0310-8fa8-9805f1628bb7
2011-03-04From Stefan Metzmacher: Patch that fixes false positives and allows large ↵wmeier1-10/+22
smb1/2 pdus https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4914 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36140 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-26Minor changs to NetBIOS Session Service code:sfisher1-10/+5
- Simplify a proto_tree_add_uint() call into proto_tree_add_item() - Mention RFC 1002 in comment above message type definitions - Expand field descriptions for length field git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35668 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-21Introduce, and start using, tvb_eth_to_str().morriss1-1/+1
Export tvb_*_to_str() and put them in alphabetical order. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35602 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-14Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().morriss1-3/+3
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s. Replace some memcpy()+tvb_get_ptr() with tvb_memcpy(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35529 f5534014-38df-0310-8fa8-9805f1628bb7
2010-12-20Rename the routines that handle dissector tables with unsigned integerguy1-5/+5
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35224 f5534014-38df-0310-8fa8-9805f1628bb7
2010-11-02Removed call to proto_item_set_len() for SESSION_MESSAGE case. Protect somecmaynard1-4/+6
other of these calls with "if (ti != NULL)". Fixes bug 5289. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34755 f5534014-38df-0310-8fa8-9805f1628bb7
2010-10-08Restore pinfo->private_data after an exception was thrown by a subdissector.morriss1-30/+30
This is necessary in case a subdissector had changed it but was unable to restore it (due to the exception). Remove check_col(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34436 f5534014-38df-0310-8fa8-9805f1628bb7
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.morriss1-12/+12
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34227 f5534014-38df-0310-8fa8-9805f1628bb7
2010-07-06From Frank Schorr:etxrab1-0/+10
The packet-nbns.c dissector picks random data as the NBSS PDU length in certain situations. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4914 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33445 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-25From H.sivank: GtkOSXApplication support.guy1-2/+2
Call the various flavors of OS X integration just "OS X integration", not anything with "IGE" in it - it appears that, in some places, "ige-mac-integration" refers only to the older Carbon-based functions, although the library still appears to be called -ligemacintegration. Update the URLs for the information about the OS X integration libraries. Clean up help message for --with-pcap-remote. Clean up white space a bit. Speaking of white space, it's "Mac OS X", not "MacOS X". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32941 f5534014-38df-0310-8fa8-9805f1628bb7
2010-04-03Remove unneeded #include <stdio.h>wmeier1-1/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32367 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-18Fix some gcc -Wshadow warnings ....wmeier1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31559 f5534014-38df-0310-8fa8-9805f1628bb7
2009-11-20Print adjusted length.stig1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31031 f5534014-38df-0310-8fa8-9805f1628bb7
2009-11-20Added nbss.length.stig1-3/+13
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31030 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()krj1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29446 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_clear with col_checkkrj1-6/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29344 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_INFO) with col_checkkrj1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29342 f5534014-38df-0310-8fa8-9805f1628bb7
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkkrj1-6/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29340 f5534014-38df-0310-8fa8-9805f1628bb7
2009-06-18From Kovarththanan Rajaratnam via bug 3548:stig1-2/+2
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28770 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-07Use some default true_false_string's.wmeier1-7/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27983 f5534014-38df-0310-8fa8-9805f1628bb7
2009-04-06More size_t fixes.gerald1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27976 f5534014-38df-0310-8fa8-9805f1628bb7
2009-03-23Fixed some data types to remove some warnings in the solaris build.stig1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27825 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31Fix some "format not a string literal and no format arguments" warnings.stig1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26647 f5534014-38df-0310-8fa8-9805f1628bb7
2008-08-11From Roy Marples (bug 2781 and bug 2796):stig1-1/+2
Display FQDN binary encoded name as text Ensure that get_dns_name does not cross packet sub boundry From me: Preserve the usage of bootp.fqdn.name as a display filter git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25981 f5534014-38df-0310-8fa8-9805f1628bb7
2008-06-25Constify a bunch of stuff, to squelch -Wwrite-strings warnings. guy1-4/+6
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25601 f5534014-38df-0310-8fa8-9805f1628bb7
2008-03-01Rewrote to use g_strlcpy and g_strlcat.stig1-18/+17
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24525 f5534014-38df-0310-8fa8-9805f1628bb7
2008-02-02Rewrote some prohibited APIs in epan/dissectors/ (sprintf, strcpy, strcat).stig1-18/+21
If we get some truncated strings we probably overwrote some buffers... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@24249 f5534014-38df-0310-8fa8-9805f1628bb7
2007-10-23Apply the small performance enhancment patches for:etxrab1-2/+2
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23252 f5534014-38df-0310-8fa8-9805f1628bb7
2007-04-23Add some GCC warnings to the standard set, and add some others to theguy1-2/+3
--enable-extra-gcc-checks set. If we turn on -pedantic, try turning on -Wno-long-long as well, so that it's not *so* pedantic that it rejects the 64-bit integral data types that we explicitly require. Constify a bunch of stuff, and make some other changes, to get rid of warnings. Clean up some indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21526 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-23fix a lot more warningsulfl1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21142 f5534014-38df-0310-8fa8-9805f1628bb7
2007-03-22Sebastien Tandel:jmayer1-0/+4
some warning fixes packet-http.c set headers.content_length = 0 before the first potential use of it. packet-kink.c "ifdef kerberos" around one function declaration packet-nbns.c set headers.{dgm_length|pkt_offset|error_code} = 0 packet-pflog.c delete capture_pflog and capture_old_pflog which aren't used anymore in the code. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21120 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21change a whole bunch of ethereal into wiresharksahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18196 f5534014-38df-0310-8fa8-9805f1628bb7
2006-03-20waste a couple of bytes per tcp conversation and make the tree for ↵sahlberg1-1/+1
acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global. while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite tcp analysis might actually work and work well even for tcp over tcp tunnelling. this also means that if you include packet-tcp.h you also need to include emem.h . git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17681 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-22"size_t" can be "unsigned int" or "unsigned long", so cast it toguy1-2/+2
"unsigned long" and print it with %lu. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17076 f5534014-38df-0310-8fa8-9805f1628bb7
2006-01-20packet-bgp.c: Fix incorrect use of g_snprintf return valuejmayer1-19/+18
mp_addr_to_str was unnecessary 'complex' - simplified it packet-dns.c: Fix incorrect use of g_snprintf return value packet-dcm.c: Fix incorrect use of g_snprintf return value Someone who understands the protocol should look at the "vr, tr might be used uninitialized..." warning. packet-x11.c: Fix incorrect use of g_snprintf return value packet-kerberos.c: Fix incorrect use of g_snprintf return value Someone should take a look at the "longjump might clobber ..." messages packet-diameter.c: Fix incorrect use of g_snprintf return value Get rid of unsigned < 0 check packet-pgm.c: Fix incorrect use of g_snprintf return value packet-nbns.c: Fix incorrect use of g_snprintf return value packet-winsrepl.c: Collateral damage to packet-nbns.c fix packet-netbios.c: Collateral damage to packet-nbns.c fix packet-netbios.h: Collateral damage to packet-nbns.c fix packet-kerberos.c: Collateral damage to packet-nbns.c fix packet-nbipx.c: Collateral damage to packet-nbns.c fix git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17065 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-27remove some strcpysahlberg1-14/+12
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16341 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-08improve get_dns_name now that we have cheap emem allocated bufferssahlberg1-3/+1
and get rid of a few strcpy() a whole lot of arrays from the stack and make the function prototype slightly nicer. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16166 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-21Fix a comment.guy1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15915 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-11Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,guy1-1/+1
and that extract IPv6 addresses into a "struct e_in6_addr", with tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we remove, by using proto_tree_add_item(), rather than replacing. Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct e_in6_addr" (not necessary to declare the tvbuff routines, but including it there means "struct e_in6_addr" is guaranteed to be defined before those declarations, so we don't get compiler complaints if we define it *after* those declarations). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15758 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-27remove the last remaining sprintf in epan/dissectorssahlberg1-25/+46
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15559 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-27remove one sprintfsahlberg1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15555 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-25when tracking PDU bondaries, only do this IFFsahlberg1-1/+8
the next few bytes match an SMB header. 1, SMB is the only important protocol transported atop NBSS 2, if we miss the first packets of a PDU, we DONT! want nbns to suddenly think there are Xmegabytes until the end of it and thus prevent any real PDUs from being dissected. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15527 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-30More char -> const char fixesjmayer1-5/+5
Declare some functions static git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15158 f5534014-38df-0310-8fa8-9805f1628bb7
2005-06-26Get rid of the private "my_match_strval()" routine in many dissectors;guy1-1/+1
add a "match_strval_idx()" routine that does the same thing, and have "match_strval()" call it. Make those routines, and "val_to_str()", return a "const" pointer. Update dissectors as necessary to squelch compiler warnings produced by that. Use "val_to_str()" rather than using "match_strval()" and then, if the result is null, substituting a specific string. Clean up some other "match_strval()"/"val_to_str()" usages. Add a null pointer check in the NDPS dissector's "attribute_value()" routine, as it's not clear that "global_attribute_name" won't be null at that point. Make some global variables in the AFS4INT dissector local. Make some routines not used outside the module they're in static. Make some tables "static const". Clean up white space. Fix Gerald's address in some files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14786 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-02Unlike the detailed description of resource record types, theguy1-7/+4
detailed description of classes is pretty much redundant - remove it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12925 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-26From Luis Ontanon: add more filterable fields to DNS, PGM, GTP, and RADIUS.guy1-7/+32
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12835 f5534014-38df-0310-8fa8-9805f1628bb7