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];
702 pset[0].events = EVENTS;
703 pset[0].revents = 0;
704 pset[1].events = EVENTS;
705 pset[1].revents = 0;
707 i = poll(pset, psize, -1);
716 if (pset[i].revents&EVENTS)
717 serve_it(pset[i].fd);