Commit Graph

4850 Commits

Author SHA1 Message Date
Guy Harris 709080b358 Update various README and INSTALL files to reflect the requirement for
UCD SNMP 4.2.2 or later if you want MIB-reading support.

svn path=/trunk/; revision=4926
2002-03-11 02:12:41 +00:00
Guy Harris bb172432d1 "format_var()" returns a "malloc()"ed string, not a "g_malloc()"ed
string; free it with "free()", not "g_free()".

svn path=/trunk/; revision=4925
2002-03-11 01:51:37 +00:00
Guy Harris 7e8c5a1741 If we're linking with the UCD SNMP library, make "format_oid()" append a
display of the symbolic form of the OID.  Remove code that used to do
that outside of "format_oid()".

Export "format_oid()" from "packet-snmp.c" and use it in
"packet-cops.c".

Remove support for CMU SNMP and older versions of UCD SNMP from
"packet-cops.c", as it has been removed from the rest of Ethereal.

svn path=/trunk/; revision=4924
2002-03-11 01:48:08 +00:00
Guy Harris 9f8d089e2e Put "extern" in front of the function declaration.
Update Gerald's e-mail address.

svn path=/trunk/; revision=4923
2002-03-11 01:42:58 +00:00
Guy Harris d9a00fc228 The "val_len" member of a "struct variable_list" should be set to the
length of the variable's value, in bytes, not the length of the BER
encoding of that variable's value.  The latter setting means it won't be
correct for object IDs.

svn path=/trunk/; revision=4922
2002-03-11 01:40:28 +00:00
Ronnie Sahlberg 81f29c2ce5 Final patch in preparing for NETLOGON dissector.
Exported some functions from packet-dcerpc-samr.c and added two
more functions the netlogon dissector will need.

svn path=/trunk/; revision=4921
2002-03-11 00:28:21 +00:00
Ronnie Sahlberg 7900235dad Move the STRING dissector to packet-dcerpc-nt.c and add one more parameter
to make it more similar to the UNICODE_STRING dissector.

svn path=/trunk/; revision=4920
2002-03-11 00:15:20 +00:00
Ronnie Sahlberg f060b0c68c Rename samr_dissect_LOGON_HOURS() to dissect_ndr_nt_LOGON_HOURS() and
export it to other modules.
NETLOGON dissector (and others) will need this function.

svn path=/trunk/; revision=4919
2002-03-11 00:00:15 +00:00
Ronnie Sahlberg 853654f2f3 Moved dissect_ndr_nt_NTTIME() from packet-dcerpc-samr.c to packet-dcerpc-nt.c
since this function will be used by other NT services as well such as NETLOGON.

svn path=/trunk/; revision=4918
2002-03-10 23:24:48 +00:00
Guy Harris 37dd5f340c Remove code to show the presence, and version number, of the CMU SNMP
library, as we no longer support linking with that library.

svn path=/trunk/; revision=4917
2002-03-10 23:19:44 +00:00
Guy Harris bdbb567087 Use "ds_set_int()", not "snmp_set_suffix_only()", to set the "print
suffixes only" setting.

svn path=/trunk/; revision=4916
2002-03-10 23:17:00 +00:00
Ronnie Sahlberg 024f90f4fe Absolute and Relative times were swapped. Also add comment that there seems
to be an unknown special time constant : 0x40000000 00000000 that we dont know
yet what it means.

svn path=/trunk/; revision=4915
2002-03-10 23:13:04 +00:00
Guy Harris d50103f67f Use the "sprint_realloc_" routines in UCD SNMP 4.2.2 and later, rather
than the "sprint_" routines in UCD and CMU SNMP; the latter routines
have no bounds checking, and if you use them you cannot protect against
buffer overflows.

As we now require UCD SNMP 4.2.2 or later:

	1) we no longer need code to support CMU SNMP;

	2) we no longer need code to work around problems with UCD SNMP
	   4.1.1;

and, as we no longer use the "sprint_" routines, we no longer need code
to work around the changed API and ABI of those routines in some
nonstandard versions of the UCD SNMP library.

