From: Richard Scheffenegger <rsch...@freebsd.org>

This adds a new IP_PROTO / IPV6_PROTO setsockopt (getsockopt)
option IP(V6)_VLAN_PCP, which can be set to -1 (interface
default), or explicitly to any priority between 0 and 7.

Note that for untagged traffic, explicitly adding a
priority will insert a special 801.1Q vlan header with
vlan ID = 0 to carry the priority setting

Reviewed by:    gallatin, rrs
MFC after:      2 weeks
Sponsored by:   NetApp, Inc.
Differential Revision:  https://reviews.freebsd.org/D26409
---
 newlib/libc/sys/rtems/include/netinet/in.h   | 4 ++++
 newlib/libc/sys/rtems/include/netinet6/in6.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/netinet/in.h 
b/newlib/libc/sys/rtems/include/netinet/in.h
index 749e74eda..059f50d9b 100644
--- a/newlib/libc/sys/rtems/include/netinet/in.h
+++ b/newlib/libc/sys/rtems/include/netinet/in.h
@@ -483,6 +483,10 @@ __END_DECLS
 /* The following option is private; do not use it from user applications. */
 #define        IP_MSFILTER                     74   /* set/get filter list */
 
+/* The following option deals with the 802.1Q Ethernet Priority Code Point */
+#define        IP_VLAN_PCP             75   /* int; set/get PCP used for 
packet, */
+                                    /*      -1 use interface default */
+
 /* Protocol Independent Multicast API [RFC3678] */
 #define        MCAST_JOIN_GROUP                80   /* join an any-source 
group */
 #define        MCAST_LEAVE_GROUP               81   /* leave all sources for 
group */
diff --git a/newlib/libc/sys/rtems/include/netinet6/in6.h 
b/newlib/libc/sys/rtems/include/netinet6/in6.h
index 68d4c3e4e..55be82fed 100644
--- a/newlib/libc/sys/rtems/include/netinet6/in6.h
+++ b/newlib/libc/sys/rtems/include/netinet6/in6.h
@@ -387,6 +387,10 @@ struct route_in6 {
                                    * set/get multicast source filter list.
                                    */
 
+/* The following option deals with the 802.1Q Ethernet Priority Code Point */
+#define        IPV6_VLAN_PCP           75  /* int; set/get PCP used for 
packet, */
+                                   /*      -1 use interface default */
+
 /* to define items, should talk with KAME guys first, for *BSD compatibility */
 
 #define IPV6_RTHDR_LOOSE     0 /* this hop need not be a neighbor. XXX old 
spec */
-- 
2.35.3

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to