]> err.no Git - linux-2.6/blobdiff - include/linux/inetdevice.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6] / include / linux / inetdevice.h
index 1ef174d83e09de8783d4e5016e7d588a07d687e8..d83fee2dc643603eca731cfb8e74df4a1a5d7284 100644 (file)
@@ -3,15 +3,18 @@
 
 #ifdef __KERNEL__
 
+#include <linux/bitmap.h>
 #include <linux/if.h>
 #include <linux/netdevice.h>
 #include <linux/rcupdate.h>
 #include <linux/timer.h>
+#include <linux/sysctl.h>
 
 struct ipv4_devconf
 {
        void    *sysctl;
        int     data[__NET_IPV4_CONF_MAX - 1];
+       DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
 };
 
 extern struct ipv4_devconf ipv4_devconf;
@@ -53,9 +56,15 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index,
                                    int val)
 {
        index--;
+       set_bit(index, in_dev->cnf.state);
        in_dev->cnf.data[index] = val;
 }
 
+static inline void ipv4_devconf_setall(struct in_device *in_dev)
+{
+       bitmap_fill(in_dev->cnf.state, __NET_IPV4_CONF_MAX - 1);
+}
+
 #define IN_DEV_CONF_GET(in_dev, attr) \
        ipv4_devconf_get((in_dev), NET_IPV4_CONF_ ## attr)
 #define IN_DEV_CONF_SET(in_dev, attr, val) \
@@ -122,7 +131,6 @@ extern struct net_device    *ip_dev_find(__be32 addr);
 extern int             inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b);
 extern int             devinet_ioctl(unsigned int cmd, void __user *);
 extern void            devinet_init(void);
-extern struct in_device *inetdev_init(struct net_device *dev);
 extern struct in_device        *inetdev_by_index(int);
 extern __be32          inet_select_addr(const struct net_device *dev, __be32 dst, int scope);
 extern __be32          inet_confirm_addr(const struct net_device *dev, __be32 dst, __be32 local, int scope);