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()
104 socklen_t socklen, char *file, int opcode, int tsize, int blksize) in do_action() argument
124 send_errpkt(dstaddr, socklen, "can't open file"); in do_action()
165 send_errpkt(dstaddr, socklen, "read-error"); in do_action()
175 if (sendto(TT.sfd, spkt, (ptr - spkt), 0, dstaddr, socklen) <0) in do_action()
195 send_errpkt(dstaddr, socklen, "read-error"); in do_action()
233 send_errpkt(dstaddr, socklen, "write error"); in do_action()
256 socklen_t socklen = sizeof(struct sockaddr_storage); in tftpd_main() local
261 if (getsockname(0, (struct sockaddr *)&srcaddr, &socklen)) help_exit(0); in tftpd_main()
266 recvmsg_len = recvfrom(fd, toybuf, blksize, 0, (void *)&dstaddr, &socklen); in tftpd_main()
272 xbind(TT.sfd, (void *)&srcaddr, socklen); in tftpd_main()
273 xconnect(TT.sfd, (void *)&dstaddr, socklen); in tftpd_main()
276 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
284 send_errpkt((struct sockaddr*)&dstaddr, socklen, in tftpd_main()
291 send_errpkt((struct sockaddr*)&dstaddr, socklen, "dot in filename"); in tftpd_main()
298 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
320 socklen, toybuf + 2, opcode, tsize, blksize); in tftpd_main()