svn path=/trunk/; revision=4914
2002-03-10 22:18:12 +00:00
Guy Harris ce5c18736d Don't use "proto_tree_add_string_format()" when
"proto_tree_add_string()" will suffice.

svn path=/trunk/; revision=4913
2002-03-10 22:04:25 +00:00
Guy Harris bf1c8de997 Use "dissect_ndr_nt_UNICODE_STRING_str()", not
"dissect_ndr_nt_UNICODE_STRING_string()", in
"samr_dissect_connect2_server()"; that eliminates an unnecessary extra
level of protocol tree.

That removes the last call to "dissect_ndr_nt_UNICODE_STRING_string()";
eliminate that routine.

In "dissect_ndr_nt_UNICODE_STRING()", initially create the subtree with
the name of the field as a string, so that if an exception is thrown
before the name is set, the subtree won't show up as blank when
displayed or printed.  Also pass in the name to "dissect_ndr_pointer()",
so the same happens for subtrees below it.  Append only the string data,
not its name, to items up the tree, as the name was put in when the item
was created.  Also, when adding a colon before the string, put a space
after the colon, as is done elsewhere in Ethereal.

When appending additional strings, put the blank before the new string,
not after it.

In "dissect_ndr_nt_STRING()", put the subtree into the string with the
name of the field, rather than just "String".  Pass in that name to
"dissect_ndr_pointer()", so subtrees below it get a name when they're
initially created.

Get rid of colons in the name string passed to "dissect_ndr_pointer()"
in some calls.  Supply a non-null name string in more calls to
"dissect_ndr_pointer()", and fix some calls to pass in the name of the
field being handed to "dissect_ndr_pointer()".

There's no need to fetch the entire "header_field_info" structure for a
protocol field in order to get the field's name - just use
"proto_registrar_get_name()" to get the name.

Use a length of -1, not 0, when creating a subtree whose length will be
set when the dissection of the items under the subtree is complete; that
way, if an exception is thrown while dissecting the items - which means
the item goes past the end of the tvbuff - the item will refer to all
data to the end of the tvbuff, rather than referring to nothing.

Fix a typo in the name of the "hf_samr_unknown_string" field.

svn path=/trunk/; revision=4912
2002-03-10 21:30:11 +00:00
Guy Harris 2223587585 Catch another "(NULL pointer)%s" we didn't catch with the previous
checkin.

svn path=/trunk/; revision=4911
2002-03-10 03:11:10 +00:00
Guy Harris b27f1ac14d Put a space between "(NULL pointer)" and the name of the item being
dissected, just as is done with "(duplicate PTR)".

svn path=/trunk/; revision=4910
2002-03-10 03:09:48 +00:00
Guy Harris dc2f822c01 Register the heuristic SMPP dissector with X.25.
svn path=/trunk/; revision=4909
2002-03-10 03:08:31 +00:00
Guy Harris 7d1dfae50d Initialize the "tm_isdst" field of a "struct tm" to -1 before passing it
to "mktime()".

svn path=/trunk/; revision=4908
2002-03-10 03:07:16 +00:00
Guy Harris c9c0a8373b Initialize the "tm_isdst" field of a "struct tm" to -1 before passing it
to "mktime()".

svn path=/trunk/; revision=4907
2002-03-10 01:02:06 +00:00
Guy Harris 9f6c9ba35b For Reverse ARP replies, the *target* hardware and protocol addresses
contain the interesting "XXX is at YYY" data; put that into the Info
column.  Thanks to Andreas Sikkema for catching this.

svn path=/trunk/; revision=4906
2002-03-10 00:05:20 +00:00
Guy Harris 7d77975a14 Sigh. Tcpdump cannot handle capture files with a snapshot length of 0,
as BPF filters return either 0 if they fail or the snapshot length if
they succeed, and a snapshot length of 0 means success is
indistinguishable from failure and the filter expression would reject
all packets.

Now that a snapshot length of 0, inside Ethereal, means "snapshot length
unknown", we have to, when opening a libpcap file for output, make the
snapshot length some non-zero value.  We make it WTAP_MAX_PACKET_SIZE,
in case some program uses the snapshot length as a buffer size.  (That
doesn't help if there are packets with more than 65535 bytes of data; if
there are, we'd need to raise WTAP_MAX_PACKET_SIZE just to make those
files readable in Ethereal in any case.)

