On Tue, Sep 25, 2018 at 03:25:51PM +0800, Nan Xiao wrote: > Hi Jason, > > According to IPv6(https://en.wikipedia.org/wiki/IPv6_packet) and IPv4 > TOS(https://en.wikipedia.org/wiki/Type_of_service), Traffic class and > TOS seem have the same structure: the first six bits are DS field and > the last two bits for Explicit Congestion Notification. > > Thanks! >
hi. fair enough. so i'll commit this shortly unless i hear any objections. jmc > Best Regards > Nan Xiao > On Tue, Sep 25, 2018 at 2:37 PM Jason McIntyre <[email protected]> wrote: > > > > On Tue, Sep 25, 2018 at 09:11:42AM +0800, Nan Xiao wrote: > > > Hi tech@, > > > > > > > morning. > > > > > According to netcat source code, the `-T' option not only takes effect > > > in IPv4 but also IPv6: > > > > > > if (Tflag != -1) { > > > if (af == AF_INET && setsockopt(s, IPPROTO_IP, > > > IP_TOS, &Tflag, sizeof(Tflag)) == -1) > > > err(1, "set IP ToS"); > > > > > > else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, > > > IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) > > > err(1, "set IPv6 traffic class"); > > > } > > > > > > So I think the following patch should be more accurate: > > > > > > diff --git nc.1 nc.1 > > > index cb391288f15..5588daf87ae 100644 > > > --- nc.1 > > > +++ nc.1 > > > @@ -241,7 +241,7 @@ Cannot be used together with > > > or > > > .Fl x . > > > .It Fl T Ar keyword > > > -Change the IPv4 TOS value or the TLS options. > > > +Change the IPv4 TOS/IPv6 Traffic Class value or the TLS options. > > > .Pp > > > For TLS options, > > > .Ar keyword > > > @@ -269,7 +269,7 @@ for further details). > > > Specifying TLS options requires > > > .Fl c . > > > .Pp > > > -For the IPv4 TOS value, > > > +For the IPv4 TOS/IPv6 Traffic Class value, > > > .Ar keyword > > > may be one of > > > > one question: are the keywords identical for both v4 and 6? > > > > if so, anyone want to ok this? > > if not, the diff needs work. > > > > also, i think traffic class should be lower case. > > > > jmc > > > > > .Cm critical , > > > > > > > > > Thanks! > > > > > > -- > > > Best Regards > > > Nan Xiao > > > > > >
