th_code
tp->th_code = htons((u_short)error);
tp->th_code = EUNDEF; /* set 'undef' errorcode */
if ((unsigned) ntohs(t->th_code) >= 8) {
printf("illegal tftp error %d\n", ntohs(t->th_code));
printf("tftp-error %d\n", ntohs(t->th_code));
errno = tftperrors[ntohs(t->th_code)];
printf("Error code %d: %s\n", ap->th_code,
printf("Error code %d: %s\n", dp->th_code,
tp->th_code = htons((u_short)error);
tp->th_code = EUNDEF;
printf("<code=%d, msg=%s>\n", ntohs(tp->th_code), tp->th_msg);