Lines Matching defs:netdev
31 #include "networkd-netdev-tunnel.h"
49 static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
50 Tunnel *t = IPIP(netdev);
53 assert(netdev);
61 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LINK attribute: %m");
65 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LOCAL attribute: %m");
69 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_REMOTE attribute: %m");
73 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_TTL attribute: %m");
77 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_PMTUDISC attribute: %m");
82 static int netdev_sit_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
83 Tunnel *t = SIT(netdev);
86 assert(netdev);
94 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LINK attribute: %m");
98 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LOCAL attribute: %m");
102 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_REMOTE attribute: %m");
106 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_TTL attribute: %m");
110 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_PMTUDISC attribute: %m");
115 static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
119 assert(netdev);
121 if (netdev->kind == NETDEV_KIND_GRE)
122 t = GRE(netdev);
124 t = GRETAP(netdev);
133 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_LINK attribute: %m");
137 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_LOCAL attribute: %m");
141 log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_REMOTE attribute: %m");
145 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_TTL attribute: %m");
149 log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_TOS attribute: %m");
153 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_PMTUDISC attribute: %m");
158 static int netdev_ip6gre_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
162 assert(netdev);
164 if (netdev->kind == NETDEV_KIND_IP6GRE)
165 t = IP6GRE(netdev);
167 t = IP6GRETAP(netdev);
176 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_LINK attribute: %m");
180 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_LOCAL attribute: %m");
184 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_REMOTE attribute: %m");
188 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_TTL attribute: %m");
193 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_FLOWINFO attribute: %m");
198 return log_netdev_error_errno(netdev, r, "Could not append IFLA_GRE_FLAGS attribute: %m");
203 static int netdev_vti_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
204 Tunnel *t = VTI(netdev);
207 assert(netdev);
215 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LINK attribute: %m");
219 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LOCAL attribute: %m");
223 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_REMOTE attribute: %m");
228 static int netdev_vti6_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
229 Tunnel *t = VTI6(netdev);
232 assert(netdev);
240 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LINK attribute: %m");
244 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LOCAL attribute: %m");
248 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_REMOTE attribute: %m");
253 static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
254 Tunnel *t = IP6TNL(netdev);
258 assert(netdev);
266 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LINK attribute: %m");
270 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_LOCAL attribute: %m");
274 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_REMOTE attribute: %m");
278 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_TTL attribute: %m");
283 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_FLOWINFO attribute: %m");
292 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_ENCAP_LIMIT attribute: %m");
297 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_FLAGS attribute: %m");
314 return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_MODE attribute: %m");
319 static int netdev_tunnel_verify(NetDev *netdev, const char *filename) {
322 assert(netdev);
325 switch (netdev->kind) {
327 t = IPIP(netdev);
330 t = SIT(netdev);
333 t = GRE(netdev);
336 t = GRETAP(netdev);
339 t = IP6GRE(netdev);
342 t = IP6GRETAP(netdev);
345 t = VTI(netdev);
348 t = VTI6(netdev);
351 t = IP6TNL(netdev);
364 if (netdev->kind == NETDEV_KIND_IP6TNL) {