summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2019-07-17 03:26:24 +0000
committermsaitoh <msaitoh@NetBSD.org>2019-07-17 03:26:24 +0000
commit100a7af67ffc9f78733c4fac62a9891df5b796b3 (patch)
treec86e8be87211e41e53f1cda02103fa5142d44d88 /sbin
parent72a2bcdb0825ec644999d1c48848d6f6d1728b0e (diff)
Implement VLAN hardware filter function(ETHERCAP_VLAN_HWFILTER).
First proposed by jmcneill in 2017 and modified by me. How to use: - Set callback function: ether_set_vlan_cb(struct ethercom *, ether_vlancb_t) - Callback. This function is called when a vlan is attached/detached to the parent interface: int (*ether_vlancb_t)(struct ethercom *ec, uint16_t vlanid, bool set); - ifconfig(8) ifconfig ixg0 [-]vlan-hwfilter Note that ETHERCAP_VLAN_HWFILTER is set by default on ixg(4) because the PF driver usually enable "all block" filter by default.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ether.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/ifconfig/ether.c b/sbin/ifconfig/ether.c
index e7069e54fde..9d518bf9f95 100644
--- a/sbin/ifconfig/ether.c
+++ b/sbin/ifconfig/ether.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ether.c,v 1.5 2019/07/17 03:09:16 msaitoh Exp $ */
+/* $NetBSD: ether.c,v 1.6 2019/07/17 03:26:24 msaitoh Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ether.c,v 1.5 2019/07/17 03:09:16 msaitoh Exp $");
+__RCSID("$NetBSD: ether.c,v 1.6 2019/07/17 03:26:24 msaitoh Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -64,9 +64,7 @@ static cmdloop_branch_t branch;
#define MAX_PRINT_LEN 55
static const struct kwinst ethercapskw[] = {
-#if 0 /* notyet */
IFKW("vlan-hwfilter", ETHERCAP_VLAN_HWFILTER),
-#endif
IFKW("vlan-hwtagging", ETHERCAP_VLAN_HWTAGGING),
IFKW("eee", ETHERCAP_EEE)
};