diff options
| author | Roy Marples <roy@marples.name> | 2020-01-15 14:28:24 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-01-15 14:28:24 +0000 |
| commit | 68f04fa827830e894559ba42461d86e0d8bd7b47 (patch) | |
| tree | 8bbadd0bf18d911402270bffeec30288a1635129 /src/if.h | |
| parent | 727ac8afce72b12d9ace53928b2586f718d88392 (diff) | |
| download | dhcpcd-68f04fa827830e894559ba42461d86e0d8bd7b47.tar.xz | |
Implement Anonymity Profiles for DHCP Clients, RFC 7844
This works by randomising the hardware address when carrier is down
and using this to construct a DUID LL which is used over any saved
DUID. IAID is defaulted to zero and hostname + FQDN are disabled.
Then every possible option is masked out except for essential ones.
It's possible to request options *after* anonymous option which
will enable it. This is RFC compliant and allows 100% flexability
in letting the user decide what, if any, details leek out.
This is disabled by default.
Only works on NetBSD, other OS coming shortly.
Diffstat (limited to 'src/if.h')
| -rw-r--r-- | src/if.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -121,9 +121,10 @@ int if_getsubnet(struct dhcpcd_ctx *, const char *, int, void *, size_t); #endif int if_ioctl(struct dhcpcd_ctx *, ioctl_request_t, void *, size_t); -int if_getflags(struct interface *ifp); -int if_setflag(struct interface *ifp, short flag); -#define if_up(ifp) if_setflag((ifp), (IFF_UP | IFF_RUNNING)) +int if_getflags(struct interface *); +int if_setflag(struct interface *, short, short); +#define if_up(ifp) if_setflag((ifp), (IFF_UP | IFF_RUNNING), 0) +#define if_down(ifp) if_setflag((ifp), 0, IFF_UP); bool if_valid_hwaddr(const uint8_t *, size_t); struct if_head *if_discover(struct dhcpcd_ctx *, struct ifaddrs **, int, char * const *); @@ -171,6 +172,8 @@ int if_opensockets_os(struct dhcpcd_ctx *); void if_closesockets(struct dhcpcd_ctx *); void if_closesockets_os(struct dhcpcd_ctx *); int if_handlelink(struct dhcpcd_ctx *); +int if_randomisemac(struct interface *); +int if_setmac(struct interface *ifp, void *, uint8_t); /* dhcpcd uses the same routing flags as BSD. * If the platform doesn't use these flags, |
