even if it doesn't have "gzgets()", so one might think we could use it
by using our own replacement for "gzgets()".
One would be wrong to think so, however, as the "gzseek()" it has
doesn't actually work when reading uncompressed files.
zlib 1.0.9 has "gzgets()", and fixes that bug, so we rever to checking
for "gzgets()" rather than "gzseek()", so that we don't accept pre-1.0.9
versions of zlib, and we get rid of our "gzgets()" replacement.
svn path=/trunk/; revision=4702
the count fields in SAMR replies aren't array max_count values,
so don't display them as such;
Put conformant and conformant varying array length/offset/etc.
values into the protocol tree.
svn path=/trunk/; revision=4701
function that computes the natural logarithm of a double. Using it as
the name of a pointer to a routine to do logging can cause namespace
collisions; in fact, it *does* cause them on AIX. Rename the function
argument to "logfunc".
svn path=/trunk/; revision=4700
typedef for "struct _value_string"; as such, the incomplete structure
declaration in "epan/proto.h" should declare "struct _value_string", not
"struct value_string", and casts and declarations in that header should
also use "struct _value_string", not "struct value_string".
svn path=/trunk/; revision=4699
use value_string tables and make numerical fields numeric,
with associated value_string tables, rather than strings;
make a signed integer field signed, which means we don't have to
format the item for it in the protocol tree ourselves;
give it a long protocol name, and make the short protocol name
all-caps, as with other short protocol names.
svn path=/trunk/; revision=4696
(i.e., the byte of the IP header containing the IP version number) to
see which it is, and handle the packet either as IPv4, IPv6, or "other"
based on the IP version number.
The "if" chain for handling various packet types using DLT_RAW doesn't
need returns after every clause; it should just return after falling off
the end (and shouldn't call "g_assert_not_reached()" once we do that).
svn path=/trunk/; revision=4695
reassembled TCP data being able to indicate that they need still more
reassembly, so that, for example, a dissector can indicate that it needs
reassembly in order to dissect a header that says how long the PDU is
and, when that reassembly is done and it dissects the header, it can
then indicate that it needs more reassembly to get the entire PDU.
svn path=/trunk/; revision=4694
report the error but don't re-throw the exception; that way, we can
continue to dissect additional NDMP messages in the frame or reassembled
chunk of data, even if one of them happens to be too short for what's in
it.
svn path=/trunk/; revision=4692
"format_text()" to display them, so that the tabs show up as "\t". (We
eventually need to use that when displaying string fields - and arrange
that it properly handle the character set of the font being used for
display, in Ethereal, and the character set of the user's locale, in
Tethereal).
svn path=/trunk/; revision=4685
add a hidden "sctp.port" field, with two instances per protocol
tree, one with the source port and one with the destination
port (like "tcp.port" and "udp.port");
replace "sctp.checksum_correct" with "sctp.checksum_bad" (like
"tcp.checksum_bad" and "udp.checksum_bad").
svn path=/trunk/; revision=4682
check for GNU "sed", and skip the "bad sed" checks if it's
found;
check for "/bin/sed" as well as "/usr/bin/sed" on Solaris;
put the "sed" checks into a separate section of code with its
own test for the host OS, to make it a bit cleaner to add any
checks needed on other OSes.
svn path=/trunk/; revision=4681
a '<', regardless of whether it's followed by a digit; do the same.
Use "tvb_bytes_exist()" rather than "tvb_length_remaining()" in the loop
that scans those digits.
Use "tvb_ensure_length_remaining()" to get the length of the message, so
we throw an exception if we've gone past the end of the tvbuff.
svn path=/trunk/; revision=4674
scanning the tvbuff. Also use "tvb_offset_exists()" before accessing
the tvbuff in that loop; the loop is only building the Info column, so
it shouldn't throw an exception before building the list.
(XXX - it should arguably all be done in one loop, with the Info column
built on the fly.)
svn path=/trunk/; revision=4672
"msg_offset" rather than "offset" as the offset of the beginning of the
payload ("offset" is only advanced if "tree" is non-null, so it doesn't
necessarily point to the beginning of the payload).
Use -1 rather than "tvb_length_remaining()" as a length argument to
"tvb_find_guint8()" to get it to search to the end of the tvbuff, and,
before checking for the additional "\n\r\n" after a "\r", check whether
those 3 bytes are in the tvbuff.
svn path=/trunk/; revision=4671
dissector, it's looking for Q.931 encapsulated inside TPKT, so it
shouldn't check whether the first byte is NLPID_Q_931 or not, as it
*won't* be NLPID_Q_931, it'll be 3, for the TPKT version. It should
first check whether "is_tpkt()" thinks it's a TPKT packet, and then
check that the packet has at least 3 bytes past the TPKT header, then
check the first byte in the payload to see whether it's NLPID_Q_931. If
that all succeeds, treat it as Q.931 inside TPKT.
Make "is_tpkt()" return the length from the TPKT header on success, and
-1 on failure, and return the offset past the TPKT header via a pointer
(so clients don't have to know that the TPKT header is 4 bytes long).
svn path=/trunk/; revision=4669
arguments that specify the header field indices for the checksum field
and the "checksum is bad" Boolean, and have the dissectors for some
protocols that use IGMP (DVMRP, MRDISC, MSNIP) use it rather than having
their own checksumming routines.
Also, fix it to correctly add the "checksum is bad" Boolean.
svn path=/trunk/; revision=4665
the remaining data in a packet (and rather than "tvb_reported_length()",
which is wrong as it doesn't take the starting offset into account).
svn path=/trunk/; revision=4661
top-level protocol tree item.
Use "sizeof ip6_hdr" rather than "tvb_length_remaining(tvb, offset)"
when copying stuff into a "struct ip6_hdr" - if there's more than an
IPv6 header's worth of data remaining, we don't want to copy the stuff
past the end of the IPv6 header, and if there's less than that, we want
to throw an exception.
svn path=/trunk/; revision=4659
tvb_length_remaining() except that it throws BoundsError if 'offset'
is out-of-bounds.
Allow a length argument of -1 for FT_STRING and FT_BYTES fields
in proto_tree_add_item().
Change some dissectors to either use -1 for the length argument in
calls to proto_tree_add_item(), or call tvb_ensure_length_remaining()
instead of tvb_length_remaining(), or to check the return-value
of tvb_length_remaining(). Changes to more dissectors are necessary,
but will follow later.
svn path=/trunk/; revision=4656