summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-11-12 23:34:48 +0000
committerdlg <dlg@openbsd.org>2018-11-12 23:34:48 +0000
commitfd0d218142c3e07530b3f50c70189ed2efed3378 (patch)
tree4c0766be01d63838002fecd723e2e7390576d6ae
parentadd ioctl commands for the setting of prio fields in tx headers (diff)
downloadwireguard-openbsd-fd0d218142c3e07530b3f50c70189ed2efed3378.tar.xz
wireguard-openbsd-fd0d218142c3e07530b3f50c70189ed2efed3378.zip
add ifreq bits for the tx header prio field ioctls
a tx header prio can set to a fixed value from 0 to 7, or magic values to represent populating the prio field from the encapsulated packet, or from the mbuf prio value. ok claudio@
-rw-r--r--sys/net/if.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index c6f95de04ad..7bb0378ac5b 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.197 2018/11/12 16:36:54 krw Exp $ */
+/* $OpenBSD: if.h,v 1.198 2018/11/12 23:34:48 dlg Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -419,8 +419,14 @@ struct ifreq {
#define ifr_data ifr_ifru.ifru_data /* for use by interface */
#define ifr_index ifr_ifru.ifru_index /* interface index */
#define ifr_llprio ifr_ifru.ifru_metric /* link layer priority */
+#define ifr_hdrprio ifr_ifru.ifru_metric /* header prio field config */
};
+#define IF_HDRPRIO_MIN IFQ_MINPRIO
+#define IF_HDRPRIO_MAX IFQ_MAXPRIO
+#define IF_HDRPRIO_PACKET -1 /* use mbuf prio */
+#define IF_HDRPRIO_PAYLOAD -2 /* copy payload prio */
+
struct ifaliasreq {
char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
union {