mirror of
https://github.com/systemd/systemd.git
synced 2025-03-10 16:58:28 +03:00
network/route-metric: pass attribute type to conf parsers
The passed attribute type will be used later. This also - rename conf parsers, - sort gperf entries by the attr type. No functional change, just refactoring and preparation for later commits.
This commit is contained in:
parent
df8767fc8d
commit
e2126e235e
@ -192,23 +192,23 @@ Route.Metric, config_parse_route_priority,
|
||||
Route.Scope, config_parse_route_scope, 0, 0
|
||||
Route.PreferredSource, config_parse_preferred_src, 0, 0
|
||||
Route.Table, config_parse_route_table, 0, 0
|
||||
Route.MTUBytes, config_parse_route_mtu, AF_UNSPEC, 0
|
||||
Route.GatewayOnLink, config_parse_route_gateway_onlink, 0, 0
|
||||
Route.GatewayOnlink, config_parse_route_gateway_onlink, 0, 0
|
||||
Route.IPv6Preference, config_parse_ipv6_route_preference, 0, 0
|
||||
Route.Protocol, config_parse_route_protocol, 0, 0
|
||||
Route.Type, config_parse_route_type, 0, 0
|
||||
Route.TCPRetransmissionTimeoutSec, config_parse_route_tcp_rto, 0, 0
|
||||
Route.HopLimit, config_parse_route_hop_limit, 0, 0
|
||||
Route.InitialCongestionWindow, config_parse_route_tcp_window, 0, 0
|
||||
Route.InitialAdvertisedReceiveWindow, config_parse_route_tcp_window, 0, 0
|
||||
Route.TCPAdvertisedMaximumSegmentSize, config_parse_tcp_advmss, 0, 0
|
||||
Route.TCPCongestionControlAlgorithm, config_parse_tcp_congestion, 0, 0
|
||||
Route.QuickAck, config_parse_route_boolean, 0, 0
|
||||
Route.FastOpenNoCookie, config_parse_route_boolean, 0, 0
|
||||
Route.TTLPropagate, config_parse_warn_compat, DISABLED_LEGACY, 0
|
||||
Route.MultiPathRoute, config_parse_multipath_route, 0, 0
|
||||
Route.NextHop, config_parse_route_nexthop, 0, 0
|
||||
Route.MTUBytes, config_parse_route_metric_mtu, RTAX_MTU, 0
|
||||
Route.TCPAdvertisedMaximumSegmentSize, config_parse_route_metric_advmss, RTAX_ADVMSS, 0
|
||||
Route.HopLimit, config_parse_route_metric_hop_limit, RTAX_HOPLIMIT, 0
|
||||
Route.InitialCongestionWindow, config_parse_route_metric_tcp_window, RTAX_INITCWND, 0
|
||||
Route.TCPRetransmissionTimeoutSec, config_parse_route_metric_tcp_rto, RTAX_RTO_MIN, 0
|
||||
Route.InitialAdvertisedReceiveWindow, config_parse_route_metric_tcp_window, RTAX_INITRWND, 0
|
||||
Route.QuickAck, config_parse_route_metric_boolean, RTAX_QUICKACK, 0
|
||||
Route.TCPCongestionControlAlgorithm, config_parse_route_metric_tcp_congestion, RTAX_CC_ALGO, 0
|
||||
Route.FastOpenNoCookie, config_parse_route_metric_boolean, RTAX_FASTOPEN_NO_COOKIE, 0
|
||||
Route.TTLPropagate, config_parse_warn_compat, DISABLED_LEGACY, 0
|
||||
NextHop.Id, config_parse_nexthop_id, 0, 0
|
||||
NextHop.Gateway, config_parse_nexthop_gateway, 0, 0
|
||||
NextHop.Family, config_parse_nexthop_family, 0, 0
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
int config_parse_route_mtu(
|
||||
int config_parse_route_metric_mtu(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -36,7 +36,7 @@ int config_parse_route_mtu(
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = config_parse_mtu(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &route->mtu, userdata);
|
||||
r = config_parse_mtu(unit, filename, line, section, section_line, lvalue, AF_UNSPEC, rvalue, &route->mtu, userdata);
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
@ -44,7 +44,7 @@ int config_parse_route_mtu(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tcp_advmss(
|
||||
int config_parse_route_metric_advmss(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -101,7 +101,7 @@ int config_parse_tcp_advmss(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_route_hop_limit(
|
||||
int config_parse_route_metric_hop_limit(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -205,7 +205,7 @@ int config_parse_tcp_window(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_route_tcp_window(
|
||||
int config_parse_route_metric_tcp_window(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -252,7 +252,7 @@ int config_parse_route_tcp_window(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_route_tcp_rto(
|
||||
int config_parse_route_metric_tcp_rto(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -304,7 +304,7 @@ int config_parse_route_tcp_rto(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_route_boolean(
|
||||
int config_parse_route_metric_boolean(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -353,7 +353,7 @@ int config_parse_route_boolean(
|
||||
return 0;
|
||||
}
|
||||
|
||||
int config_parse_tcp_congestion(
|
||||
int config_parse_route_metric_tcp_congestion(
|
||||
const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@ -384,7 +384,7 @@ int config_parse_tcp_congestion(
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = config_parse_string(unit, filename, line, section, section_line, lvalue, ltype,
|
||||
r = config_parse_string(unit, filename, line, section, section_line, lvalue, 0,
|
||||
rvalue, &route->tcp_congestion_control_algo, userdata);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
#include "conf-parser.h"
|
||||
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_mtu);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tcp_advmss);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_hop_limit);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_tcp_window);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_tcp_rto);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_boolean);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tcp_congestion);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_mtu);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_advmss);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_hop_limit);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_tcp_window);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_tcp_rto);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_boolean);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_route_metric_tcp_congestion);
|
||||
CONFIG_PARSER_PROTOTYPE(config_parse_tcp_window);
|
||||
|
Loading…
x
Reference in New Issue
Block a user