ip46-without (1609B)
1 typedef struct ip46_s ip46, *ip46_ref ; 2 struct ip46_s 3 { 4 char ip[4] ; 5 } ; 6 #define IP46_ZERO { .ip = "\0\0\0" } 7 8 #undef SKALIBS_IPV6_ENABLED 9 #define SKALIBS_IP_SIZE 4 10 #define ip46_is6(ip) 0 11 #define ip46_fmt(s, i) ip4_fmt(s, (i)->ip) 12 #define ip46_scan(s, i) ip4_scan(s, (i)->ip) 13 #define ip46_scanlist(out, max, s, num) ip4_scanlist((out)->ip, max, s, num) 14 #define ip46_from_ip4(i, ip4) (memmove((i)->ip, (ip4), 4), 1) 15 #define ip46_from_ip6(i, ip6) (errno = ENOSYS, 0) 16 17 #define socket_connect46(s, i, port) socket_connect4(s, (i)->ip, port) 18 #define socket_bind46(s, i, port) socket_bind4(s, (i)->ip, port) 19 #define socket_bind46_reuse(s, i, port) socket_bind4_reuse(s, (i)->ip, port) 20 21 #define socket_tcp46(h) socket_tcp4() 22 #define socket_tcp46_b(h) socket_tcp4_b() 23 #define socket_tcp46_nb(h) socket_tcp4_nb() 24 #define socket_tcp46_coe(h) socket_tcp4_coe() 25 #define socket_tcp46_nbcoe(h) socket_tcp4_nbcoe() 26 #define socket_tcp46_internal(h, flags) socket_tcp4_internal(flags) 27 28 #define socket_udp46(h) socket_udp4() 29 #define socket_udp46_b(h) socket_udp4_b() 30 #define socket_udp46_nb(h) socket_udp4_nb() 31 #define socket_udp46_coe(h) socket_udp4_coe() 32 #define socket_udp46_nbcoe(h) socket_udp4_nbcoe() 33 #define socket_udp46_internal(h, flags) socket_udp4_internal(flags) 34 35 #define socket_send46(fd, s, len, i, port) socket_send4(fd, s, len, (i)->ip, port) 36 #define socket_local46(fd, i, port) socket_local4(fd, (i)->ip, port) 37 #define socket_remote46(fd, i, port) socket_remote4(fd, (i)->ip, port) 38 39 #define socket_sendnb46(fd, buf, len, i, port, deadline, stamp) socket_sendnb4(fd, buf, len, (i)->ip, port, deadline, stamp)