Lines Matching refs:tp
239 static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size);
554 struct tftphdr *tp; in main() local
823 tp = &buf.hdr; in main()
824 tp->th_opcode = ntohs(tp->th_opcode); in main()
825 if(tp->th_opcode == opcode_RRQ || tp->th_opcode == opcode_WRQ) { in main()
827 if(do_tftp(&test, tp, n) < 0) in main()
890 static int do_tftp(struct testcase *test, struct tftphdr *tp, ssize_t size) in do_tftp() argument
916 fprintf(server, "opcode = %x\n", tp->th_opcode); in do_tftp()
918 cp = (char *)&tp->th_stuff; in do_tftp()
979 ecode = validate_access(test, filename, tp->th_opcode); in do_tftp()
994 if(tp->th_opcode == opcode_WRQ) in do_tftp()
1356 struct tftphdr *tp; in nak() local
1360 tp = &buf.hdr; in nak()
1361 tp->th_opcode = htons(opcode_ERROR); in nak()
1362 tp->th_code = htons((unsigned short)error); in nak()
1368 tp->th_code = EUNDEF; /* set 'undef' errorcode */ in nak()
1374 memcpy(tp->th_msg, pe->e_msg, length + 1); in nak()