svn path=/trunk/; revision=4905
2002-03-09 23:07:26 +00:00
Guy Harris 5690265087 Fix some "proto_tree_add_uint()" and "proto_tree_add_uint_hidden()"
calls that passed TRUE or FALSE, rather than an integer value, as the
last argument.

A SOCKS command is one byte, so make the "socks.command" field an
FT_UINT8.

svn path=/trunk/; revision=4904
2002-03-09 22:54:27 +00:00
Guy Harris f4ee24a894 Use -1, rather than 0, as the length when creating an item with a
subtree under it, so that if an exception is thrown while we're
dissecting the items in the subtree, it runs to the end of the tvbuff
(as, if an exception is thrown, it means the item should cover the stuff
in the tvbuff *and* stuff beyond it).

svn path=/trunk/; revision=4903
2002-03-09 22:46:29 +00:00
Guy Harris 688ad377fe From Jouni Malinen: fix bugs in 802.11 authentication frame dissection.
svn path=/trunk/; revision=4902
2002-03-09 22:41:51 +00:00
Guy Harris eb62c04d71 No need to put ", N byte{s} at offset O" into the Info column twice;
once is enough.

svn path=/trunk/; revision=4901
2002-03-09 02:12:47 +00:00
Guy Harris 828df9d18f Fix a comment.
svn path=/trunk/; revision=4899
2002-03-07 21:46:06 +00:00
Guy Harris ab0302ea1b Fix a typo - IFT_ISO88025 is 9, not 8.
svn path=/trunk/; revision=4898
2002-03-07 21:31:12 +00:00
Guy Harris 0070f850df Bug fix from Marc Milgram: occasionally the VMS parser would read off
the end of string, and find some old data that looked useful, but was
bogus for the frame.

svn path=/trunk/; revision=4897
2002-03-07 21:08:33 +00:00
Guy Harris d124f3f5e4 Updates from Mike Frisch.
svn path=/trunk/; revision=4895
2002-03-07 05:51:11 +00:00
Guy Harris 43ca2567dc Don't say "without SNMP"; that can confuse people into thinking it means
Ethereal doesn't dissect SNMP if not linked with an SNMP library (and
*did* confuse at least one person into thinking that).  Say "without
SNMP MIB support", instead, as you only lose the ability to read SNMP
MIBs and interpret OIDs and variable bindings according to those MIBs.

svn path=/trunk/; revision=4894
2002-03-06 23:37:12 +00:00
Gilbert Ramirez 6aad6e40b8 tvb_get_nstringz() needs to terminate a string with a NUL if the
end of the tvbuff is reached before the maximum_length passed by the
caller is reached and before a terminating NUL is found. In this case,
tvb_get_nstringz() returns a -1, but if the string is not artificially
terminated with a NUL by tvb_get_nstringz(), the
caller has no idea where the string should end because 1) the
return value "-1" gives the impression that the string ends
at the end of the buffer but 2) the string does
not end at the end of the buffer, but somewhere in the middle, due
to the packet being shorter than expected.

tvb_get_nstringz() and tvb_get_nstringz0() were both modified.

The FT_STRINGZ case in proto_tree_add_item() is made simpler.

During regression testing, when investigating a regression that I later
corrected, I discovered that strings added through proto_tree_add_item
(FT_STRING, FT_STRINGZ, and FT_UINT_STRING) leaked memory due to double
allocation of the string. The proto_tree_add_string*() functions do
not leak memory, since they only copy the string once. The memory
leak was fixed by adding another argument to the static function
proto_tree_set_string() to let the string ftype code know to g_strdup()
the string or not.

svn path=/trunk/; revision=4891
2002-03-06 19:17:06 +00:00
Gilbert Ramirez 6ff05ff765 Remove incorrect usage of ?: expression in favor or the correct,
and more readable, "if" statement.

svn path=/trunk/; revision=4890
2002-03-06 17:56:28 +00:00
Ronnie Sahlberg a4b87ac09d Rename function and variables for dissecting an NT service Account Control
bitmap and make the function not static.
This bitmap is present in other RPC protocols for NT services as well
besides SAMR.

