Commit Graph

510 Commits

Author SHA1 Message Date
Gerald Combs 1d9b54fc07 Add support for asynchronous DNS updates using the GNU ADNS library.
Support can be enabled at configure time by using "--with-adns=DIR".
If support is enabled, async queries happen whenever host name resolution
is enabled.  Do we need a separate preference for async queries?

Currently, only IPv4 reverse queries are supported.  I can add IPv4 forward
lookup support, but I don't have any way to test IPv6 queries.

svn path=/trunk/; revision=7640
2003-05-04 18:50:56 +00:00
Guy Harris 5105311cb1 Add a note about the "val_to_string_repr" and "string_repr_len" for
ftypes, and how to add them to more types and use them in more places.

svn path=/trunk/; revision=7636
2003-05-03 01:11:29 +00:00
Guy Harris ca318813a4 Rename "proto_alloc_dfilter_string()" to
"proto_construct_dfilter_string()", to more accurately reflect what it
does.

Give it, and "proto_can_match_selected()", an "epan_dissect_t *"
argument, which replaces the raw data pointer argument to
"proto_construct_dfilter_string()".

For fields that don't have a type we can directly filter on, we don't
support filtering on the field as raw data if:

	the "epan_dissect_t *" argument is null;

	the data source tvbuff for the field isn't the tvbuff for the
	"epan_dissect_t" in question (i.e., it's in the result of a
	reassembly, and "frame[N:M]" can't get at it).

Trim the length the raw data in the case of such a field to the length
of the tvbuff for the "epan_dissect_t" in question, so we don't go past
it.  Fetch the raw data bytes to match from that tvbuff.

Have "proto_construct_dfilter_string()" return a null pointer if it
can't construct the filter string, and have "protocolinfo_packet()" in
the tap-protocolinfo tap ignore a field if
"proto_construct_dfilter_string()" can't construct a filter string for
it - and have it pass NULL as the "epan_dissect_t *", for now.  If
somebody decides it makes sense to dump out a "frame[N:M] =" value for
non-registered fields, it can be changed to pass "edt".

svn path=/trunk/; revision=7635
2003-05-03 00:48:37 +00:00
Guy Harris f9037afd44 From Matthijs Melchior: don't export functions also implemented as
macros, and do export "except_pop()" and "except_setup_try()".

svn path=/trunk/; revision=7628
2003-05-01 21:10:43 +00:00
Guy Harris 933fd3b12c From Lars Roland: set "patable.p_asn1_string_decode" to point to
"asn1_string_decode()", not to "asn1_octet_string_decode()".

svn path=/trunk/; revision=7624
2003-05-01 18:05:27 +00:00
Gerald Combs c5f6451d30 Bump the version number to 0.9.12. Make NEWS and ChangeLog current.
The next release will likely be tomorrow (May 1).

svn path=/trunk/; revision=7622
2003-05-01 03:09:54 +00:00
Guy Harris 0242a26c59 The typedefs in plugins/plugin_table.h must have "addr_" in front of the
function name; make it so.

Eliminate the duplicate entry for "except_throw" and the duplicate code
for it.

svn path=/trunk/; revision=7618
2003-04-30 23:40:43 +00:00
Guy Harris dcae08c20b From Matthijs Melchior: export the exception mechanism routines to
plugins on platforms on which plugins need to use the table of functions
exported to plugins.

svn path=/trunk/; revision=7611
2003-04-30 19:19:15 +00:00
Gerald Combs 0b9bbbbdb6 Modify tvb_get_nstringz*() to behave more like snprintf(). Make changes
where necessary to reflect the new behavior.

svn path=/trunk/; revision=7607
2003-04-30 02:35:28 +00:00
Guy Harris 1025817e84 Add a "proto_item_set_end()" routine that sets the length of an item
given a tvbuff/offset pair referring to the byte past the end of the
item.  Use it in one place in the SMB dissector (there are plenty of
other places where it could be used as well).

svn path=/trunk/; revision=7603
2003-04-29 21:27:19 +00:00
Gerald Combs b2f936ff24 Fix several buffer and integer overflow issues discovered by Timo Sirainen.
tvbuff.c:

  Lots of existing code assumes that you can safely do the following:

    #define MAX_BUF 64
    guint8 *buf[MAX_BUF];
    ...

    tvb_get_nstringz0 (tvb, offset, MAX_BUF, buf, &bytes_copied);

  In reality, tvb_get_nstringz*() can potentially write one byte past
  "buf".  Modify _tvb_get_nstringz() not to do that.

packet-ppp.c:

  Check for a valid BAP suboption length.

packet-mount.c:

  Fix a possible integer overflow in dissect_group().

svn path=/trunk/; revision=7590
2003-04-28 04:03:26 +00:00
Guy Harris 090a5aa24b From Matthijs Melchior: add the ASN.1 routines to the table of routines
exported to dissectors.

svn path=/trunk/; revision=7552
2003-04-24 21:15:13 +00:00
Ronnie Sahlberg cb5e97d49a Update to TCP to handle hints from dissectors where the next PDU may start.
ONCRPC dissector updated to provide hint to TCP where the next RPCoverTCP
PDU starts as example.
Trivial updates to the other TCP based protocols required to amke them handle
this as well.  See the updates to packet-rpc.c as an example.

This is enabled by activating tcp analysis and provides hints to TCP to know where PDUs starts when not aligned to the start of the segment.

svn path=/trunk/; revision=7543
2003-04-23 10:20:29 +00:00
Guy Harris 2678786425 Pull the stuff done in "dissect_packet()" to initialize a column_info
structure into its own routine; rename "col_init()" to "col_setup()",
and call the new routine "col_init()".

svn path=/trunk/; revision=7467
2003-04-16 05:55:41 +00:00
Guy Harris 24ec2110d1 Add the notion of a "fence" to columns. A dissector can set the fence
to "protect" what's currently in the column, so that attempts to clear
the column will only clear stuff after the fence and attempts to
overwrite the column will append stuff after the fence.  This, for
example, allows a dissector to arrange that the Info column contain
information for its protocol and for protocols running atop it.

svn path=/trunk/; revision=7466
2003-04-16 04:52:55 +00:00
Guy Harris d3daad1bec Add "proto_tree_add_none_format()" to the set of functions exported to
plugins.

svn path=/trunk/; revision=7423
2003-04-08 17:20:05 +00:00
Guy Harris 9f3902270e Put in a comment about the "to what code does the configuration file
directory belong" issue.

svn path=/trunk/; revision=7370
2003-03-26 00:34:27 +00:00
Guy Harris 4fb9c1866b Fix up a comment.
svn path=/trunk/; revision=7369
2003-03-25 23:46:04 +00:00
Guy Harris 97f273f044 Use "datafiledir" rather than "DATAFILE_DIR" as the name of the variable
in the configure script for the all-variables-expanded version of the
data file directory.

Don't AC_SUBST "DATAFILE_DIR", as it's not used.

Define DATAFILE_DIR in config.h as the all-variables-expanded version of
$datadir/ethereal, as that's where the global configuration files such
as manuf and the Diameter files are actually installed.

svn path=/trunk/; revision=7368
2003-03-25 23:37:54 +00:00
Gerald Combs 656eb2b35c Bump the version to 0.9.11. Let's hope the goat's blood and hastily carved
idol is enough for the CVS gods.

svn path=/trunk/; revision=7337
2003-03-11 00:12:39 +00:00
Ronnie Sahlberg e00fb8c413 From Lars Ronald :
MGCP request/response matching and
MGCPSTAT RTT calculation.

For those with MGCP captures, try
-z mgcp,rtd[,filter]

svn path=/trunk/; revision=7294
2003-03-06 09:01:47 +00:00
Gerald Combs fbd2efeccc Bump the version to 0.9.10.
svn path=/trunk/; revision=7271
2003-03-04 03:56:33 +00:00
Guy Harris 14b5b9e3a9 Completely initialize all the address fields in a packet_info structure,
setting the length to 0 and the data pointer to a null pointer.

svn path=/trunk/; revision=7239
2003-03-01 09:38:41 +00:00
Guy Harris 5e665db815 Assume all AT_NONE addresses are the same, as they have no address data
to compare; based on a change from Laurent Meyer.

svn path=/trunk/; revision=7222
2003-02-28 20:30:06 +00:00
Guy Harris 959282506a Fixes for a couple of problems, from Albert Chin:
1. On Solaris, inet_ntop and inet_pton need to be linked against
   -lnsl. AC_CHECK_FUNC() isn't good enough unless LIBS already
   has -lnsl.
2. On IRIX, the blanket redefinition of the inet_ntop function
   prototype is incorrect (compiling with MIPSpro 7.4):
     cc-1143 cc: ERROR File = inet_v6defs.h, Line = 32
       Declaration is incompatible with
               "const char *inet_ntop(int, const void *, char *, socklen_t)"
               (declared at line 89 of "/usr/include/arpa/inet.h").

       extern const char *inet_ntop(int af, const void *src, char *dst,
                     ^

     1 error detected in the compilation of "inet_pton.c".
     gmake[4]: *** [inet_pton.o] Error 2

   On IRIX, the correct prototype is:
     extern const char *inet_ntop(int, const void *, char *, socklen_t);

   Rather than blindly replacing the prototype we detect if a
   prototype exists and define it only if one does not exist.

svn path=/trunk/; revision=7218
2003-02-28 05:09:50 +00:00
Guy Harris 4156806b8b From Didier Gautheron: provide a mechanism to indicate why reassembly
wasn't done, and, for TCP, use that mechanism if reassembly isn't done
is an incorrect TCP checksum.

svn path=/trunk/; revision=7212
2003-02-27 03:56:48 +00:00
Guy Harris 4632490ab1 From Pavel Roskin:
Get rid of acconfig.h, as it's an archaism; put descriptions
	into AC_DEFINE instead.  That squelches some warnings from
	later versions of autoconf.

	Fix an unquoted call to AC_MSG_ERROR.

	Move the stuff to define HAVE_SOME_SNMP into configure.in.

svn path=/trunk/; revision=7203
2003-02-26 20:08:33 +00:00
Guy Harris e345e5640e Rename "fake_unicode()" to "tvb_fake_unicode()" as it works on a tvbuff,
give it a byte-order argument, and move it to "epan/tvbuff.c".

Use it to handle UCS-2 strings in version 1 of the Service Location
Protocol.  In SRVLOC V1, use registered fields that are already there
for SRVLOC V2, and add some as needed.  Fix some field names.

svn path=/trunk/; revision=7186
2003-02-24 01:22:30 +00:00
Guy Harris 6c99ee4db0 Make the argument to "abs_time_secs_to_str()" a "time_t" - it's in ANSI
C, and it's the right thing to pass to "localtime()".

svn path=/trunk/; revision=7125
2003-02-12 00:44:04 +00:00
Guy Harris 1ad3b70b4b Add a "abs_time_secs_to_str()" routine that takes a UNIX time-since-the-
epoch-in-seconds value and converts it to a string.

Use that routine in the RADIUS dissector, rather than using "ctime()"
and "tzname[]" - "tzname[]" strings might contain non-ASCII characters,
which currently give the GTK+ 1.3[.x] used on Windows, and also, I
think, GTK+ 2.x, heartburn, as they expect UTF-8, not, for example, ISO
8859/1.

Fix the string length in "abs_time_to_str()".

svn path=/trunk/; revision=7124
2003-02-11 19:42:38 +00:00
Gilbert Ramirez 9615c4ef25 Provide a way for ftype modules to provide a string representation
of their value. Provide such a method for FT_BYTES, FT_UINT_BYTES,
and FT_ETHER. Have proto_alloc_dfilter_string() use the new methods.

This is part of a movement of ftype-related code out of proto.c and
into the ftype code. The immediate effect is that generated display
filters for long byte sequences don't incorrectly have trailing periods
("...") to indicate continuation.

svn path=/trunk/; revision=7100
2003-02-08 04:22:37 +00:00
Guy Harris ab552d3746 Get rid of BASE_BIN - it's just the same as BASE_DEC, but people seemed
to be using it for stuff that should be hex, and for stuff that should
be Boolean.  Use BASE_DEC if it should be decimal, BASE_HEX if it should
be hex, and make it Boolean if it should be Boolean.

svn path=/trunk/; revision=7053
2003-01-31 03:17:56 +00:00
Jörg Mayer 758685ca0d AC_ARG_ENABLE takes 4 argument: The 3rd specifies what to do in case a
configure option is given on the command line. The value of the arguement
is passwd in the enableval variable. The 4th argument tells what to do in
case no command line argument was given.
This causes --disable-gtk2 (which is the default) to behave differently
from the case when no option is given.
I do not really understand where the difference in the behaviour of the
generated codes comes from, but I definitely see a difference.

Fixed all occurrences where the 3rd arguement was empty.

svn path=/trunk/; revision=7044
2003-01-30 10:20:47 +00:00
Guy Harris 5f09391096 Thou shalt not cast pointers of unknown alignment to pointers to
multi-byte integral quantities and blithely dereference them, lest thou
enrage those of us who work on machines that trap on unaligned
references.

svn path=/trunk/; revision=7021
2003-01-28 18:35:40 +00:00
Laurent Deniel 1a66f9aec9 Update my email address in various places since my old one no longer works
svn path=/trunk/; revision=7003
2003-01-26 19:35:31 +00:00
Guy Harris e120160577 From Dinesh Dutt:
- A new decoder called MDSHDR which decodes the internal header of the
      Cisco MDS switch (this is different from the Boardwalk header).
    - Support for some more new columns as part of FC support.
    - Fixed the decoding of the Special Frame in FCIP.
    - Fixed the decoding of credit management type field in FLOGI/PLOGI frame
      in FC-ELS.

svn path=/trunk/; revision=6974
2003-01-22 06:26:36 +00:00
Gerald Combs 21bb925496 Fix a typo.
svn path=/trunk/; revision=6956
2003-01-21 19:20:49 +00:00
Guy Harris f8fec006d1 From Brian Ginsbach: symbolic names for Fibre Channel Network Address
Authority identifiers.

svn path=/trunk/; revision=6954
2003-01-21 05:04:07 +00:00
Gerald Combs fe60d5b02e Bump the version to 0.9.9. Update the NEWS and ChangeLog files.
I'm shooting for a release on Wednesday evening.

svn path=/trunk/; revision=6952
2003-01-21 02:12:37 +00:00
Guy Harris 6c4a845613 Move into "call_dissector_work()" the stuff to handle dissecting, in
error packets, the copy of the packet that got the error, rather than
doing it in the CLNP dissector and the ICMP dissector and the ICMPv6
dissector and the PPP dissector for various control protocols; have it
do that work iff "pinfo->in_error_pkt" is set.

svn path=/trunk/; revision=6942
2003-01-20 05:42:37 +00:00
Guy Harris 9e144356f8 Use "plugindir", not "PLUGIN_DIR", as the variable name in the configure
script for the plugin directory; in most Makefile.am files it's set with

	plugindir = @plugindir@

(along the lines of what's done with other variables with pathnames -
the variable name is all lower case), so the variable needs to be named
"plugindir".

Fix the DOCSIS plugins' Makefile.am to use "plugindir".

Don't bother doing "AC_SUBST(PLUGIN_DIR)", as no Makefiles use
PLUGIN_DIR as an autoconf variable.

svn path=/trunk/; revision=6887
2003-01-09 23:50:55 +00:00
Jörg Mayer 87b638a94f pointer spells with an o
svn path=/trunk/; revision=6857
2003-01-06 19:08:37 +00:00
Ronnie Sahlberg a80ddab6fd Update DCERPC so that for (NTLMSSP) PDUs that have been decrypted
we also call the proper DCERPC subdissector.

With this change ethereal will call the SAMR dissector and dissect the
decrypted SAMR packets in devins capture.

svn path=/trunk/; revision=6855
2003-01-06 11:27:03 +00:00
Guy Harris 8d0aab0e78 From Ronald Henderson: make "format_text()", on Windows, escape all
characters that aren't printable ASCII, as GTK+ for Windows thinks
strings are UTF-8 but the strings we give it wouldn't be UTF-8.

svn path=/trunk/; revision=6832
2002-12-31 21:51:10 +00:00
Guy Harris 5eb1be46a7 From Ronald Henderson: fix up "snprintf()" and "vsnprintf()" calls in
"epan/proto.c" to properly handle string truncation (by checking both
for -1 and a value larger than the buffer size as an indication of
truncation, as some older versions of those routines return -1, and, if
the string was truncated, putting in a trailing '\0', as "snprintf()" on
some platforms might not put the trailing '\0' in).

svn path=/trunk/; revision=6830
2002-12-31 21:37:29 +00:00
Guy Harris a97b83a7f4 Add a new field type FT_FRAMENUM; an FT_FRAMENUM is a 32-bit unsigned
frame number, which is always decimal.  If you select an FT_FRAMENUM
field, there are menu items that let you go to the frame whose frame
number appears in that field.

Add FT_FRAMENUM fields for the ONC RPC "matching request is in this
frame" and "matching reply is in this frame" protocol tree items.

svn path=/trunk/; revision=6802
2002-12-19 02:58:53 +00:00
Guy Harris 8e1a648203 Fix the formal argument list to "bytestring_to_str()" to match the
changes to the actual argument lists in the calls (putting the byte
string length after the byte string pointer).

Make the byte string length actually be the length, not the length - 1.

Use a #define for the longest byte string it can handle, and put in a
"g_assert()" to check the sanity of that length.

svn path=/trunk/; revision=6774
2002-12-10 07:39:48 +00:00
Guy Harris 92d90f4f28 Add a new type of column for the circuit ID (Frame Relay DLCI, ISDN
channel number, X.25 logical channel number).

Clean up white space and the like, and get rid of unnecessary arguments
to "col_set_port()".

svn path=/trunk/; revision=6772
2002-12-10 01:17:21 +00:00
Guy Harris 644d19129a From Alfred Koebler: add support for a column for the interface and
direction in Firewall-1 monitor files.

svn path=/trunk/; revision=6771
2002-12-10 00:12:59 +00:00
Guy Harris bc06f2e440 Work around annoying Apple C compiler/linker bug.
"ether_to_str_punct()" no longer deals only with Ethernet-style
addresses, as it now takes a length argument, rename it
"bytestring_to_str()" - and make it static, as it's not used outside
"to_str.c".

Get rid of unused "fc_to_str_buf()" routine.

svn path=/trunk/; revision=6770
2002-12-09 21:34:58 +00:00