diff options
| author | Roy Marples <roy@marples.name> | 2020-09-05 16:10:30 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-09-05 16:10:30 +0100 |
| commit | f377b643a9f4fdea14c381f462f9d80650fcccc7 (patch) | |
| tree | f7d6ca1df254a53aae66944ba466634686e9d64b /src/if.h | |
| parent | 47985cc0f14356a033fb47dc878084a088446b3e (diff) | |
| download | dhcpcd-f377b643a9f4fdea14c381f462f9d80650fcccc7.tar.xz | |
if: introduce xsocketpair, similar to xsocket
Old systems don't have SOCK_CLOEXEC, etc, this makes it easy.
While here, right limit the sockets.
Diffstat (limited to 'src/if.h')
| -rw-r--r-- | src/if.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -224,6 +224,8 @@ int if_setmac(struct interface *ifp, void *, uint8_t); #ifndef SOCK_CXNB #define SOCK_CXNB SOCK_CLOEXEC | SOCK_NONBLOCK #endif +int xsocket(int, int, int); +int xsocketpair(int, int, int, int[2]); int if_route(unsigned char, const struct rt *rt); int if_initrt(struct dhcpcd_ctx *, rb_tree_t *, int); @@ -259,7 +261,6 @@ int if_getlifetime6(struct ipv6_addr *); int if_machinearch(char *, size_t); struct interface *if_findifpfromcmsg(struct dhcpcd_ctx *, struct msghdr *, int *); -int xsocket(int, int, int); #ifdef __linux__ int if_linksocket(struct sockaddr_nl *, int, int); |
