Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2006 03:50:16 GMT
From:      Mats Palmgren <mats.palmgren@bredband.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/94829: [patch] feature request: adapt OpenBSD's enc0 support for FreeBSD
Message-ID:  <200603250350.k2P3oGXu039839@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/94829; it has been noted by GNATS.

From: Mats Palmgren <mats.palmgren@bredband.net>
To: bug-followup@FreeBSD.org,  vanhu@netasq.com
Cc:  
Subject: Re: kern/94829: [patch] feature request: adapt OpenBSD's enc0 support
 for FreeBSD
Date: Sat, 25 Mar 2006 04:44:14 +0100

 FYI, you can simplify the bpf blocks by using bpf_mtap2.
 
 An example from our enc0 implementation:
 
 		struct ifnet *ifn = get_enc0();
 		if (ifn->if_bpf) {
 			struct enchdr hdr;
 			hdr.af = sav->sah->saidx.dst.sa.sa_family;
 			hdr.spi = sav->spi;
 			hdr.flags = espx ? M_CONF : 0;
 			if (esph)
 				hdr.flags |= M_AUTH;
 			bpf_mtap2(ifn->if_bpf, &hdr, ENC_HDRLEN, m);
                  }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603250350.k2P3oGXu039839>