Re: Maybe need to enrich `-T' option in netcat manual

2018-09-21 Thread Jason McIntyre
On Fri, Sep 21, 2018 at 10:07:54PM +0800, Nan Xiao wrote: > Hi Jason, > > Thanks very much for your response! > > I check the ping & traceroute code, For ping: > > if (options & F_TTL) { > if (IN_MULTICAST(ntohl(dst4.sin_addr.s_addr))) > moptions |= MULTICAST_TTL; > else >

Re: Maybe need to enrich `-T' option in netcat manual

2018-09-21 Thread Nan Xiao
Hi Jason, Thanks very much for your response! I check the ping & traceroute code, For ping: if (options & F_TTL) { if (IN_MULTICAST(ntohl(dst4.sin_addr.s_addr))) moptions |= MULTICAST_TTL; else options |= F_HDRINCL; } For traceroute: void check_tos(struct ip *ip, int

Re: Maybe need to enrich `-T' option in netcat manual

2018-09-20 Thread Jason McIntyre
On Wed, Sep 19, 2018 at 06:35:13PM +0800, Nan Xiao wrote: > Hi tech@, > > For `-T' option explanation in netcat manual: > > -T keyword > Change the IPv4 TOS value or the TLS options. > > But in fact, the netcat code not only processes IPv4 but also IPv6: > > if (Tflag != -1) { >

Maybe need to enrich `-T' option in netcat manual

2018-09-19 Thread Nan Xiao
Hi tech@, For `-T' option explanation in netcat manual: -T keyword Change the IPv4 TOS value or the TLS options. But in fact, the netcat code not only processes IPv4 but also IPv6: if (Tflag != -1) { if (af == AF_INET && setsockopt(s, IPPROTO_IP,