summaryrefslogtreecommitdiffstats
path: root/if.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-04-07 20:35:57 +0000
committerRoy Marples <roy@marples.name>2016-04-07 20:35:57 +0000
commitd306a8f2df27b629cac51cd6df648262046dcd20 (patch)
tree4260a01b6cd62f96c647a781b9cb1941c528f649 /if.h
parent0480237e31fb49330bc5d547e1bb863bb94b94d9 (diff)
downloaddhcpcd-d306a8f2df27b629cac51cd6df648262046dcd20.tar.xz
Linux netlink nlmsg_pid is not process id - only the first socket opened
has that. So after opening the link socket, open a persistent route socket and record the nlmsg_pid the kernel creates which is guaranteed unique and won't clash with a process id which can then be ignored by testing it directly and not that it's some large number.
Diffstat (limited to 'if.h')
-rw-r--r--if.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/if.h b/if.h
index 62de36f3..fdb73c45 100644
--- a/if.h
+++ b/if.h
@@ -101,7 +101,9 @@ int if_init(struct interface *);
int if_getssid(struct interface *);
int if_vimaster(const struct dhcpcd_ctx *ctx, const char *);
int if_opensockets(struct dhcpcd_ctx *);
-int if_openlinksocket(void);
+int if_opensockets_os(struct dhcpcd_ctx *);
+void if_closesockets(struct dhcpcd_ctx *);
+void if_closesockets_os(struct dhcpcd_ctx *);
int if_managelink(struct dhcpcd_ctx *);
/* dhcpcd uses the same routing flags as BSD.