Lines Matching refs:socklen
78 socklen_t socklen, char *errmsg)
83 if (sendto(TT.sfd, g_errpkt, strlen(errmsg)+5, 0, dstaddr, socklen) < 0)
89 socklen_t socklen, char *file, int opcode, int tsize, int blksize)
109 send_errpkt(dstaddr, socklen, "can't open file");
150 send_errpkt(dstaddr, socklen, "read-error");
160 if (sendto(TT.sfd, spkt, (ptr - spkt), 0, dstaddr, socklen) <0)
180 send_errpkt(dstaddr, socklen, "read-error");
218 send_errpkt(dstaddr, socklen, "write error");
241 socklen_t socklen = sizeof(struct sockaddr_storage);
245 if (getsockname(0, (struct sockaddr *)&srcaddr, &socklen)) {
253 recvmsg_len = recvfrom(fd, toybuf, blksize, 0, (void *)&dstaddr, &socklen);
258 if (bind(TT.sfd, (void *)&srcaddr, socklen)) perror_exit("bind");
259 if (connect(TT.sfd, (void *)&dstaddr, socklen) < 0)
263 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error");
271 send_errpkt((struct sockaddr*)&dstaddr, socklen,
278 send_errpkt((struct sockaddr*)&dstaddr, socklen, "dot in filename");
285 send_errpkt((struct sockaddr*)&dstaddr, socklen, "packet format error");
310 socklen, toybuf + 2, opcode, tsize, blksize);