1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include "bond.h"
4 #include "dhcp6-internal.h"
5 #include "dhcp6-protocol.h"
6 #include "ethtool-util.h"
7 #include "ipvlan.h"
8 #include "lldp-rx-internal.h"
9 #include "macvlan.h"
10 #include "ndisc-internal.h"
11 #include "networkd-link.h"
12 #include "networkd-network.h"
13 #include "networkd-util.h"
14 #include "test-tables.h"
15 #include "tunnel.h"
16
main(int argc,char ** argv)17 int main(int argc, char **argv) {
18 test_table(bond_ad_select, NETDEV_BOND_AD_SELECT);
19 test_table(bond_arp_all_targets, NETDEV_BOND_ARP_ALL_TARGETS);
20 test_table(bond_arp_validate, NETDEV_BOND_ARP_VALIDATE);
21 test_table(bond_fail_over_mac, NETDEV_BOND_FAIL_OVER_MAC);
22 test_table(bond_lacp_rate, NETDEV_BOND_LACP_RATE);
23 test_table(bond_mode, NETDEV_BOND_MODE);
24 test_table(bond_primary_reselect, NETDEV_BOND_PRIMARY_RESELECT);
25 test_table(bond_xmit_hash_policy, NETDEV_BOND_XMIT_HASH_POLICY);
26 test_table(dhcp6_message_status, DHCP6_STATUS);
27 test_table_sparse(dhcp6_message_type, DHCP6_MESSAGE_TYPE); /* enum starts from 1 */
28 test_table(dhcp_use_domains, DHCP_USE_DOMAINS);
29 test_table(duplex, DUP);
30 test_table(ip6tnl_mode, NETDEV_IP6_TNL_MODE);
31 test_table(ipv6_privacy_extensions, IPV6_PRIVACY_EXTENSIONS);
32 test_table(ipvlan_flags, NETDEV_IPVLAN_FLAGS);
33 test_table(link_operstate, LINK_OPERSTATE);
34 /* test_table(link_state, LINK_STATE); — not a reversible mapping */
35 test_table(lldp_mode, LLDP_MODE);
36 test_table(netdev_kind, NETDEV_KIND);
37 test_table(radv_prefix_delegation, RADV_PREFIX_DELEGATION);
38 test_table(lldp_rx_event, SD_LLDP_RX_EVENT);
39 test_table(ndisc_event, SD_NDISC_EVENT);
40 test_table(dhcp_lease_server_type, SD_DHCP_LEASE_SERVER_TYPE);
41
42 test_table_sparse(ipvlan_mode, NETDEV_IPVLAN_MODE);
43 test_table_sparse(macvlan_mode, NETDEV_MACVLAN_MODE);
44 test_table_sparse(address_family, ADDRESS_FAMILY);
45
46 assert_cc(sizeof(sd_lldp_rx_event_t) == sizeof(int64_t));
47 assert_cc(sizeof(sd_ndisc_event_t) == sizeof(int64_t));
48 assert_cc(sizeof(sd_dhcp_lease_server_type_t) == sizeof(int64_t));
49
50 return EXIT_SUCCESS;
51 }
52