diff options
| author | Roy Marples <roy@marples.name> | 2016-05-18 16:23:28 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-05-18 16:23:28 +0000 |
| commit | 109146e29e2eadcff467d273018d789359fa11e1 (patch) | |
| tree | a6ecb9c14fb154091056060eb5f59abfb0baaac4 /if.h | |
| parent | 7f911ce43483c446672b18d67515f021a0fc8bf1 (diff) | |
| download | dhcpcd-109146e29e2eadcff467d273018d789359fa11e1.tar.xz | |
Rework if_address to just use an ipv4_addr structure, similar to how
if_address6 works.
Use a pointer to the ipv4_addr for the address we added for dhcp and ipv4ll
states.
This is quite some churn throughout the IPv4 stack, but makes the
binary smaller (at least on Linux/amd64).
It will be needed to support adding addresses on Solaris.
Diffstat (limited to 'if.h')
| -rw-r--r-- | if.h | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -144,14 +144,7 @@ ssize_t if_sendraw(const struct interface *, int, uint16_t, ssize_t if_readraw(struct interface *, int, void *, size_t, int *); void if_closeraw(struct interface *, int); -int if_address(const struct interface *, - const struct in_addr *, const struct in_addr *, - const struct in_addr *, int); -#define if_addaddress(ifp, addr, net, brd) \ - if_address(ifp, addr, net, brd, 1) -#define if_deladdress(ifp, addr, net) \ - if_address(ifp, addr, net, NULL, -1) - +int if_address(unsigned char, const struct ipv4_addr *); int if_addrflags(const struct in_addr *, const struct interface *); int if_route(unsigned char, const struct rt *rt); @@ -168,10 +161,7 @@ int ip6_temp_valid_lifetime(const char *ifname); #define ip6_use_tempaddr(a) (0) #endif -int if_address6(const struct ipv6_addr *, int); -#define if_addaddress6(a) if_address6(a, 1) -#define if_deladdress6(a) if_address6(a, -1) - +int if_address6(unsigned char, const struct ipv6_addr *); int if_addrflags6(const struct in6_addr *, const struct interface *); int if_getlifetime6(struct ipv6_addr *); |
