summaryrefslogtreecommitdiff
path: root/sockaddr.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-01-12 20:37:15 +0000
committerEric S. Raymond <esr@thyrsus.com>2010-01-12 20:37:15 +0000
commit2be1944bcad39401633321ca2d3526f972d83d55 (patch)
tree18d74ff8791de0a3ea926a3fb049993e3fbfe227 /sockaddr.h
parentda43ae4070286f4e8ab60e048893defe5cd48589 (diff)
downloadgpsd-2be1944bcad39401633321ca2d3526f972d83d55.tar.gz
splint cleanup of IPv6 support.
Diffstat (limited to 'sockaddr.h')
-rw-r--r--sockaddr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sockaddr.h b/sockaddr.h
new file mode 100644
index 00000000..61866d09
--- /dev/null
+++ b/sockaddr.h
@@ -0,0 +1,9 @@
+/* klugey def'n of a socket address struct helps hide IPV4 vs. IPV6 ugliness */
+
+typedef union sockaddr_u {
+ struct sockaddr sa;
+ struct sockaddr_in sa_in;
+ struct sockaddr_in6 sa_in6;
+} sockaddr_t;
+
+/* sockaddr.h ends here */