#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.21 2002-02-06 11:14:51 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.22 2002-04-25 04:54:02 guy Exp $";
#endif
#include <stdio.h>
static struct smbfnsint *fn = &trans2_fns[0];
const u_char *data, *param;
const u_char *w = words + 1;
- const u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
int pcnt, dcnt;
TCHECK(words[0]);
if (fn->descript.fn)
(*fn->descript.fn)(param, data, pcnt, dcnt);
else {
- smb_fdata(param, f1 ? f1 : (u_char *)"Paramaters=\n", param + pcnt);
- smb_fdata(data, f2 ? f2 : (u_char *)"Data=\n", data + dcnt);
+ smb_fdata(param, f1 ? f1 : "Parameters=\n", param + pcnt);
+ smb_fdata(data, f2 ? f2 : "Data=\n", data + dcnt);
}
return;
trunc:
static void
print_trans(const u_char *words, const u_char *data1, const u_char *buf, const u_char *maxbuf)
{
- const u_char *f1, *f2, *f3, *f4;
+ const char *f1, *f2, *f3, *f4;
const u_char *data, *param;
const u_char *w = words + 1;
int datalen, paramlen;
static void
print_negprot(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
{
- u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
TCHECK(words[0]);
if (request)
print_sesssetup(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
{
int wcnt;
- u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
TCHECK(words[0]);
wcnt = words[0];
TCHECK(words[0]);
for (;;) {
- const u_char *f1, *f2;
+ const char *f1, *f2;
int wct;
int bcc;
int name_trn_id, response, opcode, nm_flags, rcode;
int qdcount, ancount, nscount, arcount;
char *opcodestr;
- const char *p;
+ const u_char *p;
int total, i;
TCHECK2(data[10], 2);
p += 2;
}
} else {
- print_data(p, min(rdlen, length - ((const u_char *)p - data)));
+ print_data(p, min(rdlen, length - (p - data)));
p += rdlen;
}
}
}
}
- if ((u_char*)p < maxbuf)
+ if (p < maxbuf)
smb_fdata(p, "AdditionalData:\n", maxbuf);
out: