Lines Matching refs:netfd
57 netfd = 3,
69 /*int netfd;*/
221 xmove_fd(netfd, 0);
261 xlisten(netfd, 1); /* TCP: gotta listen() before we can get */
274 rr = getsockname(netfd, &ouraddr->sa, &ouraddr->len);
305 xconnect(netfd, &themaddr->sa, themaddr->len);
312 rr = recv_from_to(netfd, NULL, 0, MSG_PEEK, /*was bigbuf_net, BIGSIZ*/
322 xbind(netfd, &ouraddr->sa, ouraddr->len);
326 xconnect(netfd, &remend.sa, ouraddr->len);
333 rr = accept(netfd, &remend.sa, &remend.len);
350 xmove_fd(rr, netfd); /* dump the old socket, here's our new one */
355 rr = getsockname(netfd, &ouraddr->sa, &ouraddr->len);
372 rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x);
419 rr = write(netfd, bigbuf_in, 1);
440 rr = write(netfd, bigbuf_in, 1);
524 FD_SET(netfd, &ding1); /* global: the net is open */
533 while (FD_ISSET(netfd, &ding1)) { /* i.e. till the *net* closes! */
546 /* highest possible fd is netfd (3) */
547 rr = select(netfd+1, &ding2, NULL, NULL, &tmp_timer);
549 rr = select(netfd+1, &ding2, NULL, NULL, NULL);
552 close(netfd);
563 close(netfd);
569 if (FD_ISSET(netfd, &ding2)) { /* net: ding! */
570 rr = read(netfd, bigbuf_net, BIGSIZ);
576 FD_CLR(netfd, &ding1); /* net closed, we'll finish up... */
634 rr = write(netfd, zp, rr); /* one line, or the whole buffer */
653 } /* while ding1:netfd is open */
655 close(netfd);
748 xmove_fd(x, netfd);
749 setsockopt_reuseaddr(netfd);
751 socket_want_pktinfo(netfd);
752 xbind(netfd, &ouraddr->sa, ouraddr->len);
786 x = connect_w_timeout(netfd);