public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow.
Date: Mon, 11 Jul 2022 11:52:59 +0000 (GMT)	[thread overview]
Message-ID: <20220711115259.8A64138560BA@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3f0cc70c136b2e16ec9b6f5ca4355ef5326210f9

commit 3f0cc70c136b2e16ec9b6f5ca4355ef5326210f9
Author: Richard Scheffenegger <rscheff@FreeBSD.org>
Date:   Fri Oct 9 12:06:43 2020 +0000

    Add IP(V6)_VLAN_PCP to set 802.1 priority per-flow.
    
    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

Diff:
---
 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 */


                 reply	other threads:[~2022-07-11 11:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220711115259.8A64138560BA@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).