Subject: Re: TOS - ECN bits and NetBSD daemons/apps
To: John Maier <jmaier@midamerica.net>
From: Chuck Swiger <cswiger@mac.com>
List: netbsd-users
Date: 03/30/2005 14:30:20
John Maier wrote:
> I am taking a Cisco QoS Boot Camp course, and the topic of the ECN bits
> arose.  I'm curious if NetBSD programs (if any) take advantage of ECN.

I submitted a patch to the NetBSD headers just prior to the v2.0 release:

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=25058

...since I wanted to write a program which uses them on NetBSD.  My patch was 
even accepted, although I was roundly scolded for my efforts.  (Sob! :-)

Earlier versions of NetBSD (1.6) probably do not know about ECE and CWR, 
although code like this will work fine:

[ ... ]
#if defined(__NetBSD__)
#include <net/ethertypes.h>
#else
#include <net/ethernet.h>
#endif

#include <netinet/in.h>

/* NetBSD doesn't seem to define these... */
#if !defined(TH_ECE)
#define      TH_ECE  0x40
#endif
#if !defined(TH_CWR)
#define      TH_CWR  0x80
#endif

I'd imagine you could hunt down some fancy routing software like Quagga or 
Zebra which might pay attention to ECN.  Also, what Cisco calls VRRP, is known 
hereabouts as CARP.  (Only they aren't the same thing, even if the difference 
is a fishy one.  :-)

-- 
-Chuck