On Sat, 20.05.06 09:12, Padraig O'Briain ([EMAIL PROTECTED]) wrote: > >A quick search with Google tells me that SIOCGLIFCONF is hwat you're > >looking for. > > > It seems that on Solaris that SIOCGIFCONF will return IPv4 addresses and > as the code I am writing will not be run on linux I will stick with > SIOCGIFCONF, at least for the present.
Hmm? But it returns *only* IPV4 addresses, doesn't it? It doesn't return interface names or IPv6 addresses, right? Both are required for Avahi. > I have noticed that AvahiHwInterface has a field called mac_address but > I have noticed where it is used. It is used in the name of the pseudo service "_workstation._tcp". > I have got to the stage where I am receiving packets but I have hot a > strange problem problem which occurs on x86 but not on sparc: > > In avahi_recv_dns_packet_ipv4 the interface number is obtained from the > message header of type IP_RECVIP. On x86 the interface number is zero. > > Can avahi work around this? Ahem. This doesn't look right to me. Perhaps there is an alternative API for this? Perhaps IP_PKTINFO or something? (like on linux) Either the local interface number or the local address the packet was recieved on is needed. The interface number is clearly preferable (because the same IP address might be assigned to more than one interface - especially when there is something like IPv4LL), but the address should work, too. Maybe, Solaris has IP_RECVADDR? Avahi can't work around this. We need some information about the interface a packet came in from to distuinguish the different networks. Otherwise this could become a security hole. This looks like something that should be fixed in the Solaris kernel, shouldn't it? Lennart -- Lennart Poettering; lennart [at] poettering [dot] net ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/ _______________________________________________ avahi mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/avahi
