X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/dfa8cbe527ad9095726bff83494ac5fac347cb3b..012652d39b74a464154c8c4d1d73b81a37a341ef:/util.c diff --git a/util.c b/util.c index 1e451fea..e8515f18 100644 --- a/util.c +++ b/util.c @@ -21,19 +21,17 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.74 2002-07-16 03:58:16 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.78 2002-08-02 04:22:11 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include -#include +#include + #include -#include #include #ifdef HAVE_FCNTL_H #include @@ -46,7 +44,6 @@ static const char rcsid[] = #ifdef TIME_WITH_SYS_TIME #include #endif -#include #include "interface.h" @@ -201,6 +198,34 @@ relts_print(int secs) } } +/* + * this is a generic routine for printing unknown data; + * we pass on the linefeed plus indentation string to + * get a proper output - returns 0 on error + */ + +int +print_unknown_data(const u_char *cp,const char *lf,int len) +{ + int i; + + printf("%s0x0000: ",lf); + for(i=0;i