Lines Matching refs:tp
96 void tftp(struct tftphdr *tp, int size) __attribute__((noreturn));
108 register struct tftphdr *tp; in main() local
198 tp = (struct tftphdr *)buf; in main()
199 tp->th_opcode = ntohs(tp->th_opcode); in main()
200 if (tp->th_opcode == RRQ || tp->th_opcode == WRQ) in main()
201 tftp(tp, n); in main()
223 void tftp(struct tftphdr *tp, int size) in tftp() argument
230 filename = cp = tp->th_stuff; in tftp()
256 ecode = (*pf->f_validate)(filename, tp->th_opcode); in tftp()
261 if (tp->th_opcode == WRQ) in tftp()
517 register struct tftphdr *tp; in nak() local
521 tp = (struct tftphdr *)buf; in nak()
522 tp->th_opcode = htons((u_short)ERROR); in nak()
523 tp->th_code = htons((u_short)error); in nak()
529 tp->th_code = EUNDEF; /* set 'undef' errorcode */ in nak()
531 strcpy(tp->th_msg, pe->e_msg); in nak()
533 tp->th_msg[length] = '\0'; in nak()