Commit Graph

24 Commits

Author SHA1 Message Date
guy
20f0bc9ecb Put in some casts to squelch compiler warnings. 2002-07-11 07:44:49 +00:00
guy
734406c510 From Sami Farin <safari@iki.fi>: put in a missing blank before "NBT
Packet".
2002-04-30 09:09:41 +00:00
guy
75e82d625d Convert some format pointers to "char *" from "u_char *", and some data
pointers from "char *" to "u_char *", to eliminate signed vs. unsigned
complaints from some compilers.

Don't use "++"s in initialization, to avoid warnings from the Sun C
compiler.
2002-04-25 04:54:02 +00:00
guy
6391f6a1d3 Include <netinet/in.h> to declare "ntohs()" (which may be used by
"EXTRACT_16BITS()").
2002-02-06 11:14:51 +00:00
guy
3b8eb6c730 Bill Fenner's changes to clean up the SMB dissection somewhat and to add
a lot of boundary checking.
2002-01-17 04:38:29 +00:00
itojun
459451d636 disable smb printing until we have boundary checks in *smb*.c (there's almost
no boundary check).
2001-10-04 09:18:45 +00:00
fenner
c672f00276 Eliminate some unused parameters.
Use const more.
Use EXTRACT_* macros more.
Use TCHECK* more.
Use tok2str() to replace some home-grown workalikes.
smb:
 - Get rid of private types, use tcpdump-defined types
 - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict
   with IRIX library function.
2001-09-17 21:57:50 +00:00
guy
1e53e21ca3 Handle NBNS multihomed registration messages (they're not in RFC 1001 or
1002 - Microsoft added them).
2001-07-28 22:59:30 +00:00
itojun
44ca3cf425 indent (sorry, i left them behind 2001-06-28 03:15:38 +00:00
itojun
79fd5507b2 more indentation fix. now i've gone through all *smb*. now let us
go through buffer length issues....
2001-06-26 04:16:27 +00:00
itojun
d261660e65 more indent clarification for audits 2001-06-26 03:33:44 +00:00
itojun
a1d73ea7ee more audit/style. fix a couple of signed/unsigned mixup,
printf type mismatch, as well as buffer overrun possibilities
2001-06-25 18:58:07 +00:00
itojun
d20d0466d0 strinct prototype. now we are -Wstrict-prototype clean.
couple of indent fixes (ts=8 sw=4) so that we can do
a buffer overrun audit effectively.
2001-06-25 03:07:30 +00:00
fenner
9335d2326e Fix bug where tcpdump shows data beyond the end of certain NBT packets.
Not-really-submitted by:	archie@freebsd.org
2001-04-03 22:55:33 +00:00
fenner
5c3e0d242f Patches from Pekka Savola <pekkas@netcore.fi> to quiet down SMB a little.
I changed his patches to actually use -vv.  Obviously tcpdump actually
needs more-targeted -v flags (like "-v smb").
2001-02-20 19:28:02 +00:00
guy
0056894f4e Do some additional bounds checking when dissecting SMB packets. 2001-01-15 03:59:13 +00:00
guy
64e81f2917 Handle IPX socket 0x553, which is some kind of NetBIOS-over-IPX socket.
(We call it "nwlink-dgm" for now; Ethereal calls it a NWLink SMB
datagram.)

Don't throw every LLC frame with unknown SAPs at the NetBIOS-over-IPX
dissector; just throw the frames for IPX sockets 0x455 and 0x553 at it,
as those appear to be the sockets used (if there are any others, please
add them to the IPX dissector - putting it back in the LLC dissector
won't help, as all IPX frames, including LLC frames, should now be
handed to the IPX dissector).

Do better bounds checking in "ipx_netbios_print()" and
"netbeui_print()", i.e. don't go past the end of the captured data in
the packet when looking for the 0xFF S M B signature.
2001-01-15 03:23:58 +00:00
guy
393ce0607f The control field of an LLC frame is 1 byte for a U frame and 2 bytes
for an S or I frame; have the LLC dissector pass the control field value
as an argument to the NetBEUI dissector, rather than having the NetBEUI
dissector extract the control field value itself, and have it pass a
pointer to the beginning of the LLC *payload* rather than to the control
field.

Keep the NetBEUI dissector from running past the end of the buffer.

Add support for the NetBEUI SESSION ALIVE frame.
2000-12-05 06:42:47 +00:00
guy
fb298cf2dd Add a bunch of checks to make sure we don't go past the end of the
packet.
2000-12-04 00:35:44 +00:00
itojun
2edb263ee1 no need to use strcat at all 2000-01-19 05:17:13 +00:00
fenner
34ff77ff43 Unify rcsid[]'s. 2000-01-09 21:34:14 +00:00
itojun
c4521bbf47 * print-rt6.c: make IPv6 routing header printing work with new 2292bis
API.
* print-bgp.c: improve options printing.  ugly code exists for
  unaligned option parsing (need some fix).
* const poisoning in SMB decoder.
* make dump format back to original.  someone may want to add an
  option to do ascii printing, but keep the default behavior as is
  for scripts used in many places.
* -Wall -Werror clean checks.
1999-12-22 06:27:19 +00:00
fenner
c486cf2d68 include string.h for prototypes
remove unused variables
make a few functions static
fix very confused code with & vs. == precedence errors as well as
 a failure to shift the field value
1999-12-15 07:05:58 +00:00
assar
d58c39ce13 add config.h 1999-11-21 16:01:56 +00:00