summaryrefslogtreecommitdiff
path: root/smbutil.c
Commit message (Collapse)AuthorAgeFilesLines
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-4/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-1/+1
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* From Neil Spring:guy2003-11-151-4/+4
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* From Mark Ellzey Thomas <mark@ackers.net>: some additionalguy2003-08-101-2/+6
| | | | buffer-overflow checking.
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
* "localtime()" can return a null pointer on Windows; if I rememberguy2002-09-041-2/+12
| | | | | correctly, this can happen if the time handed to it is before the UNIX epoch. Just report "(Can't convert time)" if it returns a null pointer.
* Get rid of some unnecessary includes (<time.h>, <netdb.h>, and <ctype.h>guy2002-08-061-4/+1
| | | | | are included by <tcpdump-stdinc.h>, so we don't have to include them explicitly; <errno.h> isn't needed by print routines).
* Added support for Win32, based on WinPcap.risso2002-08-011-8/+2
|
* Add some casts to squelch compiler complaints (and remove potentialguy2002-04-261-6/+6
| | | | | problems, although the string in question probably won't contain any non-ASCII characters).
* Convert some format pointers to "char *" from "u_char *", and some dataguy2002-04-251-6/+9
| | | | | | | | 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.
* Protect includes of <time.h> with "#ifdef TIME_WITH_SYS_TIME".guy2002-04-201-1/+3
|
* Bill Fenner's changes to clean up the SMB dissection somewhat and to addguy2002-01-171-27/+68
| | | | a lot of boundary checking.
* Eliminate some unused parameters.fenner2001-09-171-25/+25
| | | | | | | | | | | 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.
* cleanup indent for audititojun2001-06-251-234/+256
|
* more audit/style. fix a couple of signed/unsigned mixup,itojun2001-06-251-390/+413
| | | | printf type mismatch, as well as buffer overrun possibilities
* avoid strcpyitojun2001-06-151-28/+28
|
* use safeputchar() instead of cook up on its own.itojun2001-01-281-2/+2
|
* Add a bunch of checks to make sure we don't go past the end of theguy2000-12-041-20/+80
| | | | packet.
* Get rid of unneeded includes of <net/if.h>.guy2000-09-281-2/+1
|
* Add definitions of Ethernet types fromguy2000-09-231-2/+1
| | | | | | | | | | | | | | | | "linux-includes/netinet/if_ether.h" to "ethertype.h". Move other stuff used by dissectors from <netinet/if_ether.h> to "ether.h", along the lines of "fddi.h" and "token.h". Move ARP declarations from BSD include files to "print-arp.c". Remove from dissectors includes of <netinet/if_ether.h>, and add includes of "ethertype.h" and/or "ether.h" as necessary. Get rid of configuration options that test declarations now made in "ether.h" or "print-arp.c", as those declarations are now under our control, not the OS's control.
* replace bzero with memsetassar2000-07-291-2/+2
|
* fix typoassar2000-07-101-2/+2
|
* add <time.h>assar2000-07-101-1/+2
|
* s/sprintf/snprintf/.itojun2000-01-171-4/+4
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* Unify rcsid[]'s.fenner2000-01-091-0/+5
|
* * print-rt6.c: make IPv6 routing header printing work with new 2292bisitojun1999-12-221-11/+11
| | | | | | | | | | | 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.
* Include interface.h to get prototypesfenner1999-12-151-9/+9
| | | | | | Make some functions static Eliminate a few unused variables Cast PTR_DIFF's to (int) in printfs to quiet format warnings
* add config.hassar1999-11-211-0/+4
|
* patches from Andrew Tridgell <tridge@linuxcare.com> to add decoding of SMB ↵assar1999-11-211-0/+689
packets