summaryrefslogtreecommitdiff
path: root/print-snmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Add an "fn_printzp()" routine for printing null-padded strings (stringsguy2005-05-061-2/+5
| | | | | | | | | | | | | | | with a maximum length, where a string shorter than that length is padded with NULs), as "fn_print()" won't handle the maximum length *and* the snapshot length and "fn_printn()" won't stop on a null string. Use it where appropriate. Always pass "snapend" to "fn_print()" and "fn_printn()" if they're passed a pointer into the packet data; only pass NULL if they're being handed a pointer into a buffer that's not part of the packet data. Always check the return value of "fn_print()", "fn_printn()", and "fn_printzp()" if they're passed "snapend", and do the appropriate string termination and "packet truncated" indication if they return 1.
* Boost size of buffers so that they can handle a 32-bit integer; fromguy2005-04-181-4/+4
| | | | OpenBSD.
* From Gisle Vanem: fix some signed vs. unsigned and truncation warnings.guy2005-01-051-5/+5
|
* Don't pass in "asn1_parse()" a packet length cut short by the snapshotguy2004-12-271-62/+101
| | | | | | | length; explicitly check against the snapshot length, instead. In "asn1_parse()", always check against the length passed in before fetching anything from the packet.
* From Gisle Vanem: undefine OPAQUE, as it's defined by <wingdi.h>, whichguy2004-11-041-1/+7
| | | | | is included if we compile with at least some Windows compilers, and add a default case to "smi_check_a_range()".
* Enterprise-specific traps have a generic trap number of 6, not 7; thanksguy2004-03-231-2/+2
| | | | to kin1@sourceforge.net to finding this.
* 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-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".
* Add a few more GCC warnings on GCC >= 2 for ".devel" builds.guy2002-09-051-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added support for Win32, based on WinPcap.risso2002-08-011-4/+2
|
* From Phil Wood <cpw@lanl.gov>: fix the test for a community of "public"guy2002-07-201-3/+4
| | | | | to check the length of the community name before doing a length-limited comparison.
* whitespace cleanupitojun2002-06-111-14/+14
|
* Fix spacing with -vfenner2002-05-071-2/+2
|
* From Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de> - fix for theguy2002-05-071-6/+13
| | | | | | | | following problem: According to the ASN.1 documents, OIDs of the form 2.100.3 are correctly encoded as 0x0603813403. tcpdump fails to properly decode them - it displays the value 4.20.3 instead of 2.100.3.
* Update makemib and print-snmp.c license, via OpenBSD: jakob gotfenner2001-09-171-11/+24
| | | | update from John LoVerso.
* print "outOfRange" instead of "wrongLength" when an object's value isfenner2001-06-151-2/+2
| | | | out of the range specified by the MIB.
* Juergen's fix for buffer overflow, posted to tcpdump-workers withfenner2001-04-231-6/+12
| | | | Message-Id: <200104231431.QAA25904@henkell.ibr.cs.tu-bs.de>
* remove "|%.2x" appeared on -v, which seemed purely for debugging.itojun2001-03-221-13/+3
|
* avoid trigraphitojun2001-03-171-3/+3
|
* Get rid of libsmiV1 API compatibility. The configure script alreadyfenner2001-01-241-64/+2
| | | | | requires the v2 API, so this attempt at compatibility just caused problems.
* Some verbose format diffs from Juergen Schoenwaelderfenner2000-11-101-11/+46
|
* Update for libsmi v0.2.x . Attempt to retain libsmi v0.1.x compatibilityfenner2000-11-041-12/+63
| | | | (but didn't test it).
* Remove erroneous semicolon from "for()" clause; patch from Michael T.guy2000-10-061-2/+2
| | | | Stolarchuk.
* remove non-STDC codeassar2000-07-011-4/+1
|
* s/sprintf/snprintf/.itojun2000-01-171-6/+9
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* * print-rt6.c: make IPv6 routing header printing work with new 2292bisitojun1999-12-221-1/+9
| | | | | | | | | | | 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.
* From: Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de>mcr1999-12-131-26/+312
| | | | | | | | Here is a new version of the libsmi patch for tcpdump. It provides some bug fixes and some enhancements such as access checking and better range checking. The patch also fixed a few bugs in the print_snmp.c module of tcpdump itself (unrelated to the usage of libsmi).
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* compilable AH/ESP patchesmcr1999-10-171-53/+529
|
* patches to help build on Linux 2.2linux22mcr1999-10-171-183/+15
|
* SNMP v2c patches from http://www.ibr.cs.tu-bs.de/ietf/snmpv3/tcpdump.shtmlsnmpv2cmcr1999-10-171-15/+183
|
* Initial revisionmcr1999-10-071-0/+1043