#include <errno.h>
#include <string.h>
#include <stdio.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
-#include <net/if.h>
#include <sys/ioctl.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <sys/uio.h>
+
#ifdef IP_RECVIF
#include <net/if_dl.h>
#endif
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;