summaryrefslogtreecommitdiff
path: root/print-nfs.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 Charles M. Hannum <mycroft@netbsd.org>: NetBSD whitespace cleanups.guy2002-12-121-16/+15
|
* The "__attribute__((packed))" tag on structures causes some files not toguy2002-12-111-111/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | compile with Sun C, as "interface.h" isn't being included before the structures are being declared. Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun C to generate code that's safe with unaligned accesses, as "__attribute__" is defined as a do-nothing macro with compilers that don't support it. Therefore, we get rid of that tag on the structures to which it was added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch 16-bit and 32-bit big-endian quantities from packets. We also fix some other references to multi-byte quantities to get rid of code that tries to do unaligned loads on platforms that don't support them. We also throw in a hack that makes those macros use "__attribute__((packed))" on structures containing only one 16-bit or 32-bit integer to get the compiler to generate unaligned-safe code rather than doing it by hand. (GCC on SPARC produces the same code that doing it by hand does; I don't know if GCC on any other big-endian strict-alignment processor generates better code for that case. On little-endian processors, as "ntohs()" and "ntohl()" might be functions, that might actually produce worse code.) Fix some places to use "%u" rather than "%d" to print unsigned quantities.
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixes for:guy2002-08-261-6/+25
| | | | | | | | parsefattr misuses nfsv2 version members for v3. print_int64 prints at least 9 digits unnecessarily. -u flag doesn't always suppress decoding handles. from Takashi Yamamoto <yamt@mwd.biglobe.ne.jp>.
* Added support for Win32, based on WinPcap.risso2002-08-011-7/+2
|
* whitespace cleanupitojun2002-06-111-4/+4
|
* Get rid of unneeded incomplete definitions of "struct mbuf" and "structguy2002-06-011-4/+1
| | | | | rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and <sys/ioctl.h>.
* V3 FSINFO and PATHCONF requests take a file handle as an argument; parseguy2002-05-311-13/+28
| | | | | | | | | | | | | | | | | | | | the request header and the file handle. "parsestatus()" should only return NULL if the packet was truncated, so that its callers can distinguish "packet truncated" from "NFS reply status reports an error". NFS-request-or-reply parsing routines that call "parsestatus()" should not return 0 if "parsestatus()" returns a non-zero NFS reply status, so that non-truncated packets with a non-zero NFS reply status aren't printed as truncated NFS packets. Fix some "TCHECK2()" calls to pass an object, not a pointer to an object, as the first argument (the TCHECK/TTEST macros take objects, not addresses, as the test argument). NFS-request-or-reply parsing routines should return 0 for truncated packets and 1 for non-truncated packets, not *vice versa*.
* Get rid of casts of pointers-to-const to pointers-to-nonconst.guy2002-04-241-6/+7
|
* constnessitojun2002-02-181-2/+2
|
* NULL is not 0itojun2001-07-081-2/+2
|
* Check for parse failure in ACCESS replies.fenner2001-07-041-2/+3
| | | | Submitted by: nathanw@MIT.EDU (Nathan J. Williams)
* put stripped-down version of ip6.h and icmp6.h into tcpdump tree.itojun2000-10-071-4/+4
| | | | | | | | ip6.h is almost normal RFC2292 header. icmp6.h has couple of extensions (not covered by RFC2292), like MLD, ICMPv6 nodeinfo, and router renumber. XXX how to synchronize with future kame changes?
* always use u_intXX_t for protocol format declaration. char/short/int may notitojun2000-10-031-4/+4
| | | | | | come with exact size. while at it, correct signedness of ip/udp header field. nuke most of the use of bitfield. TODO: bitfield in namser.h
* Get rid of includes of <netinet/in_systm.h>, and replace "n_short",guy2000-09-291-2/+1
| | | | "n_long", and "n_time", defined in that file, with other types.
* Get rid of unneeded includes of <net/if.h>.guy2000-09-281-2/+1
|
* Add an "ip.h" header, to declare the IP stuff needed by dissectors, andguy2000-09-231-2/+3
| | | | | | | | | | | have dissectors include them rather than <netinet/ip.h> or <netinet/ip_var.h>, if they actually need that stuff. Put the declarations of the ICMP stuff directly into "print-icmp.c". Remove all unnecessary includes of <netinet/ip*.h> files. Copy the byte-order stuff from "nameser.h" into "tcp.h".
* 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.
* To translate NFS error statuses to strings, use "tok2str()" and a table,guy2000-08-031-2/+52
| | | | | | | | | rather than using "pcap_strerror()", as 1) not all NFS error statuses are UNIX errno values; 2) even those that are UNIX errno values aren't necessarily errno values for the system on which you're running tcpdump.
* s/nfstype/nfs_type/ to avoid conflict with system header filesassar2000-07-291-3/+3
|
* typo in pointer assignment. from netbsd-current.itojun2000-07-161-2/+2
|
* remove non-STDC codeassar2000-07-011-3/+1
|
* add fallback definition for INET_ADDRSTRLEN.itojun2000-06-121-1/+4
| | | | From: Kevin Steves <stevesk@sweden.hp.com>
* strncpy() does not ensure string termination.itojun2000-06-101-1/+2
|
* s/(unsigned)/(u_int32_t)/ for ntohl results.itojun2000-06-101-8/+8
|
* correct endianness in int64_print().itojun2000-06-101-8/+9
|
* correctly handle NFS-over-IPv6.itojun2000-06-101-51/+146
|
* (nfs_printfh): support print the opaque handle.assar2000-06-011-7/+11
| | | | From Francisco Matias Cuenca-Acuna <mcuenca@george.rutgers.edu>
* (unsigned) casts in printf to make gcc happyassar2000-05-151-7/+11
|
* Fix confusing indentation.fenner2000-01-281-152/+149
| | | | | | | Get rid of T2CHECK() in favor of TCHECK() or TCHECK2(). Use TCHECK() etc. instead of comparing vs. snapend. Replace strerr() with pcap_strerror(), and don't use errno as a local variable. Use tok2str() for nfsv3_writemodes to avoid array overrun by corrupt packets.
* Use %08x to make sure that the low half of a 64-bit quantity doesn'tfenner1999-12-151-2/+2
| | | | get printed incorrectly (i.e. 0x1000000001 could have been printed as 0x11)
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* incorporate NFS parsing code from NetBSD. adds support for nfsv3assar1999-11-211-219/+929
|
* patches to help build on Linux 2.2linux22mcr1999-10-171-2/+1
|
* Initial revisionmcr1999-10-071-0/+869