ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / linux / netpoll.h
1 /*
2  * Common code for low-level network console, dump, and debugger code
3  *
4  * Derived from netconsole, kgdb-over-ethernet, and netdump patches
5  */
6
7 #ifndef _LINUX_NETPOLL_H
8 #define _LINUX_NETPOLL_H
9
10 #include <linux/netdevice.h>
11 #include <linux/interrupt.h>
12 #include <linux/list.h>
13
14 struct netpoll;
15
16 struct netpoll {
17         struct net_device *dev;
18         char dev_name[16], *name;
19         void (*rx_hook)(struct netpoll *, int, char *, int);
20         u32 local_ip, remote_ip;
21         u16 local_port, remote_port;
22         unsigned char local_mac[6], remote_mac[6];
23         struct list_head rx_list;
24 };
25
26 void netpoll_poll(struct netpoll *np);
27 void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
28 void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
29 int netpoll_parse_options(struct netpoll *np, char *opt);
30 int netpoll_setup(struct netpoll *np);
31 int netpoll_trap(void);
32 void netpoll_set_trap(int trap);
33 void netpoll_cleanup(struct netpoll *np);
34 int netpoll_rx(struct sk_buff *skb);
35
36
37 #endif