summaryrefslogtreecommitdiff
path: root/sysdep/unix/unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/unix.h')
-rw-r--r--sysdep/unix/unix.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h
index dcaab729..4b0fb005 100644
--- a/sysdep/unix/unix.h
+++ b/sysdep/unix/unix.h
@@ -80,6 +80,9 @@ static inline ip_addr ipa_from_sa(sockaddr *sa)
static inline struct in_addr ipa_to_in4(ip_addr a)
{ return (struct in_addr) { htonl(ipa_to_u32(a)) }; }
+static inline struct in_addr ip4_to_in4(ip4_addr a)
+{ return (struct in_addr) { htonl(ip4_to_u32(a)) }; }
+
static inline struct in6_addr ipa_to_in6(ip_addr a)
{ return (struct in6_addr) { .s6_addr32 = { htonl(_I0(a)), htonl(_I1(a)), htonl(_I2(a)), htonl(_I3(a)) } }; }