Lines Matching defs:network

30 #include "network-internal.h"
45 if (!link->network)
48 return link->network->dhcp & ADDRESS_FAMILY_IPV6;
55 if (!link->network)
58 return link->network->dhcp & ADDRESS_FAMILY_IPV4;
65 if (!link->network)
68 return link->network->dhcp_server;
75 if (!link->network)
78 return link->network->link_local & ADDRESS_FAMILY_IPV4;
85 if (!link->network)
88 return link->network->link_local & ADDRESS_FAMILY_IPV6;
95 if (!link->network)
98 if (link->network->bridge)
101 return link->network->lldp;
108 if (!link->network)
111 if (link->network->ip_forward == _ADDRESS_FAMILY_BOOLEAN_INVALID)
114 return link->network->ip_forward & ADDRESS_FAMILY_IPV4;
125 if (!link->network)
128 if (link->network->ip_forward == _ADDRESS_FAMILY_BOOLEAN_INVALID)
131 return link->network->ip_forward & ADDRESS_FAMILY_IPV6;
138 if (!link->network)
145 if (link->network->ipv6_accept_ra < 0)
148 else if (link->network->ipv6_accept_ra > 0)
164 if (!link->network)
167 return link->network->ipv6_privacy_extensions;
558 assert(link->network);
561 LIST_FOREACH(addresses, address, link->network->static_addresses) {
585 assert(link->network);
603 if (!link->network)
671 assert(link->network);
676 LIST_FOREACH(routes, rt, link->network->static_routes) {
752 if (!link->network)
755 STRV_FOREACH(a, link->network->dns) {
768 if (link->network->dhcp_use_dns &&
795 if (!link->network)
800 STRV_FOREACH(a, link->network->ntp) {
813 if (link->network->dhcp_use_ntp &&
840 assert(link->network);
845 LIST_FOREACH(addresses, ad, link->network->static_addresses) {
872 link->network->dhcp_server_pool_offset, link->network->dhcp_server_pool_size);
883 if (link->network->dhcp_server_max_lease_time_usec > 0) {
886 DIV_ROUND_UP(link->network->dhcp_server_max_lease_time_usec, USEC_PER_SEC));
891 if (link->network->dhcp_server_default_lease_time_usec > 0) {
894 DIV_ROUND_UP(link->network->dhcp_server_default_lease_time_usec, USEC_PER_SEC));
899 if (link->network->dhcp_server_emit_dns) {
901 if (link->network->n_dhcp_server_dns > 0)
902 r = sd_dhcp_server_set_dns(link->dhcp_server, link->network->dhcp_server_dns, link->network->n_dhcp_server_dns);
918 if (link->network->dhcp_server_emit_ntp) {
920 if (link->network->n_dhcp_server_ntp > 0)
921 r = sd_dhcp_server_set_ntp(link->dhcp_server, link->network->dhcp_server_ntp, link->network->n_dhcp_server_ntp);
937 if (link->network->dhcp_server_emit_timezone) {
941 if (link->network->dhcp_server_timezone)
942 tz = link->network->dhcp_server_timezone;
1000 LIST_FOREACH(static_fdb_entries, fdb_entry, link->network->static_fdb_entries) {
1180 assert(link->network);
1194 r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, !link->network->use_bpdu);
1198 r = sd_netlink_message_append_u8(req, IFLA_BRPORT_MODE, link->network->hairpin);
1202 r = sd_netlink_message_append_u8(req, IFLA_BRPORT_FAST_LEAVE, link->network->fast_leave);
1206 r = sd_netlink_message_append_u8(req, IFLA_BRPORT_PROTECT, !link->network->allow_port_to_be_root);
1210 r = sd_netlink_message_append_u8(req, IFLA_BRPORT_UNICAST_FLOOD, link->network->unicast_flood);
1214 if(link->network->cost != 0) {
1215 r = sd_netlink_message_append_u32(req, IFLA_BRPORT_COST, link->network->cost);
1238 assert(link->network);
1290 assert(link->network);
1365 assert(link->network);
1379 if (link->network->mac) {
1380 r = sd_netlink_message_append_ether_addr(req, IFLA_ADDRESS, link->network->mac);
1385 if (link->network->mtu) {
1386 r = sd_netlink_message_append_u32(req, IFLA_MTU, link->network->mtu);
1406 if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) {
1407 r = sd_netlink_message_append_in6_addr(req, IFLA_INET6_TOKEN, &link->network->ipv6_token.in6);
1563 if (!carrier->network)
1566 if (strv_isempty(carrier->network->bind_carrier))
1569 if (strv_fnmatch(carrier->network->bind_carrier, link->ifname, 0)) {
1602 if (!link->network)
1605 if (strv_isempty(link->network->bind_carrier))
1611 if (strv_fnmatch(link->network->bind_carrier, carrier->ifname, 0)) {
1727 assert(link->network);
1741 if(link->network->bridge) {
1755 assert(link->network);
1782 assert(link->network);
1789 if (!link->network->bridge &&
1790 !link->network->bond &&
1791 hashmap_isempty(link->network->stacked_netdevs))
1794 if (link->network->bond) {
1797 LOG_NETDEV_INTERFACE(link->network->bond),
1798 LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bond->ifname),
1801 r = netdev_join(link->network->bond, link, netdev_join_handler);
1805 LOG_NETDEV_INTERFACE(link->network->bond),
1806 LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bond->ifname),
1816 if (link->network->bridge) {
1819 LOG_NETDEV_INTERFACE(link->network->bridge),
1820 LOG_LINK_MESSAGE(link, "Enslaving by '%s'", link->network->bridge->ifname),
1823 r = netdev_join(link->network->bridge, link, netdev_join_handler);
1827 LOG_NETDEV_INTERFACE(link->network->bridge),
1828 LOG_LINK_MESSAGE(link, "Could not join netdev '%s': %m", link->network->bridge->ifname),
1837 HASHMAP_FOREACH(netdev, link->network->stacked_netdevs, i) {
1915 xsprintf(buf, "%u", (unsigned) link->network->ipv6_privacy_extensions);
1935 if (!link->network)
1960 if (!link->network)
1963 if (link->network->ipv6_dad_transmits < 0)
1967 xsprintf(buf, "%i", link->network->ipv6_dad_transmits);
1988 if (!link->network)
1991 if (link->network->ipv6_hop_limit < 0)
1995 xsprintf(buf, "%i", link->network->ipv6_hop_limit);
2037 assert(link->network);
2042 if (!(link->flags & IFF_LOOPBACK) && !(link->network->dhcp_critical)) {
2144 Network *network;
2164 if (!link->network) {
2166 &link->mac, &network);
2174 if (network->link_local != ADDRESS_FAMILY_NO)
2177 if (network->dhcp != ADDRESS_FAMILY_NO)
2180 if (network->dhcp_server)
2184 r = network_apply(link->manager, network, link);
2263 Network *network;
2269 log_link_debug(link, "Failed to get network name from %s", network_file);
2274 r = network_get_by_name(link->manager, basename(network_file), &network);
2276 log_link_debug_errno(link, r, "Failed to get network %s: %m", basename(network_file));
2280 r = network_apply(link->manager, network, link);
2282 return log_link_error_errno(link, r, "Failed to apply network %s: %m", basename(network_file));
2729 if (link->network) {
2741 fprintf(f, "NETWORK_FILE=%s\n", link->network->filename);
2745 fputstrv(f, link->network->dns, NULL, &space);
2747 if (link->network->dhcp_use_dns &&
2760 if (link->network->dhcp_use_dns && dhcp6_lease) {
2775 fputstrv(f, link->network->ntp, NULL, &space);
2777 if (link->network->dhcp_use_ntp &&
2790 if (link->network->dhcp_use_ntp && dhcp6_lease) {
2810 if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO) {
2819 fputstrv(f, link->network->search_domains, NULL, &space);
2821 if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_YES && dhcp_domainname)
2824 if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_YES && dhcp6_domains)
2830 fputstrv(f, link->network->route_domains, NULL, NULL);
2832 if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_ROUTE && dhcp_domainname)
2835 if (link->network->dhcp_use_domains == DHCP_USE_DOMAINS_ROUTE && dhcp6_domains)
2841 resolve_support_to_string(link->network->llmnr));
2843 resolve_support_to_string(link->network->mdns));
2845 if (link->network->dnssec_mode != _DNSSEC_MODE_INVALID)
2847 dnssec_mode_to_string(link->network->dnssec_mode));
2849 if (!set_isempty(link->network->dnssec_negative_trust_anchors)) {
2854 SET_FOREACH(n, link->network->dnssec_negative_trust_anchors, i)
2916 assert(link->network);
2951 assert(link->network);