1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 
3 #include <linux/if_arp.h>
4 
5 #include "nlmon.h"
6 
netdev_nlmon_verify(NetDev * netdev,const char * filename)7 static int netdev_nlmon_verify(NetDev *netdev, const char *filename) {
8         assert(netdev);
9         assert(filename);
10 
11         if (netdev->hw_addr.length > 0) {
12                 log_netdev_warning(netdev, "%s: MACAddress= is not supported. Ignoring", filename);
13                 netdev->hw_addr = HW_ADDR_NULL;
14         }
15 
16         return 0;
17 }
18 
19 const NetDevVTable nlmon_vtable = {
20         .object_size = sizeof(NLMon),
21         .sections = NETDEV_COMMON_SECTIONS,
22         .create_type = NETDEV_CREATE_INDEPENDENT,
23         .config_verify = netdev_nlmon_verify,
24         .iftype = ARPHRD_NETLINK,
25 };
26