svn path=/trunk/; revision=4889
2002-03-06 10:01:17 +00:00
Ronnie Sahlberg 6723d26565 Moved dissector for UNICODE_STRING structure from packet-dcerpc-samr.c to packet-dcerpc-nt.c since this is a structure that is common to all NT services and not only SAMR.
svn path=/trunk/; revision=4888
2002-03-06 08:58:01 +00:00
Ronnie Sahlberg 68a7d05463 Fixed bug in dissect_ndr_pointer(). Top level Unique and Full pointers are
not encoded in the same way in the NDR representation.

svn path=/trunk/; revision=4887
2002-03-06 08:28:57 +00:00
Jun-ichiro itojun Hagino b208c33e01 1.3 was committed by mistake
svn path=/trunk/; revision=4886
2002-03-06 06:36:22 +00:00
Jun-ichiro itojun Hagino 0ee492780f VRRPv3 (for IPv6) support, by sumikawa@kame.net
svn path=/trunk/; revision=4885
2002-03-06 06:33:37 +00:00
Gilbert Ramirez ac8bc4249f Use the gdb "x" (examine memory) command instead of "print" to obtain
the packet data.  "print" will only show the first 200 members of an array,
whereas "x" doesn't seem to have a limit.

svn path=/trunk/; revision=4884
2002-03-06 06:14:21 +00:00
Guy Harris b25db1028e From Mike Frisch: remove debug printf statements.
svn path=/trunk/; revision=4883
2002-03-06 04:02:02 +00:00
Guy Harris f4f14e0128 Check to make sure SNMP_IPADDR items are 4 bytes long and SNMP_COUNTER64
items are 8 bytes long.

svn path=/trunk/; revision=4882
2002-03-06 03:52:13 +00:00
Gilbert Ramirez 736ac33a0c Add ability to pull packet from add_packet_to_packet_list() frame.
svn path=/trunk/; revision=4881
2002-03-06 03:34:50 +00:00
Guy Harris 7150369e1a The length field in the TPKT header contains the length of the packet
*including the length of the TPKT header itself*, not just the length of
the payload.

svn path=/trunk/; revision=4880
2002-03-05 22:15:21 +00:00
Guy Harris e28f56867d From Joerg Mayer: remove unused variables.
svn path=/trunk/; revision=4879
2002-03-05 12:03:27 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Guy Harris f2e1c78ba1 From Adam Sulmicki: fixes to typos in comments.
svn path=/trunk/; revision=4877
2002-03-05 11:04:15 +00:00
Guy Harris de0d26aea7 Fix another problem found by the PROTOS captures - in
"asn1_string_value_decode()", don't pass "g_malloc()" an argument of 0,
as "g_malloc()" will return NULL in that case, and the callers of
"asn1_string_value_decode()" aren't necessarily prepared for a null
argument.

svn path=/trunk/; revision=4876
2002-03-05 09:18:58 +00:00
Guy Harris b5e9cef2bf Make "wtap_seek_read()" return TRUE on success and FALSE on error, like
"wtap_read()".

Add some additional error checks to the Sniffer file reader.

svn path=/trunk/; revision=4875
2002-03-05 08:40:27 +00:00
Guy Harris e300f4db52 Have "wtap_seek_read()" return 0 on success and -1 on failure, and take
an "err" argument that points to an "int" into which to put an error
code if it fails.

Check for errors in one call to it, and note that we should do so in
other places.

In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite
"cfile.pseudo_header", and make the buffer into which we read the data
WTAP_MAX_PACKET_SIZE bytes, as it should be.

In some of the file readers for text files, check for errors from the
"parse the record header" and "parse the hex dump" routines when reading
sequentially.

In "csids_seek_read()", fix some calls to "file_error()" to check the
error on the random stream (that being what we're reading).

svn path=/trunk/; revision=4874
2002-03-05 05:58:41 +00:00
Guy Harris a7553a5586 There's just a single H.225 dissector, for both Call Signaling and
Registration, Admission, and Status, so just call it "h225", not
"h225_cs".

svn path=/trunk/; revision=4871
2002-03-05 03:10:52 +00:00