changeset 5170:8c6a66d852f4 draft

This should really be sa_family_t.
author Roy Marples <roy@marples.name>
date Fri, 24 Apr 2020 12:23:05 +0100
parents f1a2ce25a64b
children 5943646f9dd3
files src/control.c src/control.h src/dhcpcd.c
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/control.c	Thu Apr 23 23:45:38 2020 +0100
+++ b/src/control.c	Fri Apr 24 12:23:05 2020 +0100
@@ -193,7 +193,7 @@
 }
 
 static int
-make_sock(struct sockaddr_un *sa, const char *ifname, uint16_t family,
+make_sock(struct sockaddr_un *sa, const char *ifname, sa_family_t family,
     bool unpriv)
 {
 	int fd;
@@ -230,7 +230,7 @@
 #define S_UNPRIV (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
 
 static int
-control_start1(struct dhcpcd_ctx *ctx, const char *ifname, uint16_t family,
+control_start1(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family,
     mode_t fmode)
 {
 	struct sockaddr_un sa;
@@ -261,7 +261,7 @@
 }
 
 int
-control_start(struct dhcpcd_ctx *ctx, const char *ifname, uint16_t family)
+control_start(struct dhcpcd_ctx *ctx, const char *ifname, sa_family_t family)
 {
 	int fd;
 
@@ -337,7 +337,7 @@
 }
 
 int
-control_open(const char *ifname, uint16_t family, bool unpriv)
+control_open(const char *ifname, sa_family_t family, bool unpriv)
 {
 	struct sockaddr_un sa;
 	int fd;
--- a/src/control.h	Thu Apr 23 23:45:38 2020 +0100
+++ b/src/control.h	Fri Apr 24 12:23:05 2020 +0100
@@ -66,9 +66,9 @@
 #define FD_LISTEN	(1<<0)
 #define FD_UNPRIV	(1<<1)
 
-int control_start(struct dhcpcd_ctx *, const char *, uint16_t);
+int control_start(struct dhcpcd_ctx *, const char *, sa_family_t);
 int control_stop(struct dhcpcd_ctx *);
-int control_open(const char *, uint16_t, bool);
+int control_open(const char *, sa_family_t, bool);
 ssize_t control_send(struct dhcpcd_ctx *, int, char * const *);
 int control_queue(struct fd_list *, void *, size_t, bool);
 
--- a/src/dhcpcd.c	Thu Apr 23 23:45:38 2020 +0100
+++ b/src/dhcpcd.c	Fri Apr 24 12:23:05 2020 +0100
@@ -1751,7 +1751,7 @@
 	struct ifaddrs *ifaddrs = NULL;
 	struct if_options *ifo;
 	struct interface *ifp;
-	uint16_t family = AF_UNSPEC;
+	sa_family_t family = AF_UNSPEC;
 	int opt, oi = 0, i;
 	unsigned int logopts, t;
 	ssize_t len;