Lines Matching defs:port
2 * Pscan is a mini port scanner implementation for busybox
20 static const char *port_name(unsigned port)
24 server = getservbyport(htons(port), NULL);
36 const char *opt_max_port = "1024"; /* -P: default max port */
37 const char *opt_min_port = "1"; /* -p: default min port */
39 /* We estimate rtt and wait rtt*4 before concluding that port is
47 unsigned port, max_port, nports;
60 port = xatou_range(opt_min_port, 1, max_port);
61 nports = max_port - port + 1;
67 lsap = xhost2sockaddr(*argv, port);
69 *argv, port, max_port);
71 for (; port <= max_port; port++) {
75 set_nport(lsap, htons(port));
81 DMSG("connect to port %u", port);
97 DMSG("port %u: ECONNREFUSED", port);
101 DERR("port %u errno %d @%u", port, errno, MONOTONIC_US() - start);
109 DMSG("write to port %u @%u", port, MONOTONIC_US() - start);
113 printf("%5u\ttcp\topen\t%s\n", port, port_name(port));
120 * for each port. *4 allows for rise in net delay.