1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
7 This file is part of nss-myhostname.
9 Copyright 2008-2011 Lennart Poettering
11 nss-myhostname is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public License
13 as published by the Free Software Foundation; either version 2.1 of
14 the License, or (at your option) any later version.
16 nss-myhostname is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public
22 License along with nss-myhostname; If not, see
23 <http://www.gnu.org/licenses/>.
27 #include <sys/types.h>
37 int netlink_acquire_addresses(struct address **_list, unsigned *_n_list);
39 static inline size_t PROTO_ADDRESS_SIZE(int proto) {
40 assert(proto == AF_INET || proto == AF_INET6);
42 return proto == AF_INET6 ? 16 : 4;