Commit Graph

11 Commits

Author SHA1 Message Date
Guy Harris 857318d3b7 Use "tvb_get_string()" instead of allocating a (len+1)-sized buffer,
"tvb_memcpy()"ing to it, and putting in a null terminator;
"tvb_get_string()" will check whether all bytes of the string are
present before allocating the buffer, so that you don't leak memory if
the copy throws an exception, and don't crash if the length is absurdly
large.

Use "tvb_memdup()" instead of allocating a buffer and "tvb_memcpy()"ing
to it, so that an exception is thrown before you try to allocate the
buffer (for the same reasons as listed above).

Before allocating a buffer used when processing a chunk of data from a
packet, get a pointer to the chunk with "tvb_get_ptr()", or check that
the data is all there with "tvb_ensure_bytes_exist()", so that an
exception is thrown before you try to allocate the buffer (for the same
reasons as listed above).

Fix up the lengths of the tvbuff used when dissecting ONC RPC opaque data
with a particular dissector.

svn path=/trunk/; revision=10236
2004-02-25 09:31:07 +00:00
Guy Harris b024612ad9 From Shinsuke Suzuki:
- updated the IETF spec names
	- changed Prefix-Delegation related DHCPv6 option
	  numbers from temporary one to the official one
	- fixed typo in DHCPv6 message type

svn path=/trunk/; revision=9901
2004-01-29 03:46:36 +00:00
Guy Harris 406401ce6d From Shinsuke Suzuki:
- support RFC3319
        - update the RFC/i-d name
        - change the DHCPv6 option numbers to catch up with the
          latest IANA's assignment status

svn path=/trunk/; revision=8727
2003-10-17 21:26:56 +00:00
Guy Harris 908dcdf491 From Tony Lindstrom: updates of DHCPV6 dissector to
draft-ietf-dhc-dhcpv6-28,
draft-ietf-dhc-dhcpv6-opt-prefix-delegation-04, and
draft-ietf-dhc-dhcpv6-opt-dnsconfig-03, and addition of NIS and time
configuration option drafts draft-ietf-dhc-dhcpv6-opt-nisconfig-02 and
draft-ietf-dhc-dhcpv6-opt-timeconfig-02.

svn path=/trunk/; revision=8182
2003-08-18 18:20:11 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris ee134d225f From Tsutomu Mieno and Yasuhiro Shirasaki: update the DHCPv6 support to
match the following latest drafts:
  o draft-ietf-dhc-dhcpv6-26.txt
  o draft-troan-dhcpv6-opt-prefix-delegation-01.txt
  o draft-ietf-dhc-dhcpv6-opt-dnsconfig-02.txt

svn path=/trunk/; revision=5765
2002-06-26 01:24:43 +00:00
Guy Harris eb2d6593dc Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls
that add FT_NONE or FT_PROTO items to the protocol tree, with -1.

Replace some calls to "tvb_length()" or "tvb_length_remaining()" with
calls to "tvb_reported_length()" and "tvb_reported_length_remaining()",
as those give the actual length of the data in the packet, not just the
data that happened to be captured.

svn path=/trunk/; revision=4605
2002-01-24 09:20:54 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 51cb58401f "void" values cannot be returned, even by a "void" function.
The "downstream" flag is a Boolean; treat it as such.

svn path=/trunk/; revision=4528
2002-01-11 11:07:21 +00:00
Jun-ichiro itojun Hagino 7cfaf110e6 DHCPv6 dissector, based on draft-ietf-dhc-dhcpv6-22.txt.
note that protocol constants are subject to change.
(packet format is also subject to change.  but 22 draft should go
to wg last call very soon, and I really hope it to be the final one...)

svn path=/trunk/; revision=4504
2002-01-09 02:51:46 +00:00