1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2017 Susant Sahani
13 #include "in-addr-util.h"
15 typedef struct AddressLabel AddressLabel
;
17 #include "networkd-link.h"
18 #include "networkd-network.h"
20 typedef struct Network Network
;
21 typedef struct Link Link
;
22 typedef struct NetworkConfigSection NetworkConfigSection
;
27 NetworkConfigSection
*section
;
29 unsigned char prefixlen
;
32 union in_addr_union in_addr
;
34 LIST_FIELDS(AddressLabel
, labels
);
37 int address_label_new(AddressLabel
**ret
);
38 void address_label_free(AddressLabel
*label
);
40 DEFINE_TRIVIAL_CLEANUP_FUNC(AddressLabel
*, address_label_free
);
41 #define _cleanup_address_label_free_ _cleanup_(address_label_freep)
43 int address_label_configure(AddressLabel
*address
, Link
*link
, sd_netlink_message_handler_t callback
, bool update
);
45 int config_parse_address_label(const char *unit
, const char *filename
, unsigned line
, const char *section
, unsigned section_line
, const char *lvalue
, int ltype
, const char *rvalue
, void *data
, void *userdata
);
46 int config_parse_address_label_prefix(const char *unit
, const char *filename
, unsigned line
, const char *section
, unsigned section_line
, const char *lvalue
, int ltype
, const char *rvalue
, void *data
, void *userdata
);