plugins: std search path mgmt. path, ~/vde-2/plugins, {stdlib}/vde2/plugins
[vde.git] / ipn / ipn_netdev.h
blob85947089b1d32a9dec4648ebbefc73a736f7ed58
1 #ifndef _IPN_NETDEV_H
2 #define _IPN_NETDEV_H
3 /*
4 * Inter process networking (virtual distributed ethernet) module
5 * Net devices: tap and grab
6 * (part of the View-OS project: wiki.virtualsquare.org)
8 * Copyright (C) 2007 Renzo Davoli (renzo@cs.unibo.it)
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * Due to this file being licensed under the GPL there is controversy over
16 * whether this permits you to write a module that #includes this file
17 * without placing your module under the GPL. Please consult a lawyer for
18 * advice before doing this.
20 * WARNING: THIS CODE IS ALREADY EXPERIMENTAL
24 #include <linux/init.h>
25 #include <linux/module.h>
26 #include <linux/socket.h>
27 #include <linux/poll.h>
28 #include <linux/un.h>
29 #include <linux/list.h>
30 #include <linux/mount.h>
31 #include <linux/etherdevice.h>
32 #include <linux/if_bridge.h>
33 #include <net/sock.h>
34 /*#include <net/af_ipn.h>*/
35 #include "af_ipn.h"
37 #ifdef IPN_STEALING
38 #define ipn_port br_port
39 #endif
41 struct net_device *ipn_netdev_alloc(struct net *net,int type, char *name, int *err);
42 int ipn_netdev_activate(struct ipn_node *ipn_node);
43 void ipn_netdev_close(struct ipn_node *ipn_node);
44 void ipn_netdev_sendmsg(struct ipn_node *to,struct msgpool_item *msg);
45 int ipn_netdev_init(void);
46 void ipn_netdev_fini(void);
48 static inline struct ipn_node *ipn_netdev2node(struct net_device *dev)
50 return (struct ipn_node *)rcu_dereference(dev->ipn_port);
53 static inline void ipn_netdevsync(void)
55 synchronize_rcu();
57 #endif