Deleted Added
full compact
bpf.c (36735) bpf.c (37939)
1/*
2 * Copyright (c) 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from the Stanford/CMU enet packet filter,
6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8 * Berkeley Laboratory.

--- 23 unchanged lines hidden (view full) ---

32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94
39 *
1/*
2 * Copyright (c) 1990, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from the Stanford/CMU enet packet filter,
6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8 * Berkeley Laboratory.

--- 23 unchanged lines hidden (view full) ---

32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94
39 *
40 * $Id: bpf.c,v 1.38 1998/02/20 13:46:57 bde Exp $
40 * $Id: bpf.c,v 1.39 1998/06/07 17:12:01 dfr Exp $
41 */
42
43#include "bpfilter.h"
44
45#if NBPFILTER > 0
46
47#ifndef __GNUC__
48#define inline

--- 143 unchanged lines hidden (view full) ---

192#endif
193 break;
194
195 case DLT_NULL:
196 sockp->sa_family = AF_UNSPEC;
197 hlen = 0;
198 break;
199
41 */
42
43#include "bpfilter.h"
44
45#if NBPFILTER > 0
46
47#ifndef __GNUC__
48#define inline

--- 143 unchanged lines hidden (view full) ---

192#endif
193 break;
194
195 case DLT_NULL:
196 sockp->sa_family = AF_UNSPEC;
197 hlen = 0;
198 break;
199
200#ifdef __FreeBSD__
201 case DLT_ATM_RFC1483:
202 /*
203 * en atm driver requires 4-byte atm pseudo header.
204 * though it isn't standard, vpi:vci needs to be
205 * specified anyway.
206 */
207 sockp->sa_family = AF_UNSPEC;
208 hlen = 12; /* XXX 4(ATM_PH) + 3(LLC) + 5(SNAP) */
209 break;
210#endif
211
200 default:
201 return (EIO);
202 }
203
204 len = uio->uio_resid;
205 *datlen = len - hlen;
206 if ((unsigned)len > MCLBYTES)
207 return (EIO);

--- 1095 unchanged lines hidden ---
212 default:
213 return (EIO);
214 }
215
216 len = uio->uio_resid;
217 *datlen = len - hlen;
218 if ((unsigned)len > MCLBYTES)
219 return (EIO);

--- 1095 unchanged lines hidden ---