+ pkti = (struct in_pktinfo*) CMSG_DATA(cmsg);
+
+ if (interface > 0)
+ pkti->ipi_ifindex = interface;
+
+ if (src_address)
+ pkti->ipi_spec_dst.s_addr = src_address->address;
+ }
+#elif defined(IP_MULTICAST_IF)
+ if (src_address) {
+ struct in_addr any = { INADDR_ANY };
+ if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, src_address ? &src_address->address : &any, sizeof(struct in_addr)) < 0) {
+ avahi_log_warn("IP_MULTICAST_IF failed: %s", strerror(errno));
+ return -1;
+ }
+ }
+#elif defined(IP_SENDSRCADDR)
+ if (src_address) {
+ struct in_addr *addr;