network: cleanup headers included in networkd-nexthop.h
This commit is contained in:
parent
b82663ddee
commit
75156ccbdc
|
@ -32,6 +32,7 @@
|
|||
#include "networkd-manager.h"
|
||||
#include "networkd-ndisc.h"
|
||||
#include "networkd-neighbor.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "networkd-sriov.h"
|
||||
#include "networkd-radv.h"
|
||||
#include "networkd-routing-policy-rule.h"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "networkd-manager-bus.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "networkd-network-bus.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "networkd-routing-policy-rule.h"
|
||||
#include "networkd-speed-meter.h"
|
||||
#include "ordered-set.h"
|
||||
|
|
|
@ -15,6 +15,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
|
|||
#include "networkd-ipv4ll.h"
|
||||
#include "networkd-ndisc.h"
|
||||
#include "networkd-network.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "networkd-routing-policy-rule.h"
|
||||
#include "networkd-sriov.h"
|
||||
#include "qdisc.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "network-internal.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "networkd-network.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "networkd-routing-policy-rule.h"
|
||||
#include "networkd-sriov.h"
|
||||
#include "parse-util.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "networkd-mdb.h"
|
||||
#include "networkd-ndisc.h"
|
||||
#include "networkd-neighbor.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "networkd-radv.h"
|
||||
#include "networkd-route.h"
|
||||
#include "networkd-util.h"
|
||||
|
|
|
@ -5,19 +5,18 @@
|
|||
#include <linux/nexthop.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-parser.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "netlink-util.h"
|
||||
#include "networkd-link.h"
|
||||
#include "networkd-manager.h"
|
||||
#include "networkd-network.h"
|
||||
#include "networkd-nexthop.h"
|
||||
#include "parse-util.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
void nexthop_free(NextHop *nexthop) {
|
||||
NextHop *nexthop_free(NextHop *nexthop) {
|
||||
if (!nexthop)
|
||||
return;
|
||||
return NULL;
|
||||
|
||||
if (nexthop->network) {
|
||||
assert(nexthop->section);
|
||||
|
@ -31,7 +30,7 @@ void nexthop_free(NextHop *nexthop) {
|
|||
set_remove(nexthop->link->nexthops_foreign, nexthop);
|
||||
}
|
||||
|
||||
free(nexthop);
|
||||
return mfree(nexthop);
|
||||
}
|
||||
|
||||
DEFINE_NETWORK_SECTION_FUNCTIONS(NextHop, nexthop_free);
|
||||
|
|
|
@ -4,16 +4,19 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct NextHop NextHop;
|
||||
typedef struct NetworkConfigSection NetworkConfigSection;
|
||||
|
||||
#include "networkd-network.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "networkd-util.h"
|
||||
|
||||
struct NextHop {
|
||||
typedef struct Link Link;
|
||||
typedef struct Manager Manager;
|
||||
typedef struct Network Network;
|
||||
|
||||
typedef struct NextHop {
|
||||
Network *network;
|
||||
NetworkConfigSection *section;
|
||||
|
||||
|
@ -26,15 +29,14 @@ struct NextHop {
|
|||
uint32_t id;
|
||||
|
||||
union in_addr_union gw;
|
||||
};
|
||||
} NextHop;
|
||||
|
||||
void nexthop_free(NextHop *nexthop);
|
||||
NextHop *nexthop_free(NextHop *nexthop);
|
||||
int nexthop_section_verify(NextHop *nexthop);
|
||||
|
||||
int link_set_nexthop(Link *link);
|
||||
|
||||
int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, Manager *m);
|
||||
|
||||
int nexthop_section_verify(NextHop *nexthop);
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_id);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_nexthop_gateway);
|
||||
|
|
Loading…
Reference in New Issue