Home | History | Annotate | Download | only in iputils

Lines Matching refs:pset

565 	struct pollfd pset[2];
612 pset[0].fd = socket(PF_PACKET, SOCK_DGRAM, 0);
618 if (ioctl(pset[0].fd, SIOCGIFINDEX, &ifr)) {
625 pset[1].fd = -1;
627 pset[1].fd = socket(PF_PACKET, SOCK_DGRAM, 0);
628 if (pset[1].fd >= 0) {
629 load_arp_bpflet(pset[1].fd);
634 if (pset[1].fd >= 0) {
640 if (bind(pset[1].fd, (struct sockaddr*)&sll, sizeof(sll)) < 0) {
641 close(pset[1].fd);
642 pset[1].fd = -1;
646 if (pset[0].fd >= 0) {
652 if (bind(pset[0].fd, (struct sockaddr*)&sll, sizeof(sll)) < 0) {
653 close(pset[0].fd);
654 pset[0].fd = -1;
657 if (pset[0].fd < 0) {
658 pset[0] = pset[1];
706 pset[0].events = EVENTS;
707 pset[0].revents = 0;
708 pset[1].events = EVENTS;
709 pset[1].revents = 0;
711 i = poll(pset, psize, -1);
720 if (pset[i].revents&EVENTS)
721 serve_it(pset[i].fd);