SCCS-vsn: usr.bin/tftp/tftp.c 4.4
SCCS-vsn: libexec/tftpd/tftpd.c 4.5
-/* tftpd.c 4.4 82/11/14 */
+/* tftpd.c 4.5 82/11/15 */
/*
* Trivial file transfer protocol server.
/*
* Trivial file transfer protocol server.
}
again:
fromlen = sizeof (from);
}
again:
fromlen = sizeof (from);
- n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
+ n = recvfrom(f, buf, sizeof (buf), 0, (caddr_t)&from, &fromlen);
if (n <= 0) {
if (n < 0)
perror("tftpd: recvfrom");
if (n <= 0) {
if (n < 0)
perror("tftpd: recvfrom");
-/* tftp.c 4.3 82/11/14 */
+/* tftp.c 4.4 82/11/15 */
/*
* TFTP User Program -- Protocol Machines
/*
* TFTP User Program -- Protocol Machines
rexmt:
if (trace)
tpacket("sent", tp, size + 4);
rexmt:
if (trace)
tpacket("sent", tp, size + 4);
- n = sendto(f, buf, size + 4, (caddr_t)&sin, sizeof (sin), 0);
+ n = sendto(f, buf, size + 4, 0, (caddr_t)&sin, sizeof (sin));
if (n != size + 4) {
perror("send");
break;
}
again:
fromlen = sizeof (from);
if (n != size + 4) {
perror("send");
break;
}
again:
fromlen = sizeof (from);
- n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
+ n = recvfrom(f, buf, sizeof (buf), 0, (caddr_t)&from, &fromlen);
if (n <= 0) {
if (n == 0)
goto again;
if (n <= 0) {
if (n == 0)
goto again;
rexmt:
if (trace)
tpacket("sent", tp, size);
rexmt:
if (trace)
tpacket("sent", tp, size);
- if (sendto(f, buf, size, (caddr_t)&sin, sizeof (sin), 0) != size) {
+ if (sendto(f, buf, size, 0, (caddr_t)&sin, sizeof (sin)) != size) {
perror("send");
break;
}
again:
perror("send");
break;
}
again:
- n = recvfrom(f, buf, sizeof (buf), (caddr_t)&from, &fromlen, 0);
+ n = recvfrom(f, buf, sizeof (buf), 0, (caddr_t)&from, &fromlen);
if (n <= 0) {
if (n == 0)
goto again;
if (n <= 0) {
if (n == 0)
goto again;
alarm(0);
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
alarm(0);
tp->th_opcode = htons((u_short)ACK);
tp->th_block = htons((u_short)block);
- (void) sendto(f, buf, 4, &sin, sizeof (sin), 0);
+ (void) sendto(f, buf, 4, 0, &sin, sizeof (sin));
(void) close(fd);
if (amount > 0) {
delta = time(0) - start;
(void) close(fd);
if (amount > 0) {
delta = time(0) - start;