int socket_get_family(int fd, int *ret);
int socket_set_recvpktinfo(int fd, int af, bool b);
int socket_set_unicast_if(int fd, int af, int ifi);
+
int socket_set_option(int fd, int af, int opt_ipv4, int opt_ipv6, int val);
static inline int socket_set_recverr(int fd, int af, bool b) {
return socket_set_option(fd, af, IP_RECVERR, IPV6_RECVERR, b);
static inline int socket_set_transparent(int fd, int af, bool b) {
return socket_set_option(fd, af, IP_TRANSPARENT, IPV6_TRANSPARENT, b);
}
+static inline int socket_set_recvfragsize(int fd, int af, bool b) {
+ return socket_set_option(fd, af, IP_RECVFRAGSIZE, IPV6_RECVFRAGSIZE, b);
+}