Lines Matching refs:nfd
62 int nfd = -1;
177 if (nfd != -1) {
178 close(nfd);
179 nfd = -1;
210 if (nfd != -1)
211 close(nfd);
233 FD_SET(nfd, &mrd);
234 maxfd = nfd;
237 debug(2, "nfd %d lfd %d maxfd %d\n", nfd, lfd, maxfd);
243 * working on reading nfd all the time.
290 if (FD_ISSET(nfd, &rd)) {
291 n1 = recv(nfd, nbuff, sizeof(nbuff), 0);
402 nfd = socket(AF_INET, SOCK_DGRAM, 0);
403 if (nfd == -1) {
414 if (ioctl(nfd, SIOCGIFADDR, &req) == -1) {
422 if (bind(nfd, (struct sockaddr *)&req.ifr_addr,
426 close(nfd);
431 nfd = -1;
435 if (connect(nfd, (struct sockaddr *)sinp, sizeof(*sinp)) == -1) {
438 close(nfd);
443 nfd = -1;
449 return nfd;
574 n3 = send(nfd, buf, sendlen, 0);
580 debug(3, "send on %d len %d = %d\n", nfd, sendlen, n3);