summaryrefslogtreecommitdiff
path: root/src/headers
diff options
context:
space:
mode:
Diffstat (limited to 'src/headers')
-rw-r--r--src/headers/ip46-with13
-rw-r--r--src/headers/ip46-without13
2 files changed, 26 insertions, 0 deletions
diff --git a/src/headers/ip46-with b/src/headers/ip46-with
index 14ac5bd..29f0dd0 100644
--- a/src/headers/ip46-with
+++ b/src/headers/ip46-with
@@ -13,8 +13,21 @@ typedef ip46full ip46, *ip46_ref ;
#define socket_connect46(s, i, port) ((i)->is6 ? socket_connect6(s, (i)->ip, port) : socket_connect4(s, (i)->ip, port))
#define socket_bind46(s, i, port) ((i)->is6 ? socket_bind6(s, (i)->ip, port) : socket_bind4(s, (i)->ip, port))
#define socket_bind46_reuse(s, i, port) ((i)->is6 ? socket_bind6_reuse(s, (i)->ip, port) : socket_bind4_reuse(s, (i)->ip, port))
+
#define socket_tcp46(h) ((h) ? socket_tcp6() : socket_tcp4())
+#define socket_tcp46_b(h) ((h) ? socket_tcp6_b() : socket_tcp4_b())
+#define socket_tcp46_nb(h) ((h) ? socket_tcp6_nb() : socket_tcp4_nb())
+#define socket_tcp46_coe(h) ((h) ? socket_tcp6_coe() : socket_tcp4_coe())
+#define socket_tcp46_nbcoe(h) ((h) ? socket_tcp6_nbcoe() : socket_tcp4_nbcoe())
+#define socket_tcp46_internal(h, flags) ((h) ? socket_tcp6_internal(flags) : socket_tcp4_internal(flags))
+
#define socket_udp46(h) ((h) ? socket_udp6() : socket_udp4())
+#define socket_udp46_b(h) ((h) ? socket_udp6_b() : socket_udp4_b())
+#define socket_udp46_nb(h) ((h) ? socket_udp6_nb() : socket_udp4_nb())
+#define socket_udp46_coe(h) ((h) ? socket_udp6_coe() : socket_udp4_coe())
+#define socket_udp46_nbcoe(h) ((h) ? socket_udp6_nbcoe() : socket_udp4_nbcoe())
+#define socket_udp46_internal(h, flags) ((h) ? socket_udp6_internal(flags) : socket_udp4_internal(flags))
+
#define socket_recv46(fd, s, len, i, port) ((i)->is6 ? socket_recv6(fd, s, len, (i)->ip, port) : socket_recv4(fd, s, len, (i)->ip, port))
#define socket_send46(fd, s, len, i, port) ((i)->is6 ? socket_send6(fd, s, len, (i)->ip, port) : socket_send4(fd, s, len, (i)->ip, port))
extern int socket_local46 (int, ip46 *, uint16_t *) ;
diff --git a/src/headers/ip46-without b/src/headers/ip46-without
index 43d3038..9d224e1 100644
--- a/src/headers/ip46-without
+++ b/src/headers/ip46-without
@@ -17,8 +17,21 @@ struct ip46_s
#define socket_connect46(s, i, port) socket_connect4(s, (i)->ip, port)
#define socket_bind46(s, i, port) socket_bind4(s, (i)->ip, port)
#define socket_bind46_reuse(s, i, port) socket_bind4_reuse(s, (i)->ip, port)
+
#define socket_tcp46(h) socket_tcp4()
+#define socket_tcp46_b(h) socket_tcp4_b()
+#define socket_tcp46_nb(h) socket_tcp4_nb()
+#define socket_tcp46_coe(h) socket_tcp4_coe()
+#define socket_tcp46_nbcoe(h) socket_tcp4_nbcoe()
+#define socket_tcp46_internal(h, flags) socket_tcp4_internal(flags)
+
#define socket_udp46(h) socket_udp4()
+#define socket_udp46_b(h) socket_udp4_b()
+#define socket_udp46_nb(h) socket_udp4_nb()
+#define socket_udp46_coe(h) socket_udp4_coe()
+#define socket_udp46_nbcoe(h) socket_udp4_nbcoe()
+#define socket_udp46_internal(h, flags) socket_udp4_internal(flags)
+
#define socket_recv46(fd, s, len, i, port) socket_recv4(fd, s, len, (i)->ip, port)
#define socket_send46(fd, s, len, i, port) socket_send4(fd, s, len, (i)->ip, port)
#define socket_local46(fd, i, port) socket_local4(fd, (i)->ip, port)