593
603
raise AvahiGroupError("State changed: %s", str(error))
596
606
"""Call the C function if_nametoindex(), or equivalent"""
600
609
if "ctypes.util" not in sys.modules:
611
613
except (OSError, AttributeError):
612
614
if "struct" not in sys.modules:
614
616
if "fcntl" not in sys.modules:
617
619
"Get an interface index the hard way, i.e. using fcntl()"
618
620
SIOCGIFINDEX = 0x8933 # From /usr/include/linux/sockios.h