2 * Copyright (c) 2001-2002 Luigi Rizzo
4 * Supported by: the Xorp Project (www.xorp.org)
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * $FreeBSD: src/sys/kern/kern_poll.c,v 1.2.2.4 2002/06/27 23:26:33 luigi Exp $
30 #ifndef _NET_IF_POLL_H_
31 #define _NET_IF_POLL_H_
35 struct sysctl_ctx_list
;
37 struct lwkt_serialize
;
40 typedef void (*ifpoll_iofn_t
)(struct ifnet
*, void *, int);
41 typedef void (*ifpoll_stfn_t
)(struct ifnet
*);
43 struct ifpoll_status
{
44 struct lwkt_serialize
*serializer
;
45 ifpoll_stfn_t status_func
;
49 struct lwkt_serialize
*serializer
;
51 ifpoll_iofn_t poll_func
;
55 struct ifnet
*ifpi_ifp
;
56 struct ifpoll_status ifpi_status
;
57 struct ifpoll_io ifpi_rx
[MAXCPU
];
58 struct ifpoll_io ifpi_tx
[MAXCPU
];
61 struct ifpoll_compat
{
66 struct lwkt_serialize
*ifpc_serializer
;
69 void ifpoll_compat_setup(struct ifpoll_compat
*, struct sysctl_ctx_list
*,
70 struct sysctl_oid
*, int, struct lwkt_serialize
*);
74 #endif /* !_NET_IF_POLL_H_ */