Lines Matching refs:sock_fd
315 int sock_fd; /* Socket for ioctl() */
318 if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0)
329 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFHWADDR);
333 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFINDEX);
337 close(sock_fd);
546 int sock_fd;
552 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
553 if (sock_fd < 0)
557 retval = bind(sock_fd, (struct sockaddr *)&(fake_p->saddr_ll),
582 retval = sendto(sock_fd, &pkt, fake_p->pkt_size, 0,
597 close(sock_fd);