Lines Matching refs:dstaddr
77 static void send_errpkt(struct sockaddr *dstaddr, in send_errpkt() argument
83 if (sendto(TT.sfd, g_errpkt, strlen(errmsg)+5, 0, dstaddr, socklen) < 0) in send_errpkt()
88 static void do_action(struct sockaddr *srcaddr, struct sockaddr *dstaddr, 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()
240 struct sockaddr_storage srcaddr, dstaddr; in tftpd_main() local
253 recvmsg_len = recvfrom(fd, toybuf, blksize, 0, (void *)&dstaddr, &socklen); in tftpd_main()
255 TT.sfd = xsocket(dstaddr.ss_family, SOCK_DGRAM, 0); in tftpd_main()
259 if (connect(TT.sfd, (void *)&dstaddr, socklen) < 0) in tftpd_main()
263 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
271 send_errpkt((struct sockaddr*)&dstaddr, socklen, in tftpd_main()
278 send_errpkt((struct sockaddr*)&dstaddr, socklen, "dot in filename"); in tftpd_main()
285 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error"); in tftpd_main()
309 do_action((struct sockaddr*)&srcaddr, (struct sockaddr*)&dstaddr, in tftpd_main()