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>
29 #include <linux/list.h>
30 #include <linux/mount.h>
31 #include <linux/etherdevice.h>
32 #include <linux/if_bridge.h>
34 /*#include <net/af_ipn.h>*/
38 #define ipn_port br_port
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 rcu_dereference((struct ipn_node
*)dev
->ipn_port
);
53 static inline void ipn_netdevsync(void)