Date: Tue, 2 Jun 2009 19:38:59 +0200 (CEST) From: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> To: john decot <johndecot@yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: REgarding TOS support in Kernel Message-ID: <alpine.BSF.2.00.0906021934180.2581@wojtek.tensor.gdynia.pl> In-Reply-To: <4058.23842.qm@web55408.mail.re4.yahoo.com> References: <4058.23842.qm@web55408.mail.re4.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1626729238-1160075405-1243964340=:2581 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT > forward.cc:978: error: 'SOL_IP' was not declared in this scope > > forward.cc:978: error: 'IP_RECVTOS' was not declared in this scope > forward.cc:982: error: 'IP_PKTOPTIONS' was not declared in this scope > *** Error code 1 > > I have wrote to writer of zph and he suggest me to look for freebsd equivalent socket options calls to retrieve/set the TOS value. I am confused whether this will require kernel compile ? if yes what should we have to enable in kernel conf file. i was sure it is but now i'm a but confused do man telnetd there is: -S tos Sets the IP type-of-service (TOS) option for the telnet connec- tion to the value tos, which can be a numeric TOS value or, on systems that support it, a symbolic TOS name found in the /etc/iptos file. anyway /etc/iptos is absent. looking at /usr/src/contrib/telnet/telnetd/telnetd.c search for IP_TOS you will find #if defined(IPPROTO_IP) && defined(IP_TOS) if (from.ss_family == AF_INET) { # if defined(HAS_GETTOS) struct tosent *tp; if (tos < 0 && (tp = gettosbyname("telnet", "tcp"))) tos = tp->t_tos; # endif if (tos < 0) tos = 020; /* Low Delay bit */ if (tos && (setsockopt(0, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(tos)) < 0) && (errno != ENOPROTOOPT) ) syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); } #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ IP_TOS is defined in netinet/in.h so looks like there is something. in the same time - man setsockopt says nothing apropos tos says nothing too. --1626729238-1160075405-1243964340=:2581--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0906021934180.2581>