diff options
| author | Roy Marples <roy@marples.name> | 2016-04-07 20:35:57 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-04-07 20:35:57 +0000 |
| commit | d306a8f2df27b629cac51cd6df648262046dcd20 (patch) | |
| tree | 4260a01b6cd62f96c647a781b9cb1941c528f649 /if.h | |
| parent | 0480237e31fb49330bc5d547e1bb863bb94b94d9 (diff) | |
| download | dhcpcd-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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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. |
