*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include <stdio.h>
#include <stdlib.h>
}
void
-smb_print_data(netdissect_options *ndo, const u_char *buf, u_int len)
+smb_data_print(netdissect_options *ndo, const u_char *buf, u_int len)
{
u_int i = 0;
if (!depth && buf < maxbuf) {
size_t len = PTR_DIFF(maxbuf, buf);
ND_PRINT("Data: (%lu bytes)\n", (unsigned long)len);
- smb_print_data(ndo, buf, len);
+ smb_data_print(ndo, buf, len);
return(buf + len);
}
return(buf);
const err_code_struct *err = err_classes[i].err_msgs;
for (j = 0; err[j].name; j++)
if (num == err[j].code) {
- snprintf(ret, sizeof(ret), "%s - %s (%s)",
+ nd_snprintf(ret, sizeof(ret), "%s - %s (%s)",
err_classes[i].class, err[j].name, err[j].message);
return ret;
}
}
- snprintf(ret, sizeof(ret), "%s - %d", err_classes[i].class, num);
+ nd_snprintf(ret, sizeof(ret), "%s - %d", err_classes[i].class, num);
return ret;
}
- snprintf(ret, sizeof(ret), "ERROR: Unknown error (%d,%d)", class, num);
+ nd_snprintf(ret, sizeof(ret), "ERROR: Unknown error (%d,%d)", class, num);
return(ret);
}
return nt_errors[i].name;
}
- snprintf(ret, sizeof(ret), "0x%08x", err);
+ nd_snprintf(ret, sizeof(ret), "0x%08x", err);
return ret;
}