Lines Matching refs:socklen
78 socklen_t socklen, char *errmsg) in send_errpkt() argument
83 if (sendto(TT.sfd, g_errpkt, strlen(errmsg)+5, 0, dstaddr, socklen) < 0) in send_errpkt()
89 socklen_t socklen, char *file, int opcode, int tsize, int blksize) in do_action() argument
109 send_errpkt(dstaddr, socklen, "can't open file"); in do_action()
150 send_errpkt(dstaddr, socklen, "read-error"); in do_action()
160 if (sendto(TT.sfd, spkt, (ptr - spkt), 0, dstaddr, socklen) <0) in do_action()
180 send_errpkt(dstaddr, socklen, "read-error"); in do_action()
218 send_errpkt(dstaddr, socklen, "write error"); in do_action()
241 socklen_t socklen = sizeof(struct sockaddr_storage); in tftpd_main() local
245 if (getsockname(0, (struct sockaddr *)&srcaddr, &socklen)) help_exit(0); in tftpd_main()
250 recvmsg_len = recvfrom(fd, toybuf, blksize, 0, (void *)&dstaddr, &socklen); in tftpd_main()
255 if (bind(TT.sfd, (void *)&srcaddr, socklen)) perror_exit("bind"); in tftpd_main()
256 if (connect(TT.sfd, (void *)&dstaddr, socklen) < 0) in tftpd_main()
260 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
268 send_errpkt((struct sockaddr*)&dstaddr, socklen, in tftpd_main()
275 send_errpkt((struct sockaddr*)&dstaddr, socklen, "dot in filename"); in tftpd_main()
282 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
307 socklen, toybuf + 2, opcode, tsize, blksize); in tftpd_main()