From 8a6d48c0542876eb3acfc0970c0ab7872db08d5f Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Sun, 6 Dec 2009 05:26:23 +0100 Subject: check in the original version of dde linux26. --- .../include/.svn/text-base/dde26_net.h.svn-base | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 libdde_linux26/include/.svn/text-base/dde26_net.h.svn-base (limited to 'libdde_linux26/include/.svn/text-base/dde26_net.h.svn-base') diff --git a/libdde_linux26/include/.svn/text-base/dde26_net.h.svn-base b/libdde_linux26/include/.svn/text-base/dde26_net.h.svn-base new file mode 100644 index 00000000..2c3847b8 --- /dev/null +++ b/libdde_linux26/include/.svn/text-base/dde26_net.h.svn-base @@ -0,0 +1,34 @@ +#ifndef __DDE_26_NET_H +#define __DDE_26_NET_H + +#include + +/** rx callback function */ +typedef int (*linux_rx_callback)(struct sk_buff *); + +extern linux_rx_callback l4dde26_rx_callback; + +/** Register rx callback function. + * + * This registers a function to be a rx callback. Whenever an ethernet packet + * arrives and is processed by a driver or a softirq, it will end up in either + * netif_rx() or netif_receive_skb(). Both will finally try to hand this to + * a DDE user using a previously registered callback. + * + * \param cb new callback function + * \return old callback function pointer + */ +linux_rx_callback l4dde26_register_rx_callback(linux_rx_callback cb); + + +/** Run callback function. + */ +static inline int l4dde26_do_rx_callback(struct sk_buff *s) +{ + if (l4dde26_rx_callback != NULL) + return l4dde26_rx_callback(s); + + return 0; +} + +#endif -- cgit v1.2.3