X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-rtnl%2Flocal-addresses.h;fp=src%2Fnss-myhostname%2Faddresses.h;h=cc26fc479b3dd93a99c0c7ff0f61536ea768b7e1;hb=e80af1bdddbc7a51191e29b0c841e8dcafe7b1cc;hp=1bfb3579dac16c8f5e1c02162594693b7f580f71;hpb=947127ff6230b44623afec3e6aacc85f54168db2;p=elogind.git diff --git a/src/nss-myhostname/addresses.h b/src/libsystemd/sd-rtnl/local-addresses.h similarity index 81% rename from src/nss-myhostname/addresses.h rename to src/libsystemd/sd-rtnl/local-addresses.h index 1bfb3579d..cc26fc479 100644 --- a/src/nss-myhostname/addresses.h +++ b/src/libsystemd/sd-rtnl/local-addresses.h @@ -28,16 +28,10 @@ #include "socket-util.h" -struct address { +struct local_address { + int ifindex; unsigned char family, scope; union in_addr_union address; - int ifindex; }; -static inline size_t PROTO_ADDRESS_SIZE(int proto) { - assert(proto == AF_INET || proto == AF_INET6); - - return proto == AF_INET6 ? 16 : 4; -} - -int acquire_addresses(struct address **_list, unsigned *_n_list); +int local_addresses(struct local_address **ret);