Lines Matching refs:port
126 int rc, ii = 1, port = 0;
181 // PASV means the server opens a port you connect to instead of the server
182 // dialing back to the client. (Still insane, but less so.) So need port #
185 // (must match the server you're talking to???) and port is (256*p1)+p2
191 sscanf(s, ",%u,%u)%n", &p1, &port, &got);
193 port += 256*p1;
197 if (!s || port<1 || port>65535) {
198 error_msg("ftpget_main line %d, port %d toybox buf %s\r\n", __LINE__, port, toybuf);
205 si6.sin6_port = SWAP_BE16(port); // same field size/offset for v4 and v6
206 port = xsocket(si6.sin6_family, SOCK_STREAM, 0);
207 TT.datafd = port;
208 xconnect(port, (void *)&si6, sizeof(si6));
210 // RETR blocks until file data read from data port, so use SIZE to check
217 error_msg("ftpget_main line %d, port %d get %d toybox buf %s\r\n", __LINE__, port, get, toybuf);
251 lenl += xsendfile(port, ii);
253 close(port);
254 port = -1;
263 lenr += xsendfile(ii, port);
264 close(port);
265 port = -1;
272 ftp_line("QUIT", 0, ((port == -1) ? -1 : 0));
288 ftp_line("QUIT", 0, ((port == -1) ? -1 : 0));
290 if (port>=0) xclose(port);