networkd.h revision a245ced0d7b0af9ae5438d978e24183672a0a4d9
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering/***
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering This file is part of systemd.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Copyright 2013 Tom Gundersen <teg@jklm.no>
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering systemd is free software; you can redistribute it and/or modify it
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering under the terms of the GNU Lesser General Public License as published by
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering (at your option) any later version.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering systemd is distributed in the hope that it will be useful, but
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Lesser General Public License for more details.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering You should have received a copy of the GNU Lesser General Public License
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering***/
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
8bdbb8d9cbe1d35708385573d70984ab4533812dLennart Poettering#pragma once
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include <arpa/inet.h>
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "sd-event.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "sd-rtnl.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "sd-bus.h"
04d39279245834494baccfdb9349db8bf80abd13Lennart Poettering#include "sd-dhcp-client.h"
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering#include "sd-dhcp-server.h"
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering#include "sd-ipv4ll.h"
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering#include "sd-icmp6-nd.h"
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poettering#include "sd-dhcp6-client.h"
f2cbe59e113f08549949a76ac5b9b3972df4cc30Lennart Poettering#include "udev.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "sd-lldp.h"
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "rtnl-util.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "hashmap.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "list.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#include "set.h"
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen#include "condition.h"
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen#include "in-addr-util.h"
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering#define DHCP_ROUTE_METRIC 1024
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering#define IPV4LL_ROUTE_METRIC 2048
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering
04d39279245834494baccfdb9349db8bf80abd13Lennart Poetteringtypedef struct NetDev NetDev;
023fb90b83871a15ef7f57e8cd126e3426f99b9eLennart Poetteringtypedef struct Network Network;
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poetteringtypedef struct Link Link;
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poetteringtypedef struct Address Address;
f2cbe59e113f08549949a76ac5b9b3972df4cc30Lennart Poetteringtypedef struct Route Route;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poetteringtypedef struct Manager Manager;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringtypedef struct AddressPool AddressPool;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringtypedef struct FdbEntry FdbEntry;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringtypedef enum AddressFamilyBoolean {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering /* This is a bitmask, though it usually doesn't feel that way! */
e56056e93d33619a3acf13e483900b4f8938228fThomas Hindoe Paaboel Andersen ADDRESS_FAMILY_NO = 0,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering ADDRESS_FAMILY_IPV4 = 1,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering ADDRESS_FAMILY_IPV6 = 2,
d21ed1ead18d16d35c30299a69d3366847f8a039Lennart Poettering ADDRESS_FAMILY_YES = 3,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering _ADDRESS_FAMILY_BOOLEAN_MAX,
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poettering _ADDRESS_FAMILY_BOOLEAN_INVALID = -1,
785890acf6d629ff881a1f065f431df1b7fc8c7aLennart Poettering} AddressFamilyBoolean;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringtypedef enum LLMNRSupport {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering LLMNR_SUPPORT_NO,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering LLMNR_SUPPORT_YES,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering LLMNR_SUPPORT_RESOLVE,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering _LLMNR_SUPPORT_MAX,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering _LLMNR_SUPPORT_INVALID = -1,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering} LLMNRSupport;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringtypedef enum LinkOperationalState {
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering LINK_OPERSTATE_OFF,
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering LINK_OPERSTATE_NO_CARRIER,
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen LINK_OPERSTATE_DORMANT,
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen LINK_OPERSTATE_CARRIER,
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen LINK_OPERSTATE_DEGRADED,
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering LINK_OPERSTATE_ROUTABLE,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering _LINK_OPERSTATE_MAX,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering _LINK_OPERSTATE_INVALID = -1
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering} LinkOperationalState;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering
56159e0d918e9a9be07988133bb2847779325de0Lennart Poetteringstruct FdbEntry {
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Network *network;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering unsigned section;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen struct ether_addr *mac_addr;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen uint16_t vlan_id;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen LIST_FIELDS(FdbEntry, static_fdb_entries);
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen};
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersenstruct Network {
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen Manager *manager;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen char *filename;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering char *name;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering struct ether_addr *match_mac;
e56056e93d33619a3acf13e483900b4f8938228fThomas Hindoe Paaboel Andersen char **match_path;
e56056e93d33619a3acf13e483900b4f8938228fThomas Hindoe Paaboel Andersen char **match_driver;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering char **match_type;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen char **match_name;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
5b30bef856e89a571df57b7b953e9a1409d9acedLennart Poettering Condition *match_host;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Condition *match_virt;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen Condition *match_kernel;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering Condition *match_arch;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering char *description;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering NetDev *bridge;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen NetDev *bond;
5b30bef856e89a571df57b7b953e9a1409d9acedLennart Poettering Hashmap *stacked_netdevs;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen AddressFamilyBoolean dhcp;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen char *dhcp_vendor_class_identifier;
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen bool dhcp_dns;
5b30bef856e89a571df57b7b953e9a1409d9acedLennart Poettering bool dhcp_ntp;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering bool dhcp_mtu;
e56056e93d33619a3acf13e483900b4f8938228fThomas Hindoe Paaboel Andersen bool dhcp_hostname;
e56056e93d33619a3acf13e483900b4f8938228fThomas Hindoe Paaboel Andersen bool dhcp_domains;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering bool dhcp_sendhost;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering bool dhcp_broadcast;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering bool dhcp_critical;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering bool dhcp_routes;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned dhcp_route_metric;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering AddressFamilyBoolean link_local;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering bool ipv4ll_route;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering union in_addr_union ipv6_token;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering bool dhcp_server;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned cost;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering AddressFamilyBoolean ip_forward;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering bool ip_masquerade;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering struct ether_addr *mac;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned mtu;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering bool lldp;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering LIST_HEAD(Address, static_addresses);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_HEAD(Route, static_routes);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_HEAD(FdbEntry, static_fdb_entries);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering Hashmap *addresses_by_section;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering Hashmap *routes_by_section;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering Hashmap *fdb_entries_by_section;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering bool wildcard_domain;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering char **domains, **dns, **ntp;
56159e0d918e9a9be07988133bb2847779325de0Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LLMNRSupport llmnr;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_FIELDS(Network, networks);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering};
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringstruct Address {
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering Network *network;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned section;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering int family;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned char prefixlen;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned char scope;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned char flags;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering char *label;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering struct in_addr broadcast;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering struct ifa_cacheinfo cinfo;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering union in_addr_union in_addr;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering union in_addr_union in_addr_peer;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering bool ip_masquerade_done;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_FIELDS(Address, addresses);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering};
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringstruct Route {
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering Network *network;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned section;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering int family;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned char dst_prefixlen;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering unsigned char src_prefixlen;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering unsigned char scope;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering uint32_t metrics;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering unsigned char protocol; /* RTPROT_* */
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering union in_addr_union in_addr;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering union in_addr_union dst_addr;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering union in_addr_union src_addr;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering union in_addr_union prefsrc_addr;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering LIST_FIELDS(Route, routes);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering};
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poetteringstruct AddressPool {
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering Manager *manager;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering int family;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering unsigned prefixlen;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering union in_addr_union in_addr;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering LIST_FIELDS(AddressPool, address_pools);
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering};
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringstruct Manager {
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_rtnl *rtnl;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_event *event;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_event_source *bus_retry_event_source;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_bus *bus;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_bus_slot *prepare_for_sleep_slot;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering struct udev *udev;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering struct udev_monitor *udev_monitor;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering sd_event_source *udev_event_source;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering bool enumerating;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
6389e747d5b09b18e00d85b9b13c1be2ff884015Lennart Poettering char *state_file;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering LinkOperationalState operational_state;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering Hashmap *links;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering Hashmap *netdevs;
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering Hashmap *networks_by_name;
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_HEAD(Network, networks);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering LIST_HEAD(AddressPool, address_pools);
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering usec_t network_dirs_ts_usec;
8937e7b68940d0fa0d0aab90eb7425fa7dccebc9Lennart Poettering};
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringextern const char* const network_dirs[];
8937e7b68940d0fa0d0aab90eb7425fa7dccebc9Lennart Poettering
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering/* Manager */
10f9c75519671e7c7ab8993b54fe22da7c2d0c38Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringextern const sd_bus_vtable manager_vtable[];
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringint manager_new(Manager **ret);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringvoid manager_free(Manager *m);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringint manager_connect_bus(Manager *m);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringint manager_run(Manager *m);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringint manager_load_config(Manager *m);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringbool manager_should_reload(Manager *m);
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poettering
cd61c3bfd718fb398cc53ced906266a9297782c9Lennart Poetteringint manager_rtnl_enumerate_links(Manager *m);
89f7c8465cd1ab37347dd0c15920bce31e8225dfLennart Poetteringint manager_rtnl_enumerate_addresses(Manager *m);
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersenint manager_send_changed(Manager *m, const char *property, ...) _sentinel_;
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint manager_save(Manager *m);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering#define _cleanup_manager_free_ _cleanup_(manager_freep)
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering/* Network */
d21ed1ead18d16d35c30299a69d3366847f8a039Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint network_load(Manager *manager);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringvoid network_free(Network *network);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering#define _cleanup_network_free_ _cleanup_(network_freep)
a7893c6b28772edbc7e1fea3c209caa54d465648Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint network_get_by_name(Manager *manager, const char *name, Network **ret);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint network_get(Manager *manager, struct udev_device *device,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *ifname, const struct ether_addr *mac,
89f7c8465cd1ab37347dd0c15920bce31e8225dfLennart Poettering Network **ret);
a7893c6b28772edbc7e1fea3c209caa54d465648Lennart Poetteringint network_apply(Manager *manager, Network *network, Link *link);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersenint config_parse_netdev(const char *unit, const char *filename, unsigned line,
a7893c6b28772edbc7e1fea3c209caa54d465648Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint config_parse_domains(const char *unit,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *filename,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering unsigned line,
a7893c6b28772edbc7e1fea3c209caa54d465648Lennart Poettering const char *section,
5b30bef856e89a571df57b7b953e9a1409d9acedLennart Poettering unsigned section_line,
5b30bef856e89a571df57b7b953e9a1409d9acedLennart Poettering const char *lvalue,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering int ltype,
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering const char *rvalue,
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering void *data,
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering void *userdata);
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poetteringint config_parse_tunnel(const char *unit,
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering const char *filename,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering unsigned line,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *section,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering unsigned section_line,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *lvalue,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering int ltype,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *rvalue,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering void *data,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering void *userdata);
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poetteringint config_parse_tunnel_address(const char *unit,
9d12709626bccc0cae677a7035f62efe6aabb4abLennart Poettering const char *filename,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering unsigned line,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering const char *section,
aa1936ea1a89c2bb968ba33e3274898a4eeae771Lennart Poettering unsigned section_line,
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering const char *lvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering int ltype,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *rvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering void *data,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering void *userdata);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint config_parse_vxlan_group_address(const char *unit,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *filename,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering unsigned line,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *section,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering unsigned section_line,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *lvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering int ltype,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *rvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering void *data,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering void *userdata);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringextern const sd_bus_vtable network_vtable[];
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint network_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error);
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poetteringint network_object_find(sd_bus *bus, const char *path, const char *interface, void *userdata, void **found, sd_bus_error *error);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering/* gperf */
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringconst struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poettering/* Route */
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint route_new_static(Network *network, unsigned section, Route **ret);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint route_new_dynamic(Route **ret, unsigned char rtm_protocol);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringvoid route_free(Route *route);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint route_configure(Route *route, Link *link, sd_rtnl_message_handler_t callback);
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56aLennart Poetteringint route_drop(Route *route, Link *link, sd_rtnl_message_handler_t callback);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(Route*, route_free);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering#define _cleanup_route_free_ _cleanup_(route_freep)
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint config_parse_gateway(const char *unit, const char *filename, unsigned line,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poetteringint config_parse_destination(const char *unit, const char *filename, unsigned line,
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering const char *section, unsigned section_line, const char *lvalue,
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint config_parse_route_priority(const char *unit, const char *filename, unsigned line,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint config_parse_route_scope(const char *unit, const char *filename, unsigned line,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poettering/* Address */
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_new_static(Network *network, unsigned section, Address **ret);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_new_dynamic(Address **ret);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringvoid address_free(Address *address);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_configure(Address *address, Link *link, sd_rtnl_message_handler_t callback);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_update(Address *address, Link *link, sd_rtnl_message_handler_t callback);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_drop(Address *address, Link *link, sd_rtnl_message_handler_t callback);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_establish(Address *address, Link *link);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringint address_release(Address *address, Link *link);
878cd7e95ca303f9851d227a22d2022bd49944b0Lennart Poetteringbool address_equal(Address *a1, Address *a2);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering#define _cleanup_address_free_ _cleanup_(address_freep)
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_address(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_broadcast(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_label(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering/* Forwarding database table. */
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint fdb_entry_configure(Link *const link, FdbEntry *const fdb_entry);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringvoid fdb_entry_free(FdbEntry *fdb_entry);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint fdb_entry_new_static(Network *const network, const unsigned section, FdbEntry **ret);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart PoetteringDEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering#define _cleanup_fdbentry_free_ _cleanup_(fdb_entry_freep)
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_fdb_hwaddr(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_fdb_vlan_id(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering/* DHCP support */
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_dhcp(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering/* IPv4LL support (legacy) */
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poetteringint config_parse_ipv4ll(const char *unit, const char *filename, unsigned line,
717603e391b52983ca1fd218e7333a1b9dfc5c05Lennart Poettering const char *section, unsigned section_line, const char *lvalue,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering/* IPv6 support */
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sieversint config_parse_token(const char *unit, const char *filename, unsigned line,
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers const char *section, unsigned section_line, const char *lvalue,
89f7c8465cd1ab37347dd0c15920bce31e8225dfLennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
9f6eb1cd58f2ddf2eb6ba0e4de056e13d938af75Kay Sievers
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering/* LLMNR support */
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poetteringconst char* llmnr_support_to_string(LLMNRSupport i) _const_;
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart PoetteringLLMNRSupport llmnr_support_from_string(const char *s) _pure_;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringint config_parse_llmnr(const char *unit, const char *filename, unsigned line,
a1da85830bfaa77b9eb9c54693e5573559c97e50Tom Gundersen const char *section, unsigned section_line, const char *lvalue,
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering int ltype, const char *rvalue, void *data, void *userdata);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering/* Address Pool */
f48e75cb9a8112d35855c44a156934f2ee0edb2eLennart Poettering
56159e0d918e9a9be07988133bb2847779325de0Lennart Poetteringint address_pool_new(Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringint address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringvoid address_pool_free(AddressPool *p);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringint address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringconst char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_;
1ee306e1248866617c96ed9f4263f375588ad838Lennart PoetteringAddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringint config_parse_address_family_boolean(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);
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering/* Opeartional State */
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poetteringconst char* link_operstate_to_string(LinkOperationalState s) _const_;
1ee306e1248866617c96ed9f4263f375588ad838Lennart PoetteringLinkOperationalState link_operstate_from_string(const char *s) _pure_;
1ee306e1248866617c96ed9f4263f375588ad838Lennart Poettering