]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/test-network-tables.c
tree-wide: make sure net/if.h is included before any linux/ header
[thirdparty/systemd.git] / src / network / test-network-tables.c
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
4368277c 2
edda10f2
FS
3/* Make sure the net/if.h header is included before any linux/ one */
4#include <net/if.h>
5#include <linux/if.h>
6
737f1405 7#include "bond.h"
86bbe5bf
ZJS
8#include "dhcp6-internal.h"
9#include "dhcp6-protocol.h"
86bbe5bf 10#include "ethtool-util.h"
737f1405 11#include "ipvlan.h"
3a2ee855 12#include "lldp-rx-internal.h"
737f1405 13#include "macvlan.h"
90208b82 14#include "ndisc-internal.h"
23f53b99 15#include "networkd-link.h"
018eaf74 16#include "networkd-network.h"
23f53b99 17#include "networkd-util.h"
86bbe5bf 18#include "test-tables.h"
965040d8 19#include "tests.h"
737f1405 20#include "tunnel.h"
86bbe5bf
ZJS
21
22int main(int argc, char **argv) {
965040d8
YW
23 test_setup_logging(LOG_DEBUG);
24
018eaf74
ZJS
25 test_table(bond_ad_select, NETDEV_BOND_AD_SELECT);
26 test_table(bond_arp_all_targets, NETDEV_BOND_ARP_ALL_TARGETS);
27 test_table(bond_arp_validate, NETDEV_BOND_ARP_VALIDATE);
28 test_table(bond_fail_over_mac, NETDEV_BOND_FAIL_OVER_MAC);
29 test_table(bond_lacp_rate, NETDEV_BOND_LACP_RATE);
279eadd9 30 test_table(bond_mode, NETDEV_BOND_MODE);
018eaf74
ZJS
31 test_table(bond_primary_reselect, NETDEV_BOND_PRIMARY_RESELECT);
32 test_table(bond_xmit_hash_policy, NETDEV_BOND_XMIT_HASH_POLICY);
86bbe5bf 33 test_table(dhcp6_message_status, DHCP6_STATUS);
59f1ded8 34 test_table_sparse(dhcp6_message_type, DHCP6_MESSAGE_TYPE); /* enum starts from 1 */
018eaf74 35 test_table(dhcp_use_domains, DHCP_USE_DOMAINS);
86bbe5bf 36 test_table(duplex, DUP);
018eaf74
ZJS
37 test_table(ip6tnl_mode, NETDEV_IP6_TNL_MODE);
38 test_table(ipv6_privacy_extensions, IPV6_PRIVACY_EXTENSIONS);
39 test_table(ipvlan_flags, NETDEV_IPVLAN_FLAGS);
279eadd9
ZJS
40 test_table(link_operstate, LINK_OPERSTATE);
41 /* test_table(link_state, LINK_STATE); — not a reversible mapping */
018eaf74 42 test_table(lldp_mode, LLDP_MODE);
279eadd9 43 test_table(netdev_kind, NETDEV_KIND);
5f74e49e 44 test_table(radv_prefix_delegation, RADV_PREFIX_DELEGATION);
35778343 45 test_table(lldp_rx_event, SD_LLDP_RX_EVENT);
90208b82 46 test_table(ndisc_event, SD_NDISC_EVENT);
386059e1 47 test_table(dhcp_lease_server_type, SD_DHCP_LEASE_SERVER_TYPE);
86bbe5bf 48
279eadd9
ZJS
49 test_table_sparse(ipvlan_mode, NETDEV_IPVLAN_MODE);
50 test_table_sparse(macvlan_mode, NETDEV_MACVLAN_MODE);
2d792895 51 test_table_sparse(address_family, ADDRESS_FAMILY);
86bbe5bf 52
35778343 53 assert_cc(sizeof(sd_lldp_rx_event_t) == sizeof(int64_t));
2324fd3a
LP
54 assert_cc(sizeof(sd_ndisc_event_t) == sizeof(int64_t));
55 assert_cc(sizeof(sd_dhcp_lease_server_type_t) == sizeof(int64_t));
386059e1 56
86bbe5bf
ZJS
57 return EXIT_SUCCESS;
58}