From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 2 17:39:05 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C90EF1065675 for ; Tue, 2 Jun 2009 17:39:05 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id C21E58FC1A for ; Tue, 2 Jun 2009 17:39:04 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n52Hd0YU002738; Tue, 2 Jun 2009 19:39:00 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n52Hcxpx002735; Tue, 2 Jun 2009 19:39:00 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Tue, 2 Jun 2009 19:38:59 +0200 (CEST) From: Wojciech Puchar To: john decot In-Reply-To: <4058.23842.qm@web55408.mail.re4.yahoo.com> Message-ID: References: <4058.23842.qm@web55408.mail.re4.yahoo.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1626729238-1160075405-1243964340=:2581" Cc: freebsd-hackers@freebsd.org Subject: Re: REgarding TOS support in Kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2009 17:39:08 -0000 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--