#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
-static const char tstr[] = " [|tftp]";
/* op code to string mapping */
static const struct tok op2str[] = {
u_int ui;
ndo->ndo_protocol = "tftp";
+
+ /* Print protocol */
+ ND_PRINT("TFTP");
/* Print length */
- ND_PRINT(" %u", length);
+ ND_PRINT(", length %u", length);
/* Print tftp request type */
if (length < 2)
ND_TCHECK_2(bp);
opcode = EXTRACT_BE_U_2(bp);
cp = tok2str(op2str, "tftp-#%u", opcode);
- ND_PRINT(" %s", cp);
+ ND_PRINT(", %s", cp);
/* Bail if bogus opcode */
if (*cp == 't')
return;
}
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return;
}