summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sockunion.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sockunion.h b/lib/sockunion.h
index 4531f620..15b97fc5 100644
--- a/lib/sockunion.h
+++ b/lib/sockunion.h
@@ -86,6 +86,8 @@ enum connect_result
#define sockunion_family(X) (X)->sa.sa_family
+#define sockunion2ip(X) (X)->sin.sin_addr.s_addr
+
/* Prototypes. */
extern int str2sockunion (const char *, union sockunion *);
extern const char *sockunion2str (union sockunion *, char *, size_t);