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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to