]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-address-label.h
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / src / network / networkd-address-label.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
95b74ef6
SS
2#pragma once
3
4/***
96b2fb93 5 Copyright © 2017 Susant Sahani
95b74ef6
SS
6***/
7
8#include <inttypes.h>
9#include <stdbool.h>
10
a2106925 11#include "conf-parser.h"
95b74ef6
SS
12#include "in-addr-util.h"
13
14typedef struct AddressLabel AddressLabel;
15
16#include "networkd-link.h"
17#include "networkd-network.h"
18
19typedef struct Network Network;
20typedef struct Link Link;
21typedef struct NetworkConfigSection NetworkConfigSection;
22
23struct AddressLabel {
24 Network *network;
25 Link *link;
26 NetworkConfigSection *section;
27
95b74ef6
SS
28 unsigned char prefixlen;
29 uint32_t label;
30
31 union in_addr_union in_addr;
32
33 LIST_FIELDS(AddressLabel, labels);
34};
35
36int address_label_new(AddressLabel **ret);
37void address_label_free(AddressLabel *label);
38
39DEFINE_TRIVIAL_CLEANUP_FUNC(AddressLabel*, address_label_free);
95b74ef6
SS
40
41int address_label_configure(AddressLabel *address, Link *link, sd_netlink_message_handler_t callback, bool update);
42
a2106925
LP
43CONFIG_PARSER_PROTOTYPE(config_parse_address_label);
44CONFIG_PARSER_PROTOTYPE(config_parse_address_label_prefix);