Deleted Added
sdiff udiff text old ( 316458 ) new ( 317042 )
full compact
1/* $FreeBSD: stable/11/sys/net/pfil.h 316458 2017-04-03 13:04:36Z ae $ */
2/* $NetBSD: pfil.h,v 1.22 2003/06/23 12:57:08 martin 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

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

33#define _NET_PFIL_H_
34
35#include <sys/systm.h>
36#include <sys/queue.h>
37#include <sys/_lock.h>
38#include <sys/_mutex.h>
39#include <sys/lock.h>
40#include <sys/rmlock.h>
41
42struct mbuf;
43struct ifnet;
44struct inpcb;
45
46typedef int (*pfil_func_t)(void *, struct mbuf **, struct ifnet *, int,
47 struct inpcb *);
48

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

89 u_long phu_val;
90 void *phu_ptr;
91 } ph_un;
92#define ph_af ph_un.phu_val
93#define ph_ifnet ph_un.phu_ptr
94 LIST_ENTRY(pfil_head) ph_list;
95};
96
97/* Public functions for pfil hook management by packet filters. */
98struct pfil_head *pfil_head_get(int, u_long);
99int pfil_add_hook(pfil_func_t, void *, int, struct pfil_head *);
100int pfil_remove_hook(pfil_func_t, void *, int, struct pfil_head *);
101#define PFIL_HOOKED(p) ((p)->ph_nhooks > 0)
102
103/* Public functions to run the packet inspection by protocols. */
104int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *,

--- 15 unchanged lines hidden ---