Deleted Added
full compact
pfil.c (242079) pfil.c (242463)
1/* $FreeBSD: head/sys/net/pfil.c 242079 2012-10-25 09:39:14Z ae $ */
1/* $FreeBSD: head/sys/net/pfil.c 242463 2012-11-02 01:20:55Z ae $ */
2/* $NetBSD: pfil.c,v 1.20 2001/11/12 23:49:46 lukem Exp $ */
3
4/*-
5 * Copyright (c) 1996 Matthew R. Green
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/errno.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/rmlock.h>
38#include <sys/socket.h>
39#include <sys/socketvar.h>
2/* $NetBSD: pfil.c,v 1.20 2001/11/12 23:49:46 lukem Exp $ */
3
4/*-
5 * Copyright (c) 1996 Matthew R. Green
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

32#include <sys/param.h>
33#include <sys/kernel.h>
34#include <sys/errno.h>
35#include <sys/lock.h>
36#include <sys/malloc.h>
37#include <sys/rmlock.h>
38#include <sys/socket.h>
39#include <sys/socketvar.h>
40#include <sys/sysctl.h>
41#include <sys/systm.h>
42#include <sys/condvar.h>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/proc.h>
46#include <sys/queue.h>
47
48#include <net/if.h>

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

60 void *);
61
62LIST_HEAD(pfilheadhead, pfil_head);
63VNET_DEFINE(struct pfilheadhead, pfil_head_list);
64#define V_pfil_head_list VNET(pfil_head_list)
65VNET_DEFINE(struct rmlock, pfil_lock);
66#define V_pfil_lock VNET(pfil_lock)
67
40#include <sys/systm.h>
41#include <sys/condvar.h>
42#include <sys/lock.h>
43#include <sys/mutex.h>
44#include <sys/proc.h>
45#include <sys/queue.h>
46
47#include <net/if.h>

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

59 void *);
60
61LIST_HEAD(pfilheadhead, pfil_head);
62VNET_DEFINE(struct pfilheadhead, pfil_head_list);
63#define V_pfil_head_list VNET(pfil_head_list)
64VNET_DEFINE(struct rmlock, pfil_lock);
65#define V_pfil_lock VNET(pfil_lock)
66
68VNET_DEFINE(int, pfilforward) = 0;
69SYSCTL_NODE(_net, OID_AUTO, pfil, CTLFLAG_RW, 0, "Packer filter interface");
70SYSCTL_VNET_INT(_net_pfil, OID_AUTO, forward, CTLFLAG_RW,
71 &VNET_NAME(pfilforward), 0,
72 "Enable forwarding performed by packet filters");
73/*
74 * pfil_run_hooks() runs the specified packet filter hooks.
75 */
76int
77pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp,
78 int dir, struct inpcb *inp)
79{
80 struct rm_priotracker rmpt;

--- 315 unchanged lines hidden ---
67/*
68 * pfil_run_hooks() runs the specified packet filter hooks.
69 */
70int
71pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp,
72 int dir, struct inpcb *inp)
73{
74 struct rm_priotracker rmpt;

--- 315 unchanged lines hidden ---