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