int avahi_open_socket_ipv4(int no_reuse) {
struct sockaddr_in local;
- int fd = -1, r;
+ int fd = -1, r, ittl;
uint8_t ttl, cyes;
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
goto fail;
}
- ttl = 255;
- if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) {
+ ittl = 255;
+ if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ittl, sizeof(ittl)) < 0) {
avahi_log_warn("IP_TTL failed: %s", strerror(errno));
goto fail;
}
msg.msg_control = cmsg_data;
msg.msg_controllen = sizeof(cmsg_data);
}
+#else
+#ifdef __GNUC__
+#warning "FIXME: We need some code to set the outgoing interface here if IP_PKTINFO is not available"
+#endif
#endif
-
- /** FIXME: We need some code to set the outgoing interface here if
- * IP_PKTINFO is not available */
return sendmsg_loop(fd, &msg, 0);
}
uint8_t aux[64];
ssize_t l;
int ms;
-
struct cmsghdr *cmsg;
int found_ttl = 0, found_iface = 0;