#ifndef _LINUX_INETDEVICE_H
#define _LINUX_INETDEVICE_H
#ifdef __KERNEL__
#include <linux/bitmap.h>
#include <linux/if.h>
#include <linux/ip.h>
#include <linux/netdevice.h>
#include <linux/rcupdate.h>
#include <linux/timer.h>
#include <linux/sysctl.h>
#include <linux/rtnetlink.h>
#include <linux/refcount.h>
struct ipv4_devconf { … };
#define MC_HASH_SZ_LOG …
struct in_device { … };
#define IPV4_DEVCONF(cnf, attr) …
#define IPV4_DEVCONF_RO(cnf, attr) …
#define IPV4_DEVCONF_ALL(net, attr) …
#define IPV4_DEVCONF_ALL_RO(net, attr) …
static inline int ipv4_devconf_get(const struct in_device *in_dev, int index)
{ … }
static inline void ipv4_devconf_set(struct in_device *in_dev, int index,
int val)
{ … }
static inline void ipv4_devconf_setall(struct in_device *in_dev)
{ … }
#define IN_DEV_CONF_GET(in_dev, attr) …
#define IN_DEV_CONF_SET(in_dev, attr, val) …
#define IN_DEV_ANDCONF(in_dev, attr) …
#define IN_DEV_NET_ORCONF(in_dev, net, attr) …
#define IN_DEV_ORCONF(in_dev, attr) …
#define IN_DEV_MAXCONF(in_dev, attr) …
#define IN_DEV_FORWARD(in_dev) …
#define IN_DEV_MFORWARD(in_dev) …
#define IN_DEV_BFORWARD(in_dev) …
#define IN_DEV_RPFILTER(in_dev) …
#define IN_DEV_SRC_VMARK(in_dev) …
#define IN_DEV_SOURCE_ROUTE(in_dev) …
#define IN_DEV_ACCEPT_LOCAL(in_dev) …
#define IN_DEV_BOOTP_RELAY(in_dev) …
#define IN_DEV_LOG_MARTIANS(in_dev) …
#define IN_DEV_PROXY_ARP(in_dev) …
#define IN_DEV_PROXY_ARP_PVLAN(in_dev) …
#define IN_DEV_SHARED_MEDIA(in_dev) …
#define IN_DEV_TX_REDIRECTS(in_dev) …
#define IN_DEV_SEC_REDIRECTS(in_dev) …
#define IN_DEV_IDTAG(in_dev) …
#define IN_DEV_MEDIUM_ID(in_dev) …
#define IN_DEV_PROMOTE_SECONDARIES(in_dev) …
#define IN_DEV_ROUTE_LOCALNET(in_dev) …
#define IN_DEV_NET_ROUTE_LOCALNET(in_dev, net) …
#define IN_DEV_RX_REDIRECTS(in_dev) …
#define IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev) …
#define IN_DEV_ARPFILTER(in_dev) …
#define IN_DEV_ARP_ACCEPT(in_dev) …
#define IN_DEV_ARP_ANNOUNCE(in_dev) …
#define IN_DEV_ARP_IGNORE(in_dev) …
#define IN_DEV_ARP_NOTIFY(in_dev) …
#define IN_DEV_ARP_EVICT_NOCARRIER(in_dev) …
struct in_ifaddr { … };
struct in_validator_info { … };
int register_inetaddr_notifier(struct notifier_block *nb);
int unregister_inetaddr_notifier(struct notifier_block *nb);
int register_inetaddr_validator_notifier(struct notifier_block *nb);
int unregister_inetaddr_validator_notifier(struct notifier_block *nb);
void inet_netconf_notify_devconf(struct net *net, int event, int type,
int ifindex, struct ipv4_devconf *devconf);
struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref);
static inline struct net_device *ip_dev_find(struct net *net, __be32 addr)
{ … }
int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b);
int devinet_ioctl(struct net *net, unsigned int cmd, struct ifreq *);
#ifdef CONFIG_INET
int inet_gifconf(struct net_device *dev, char __user *buf, int len, int size);
#else
static inline int inet_gifconf(struct net_device *dev, char __user *buf,
int len, int size)
{
return 0;
}
#endif
void devinet_init(void);
struct in_device *inetdev_by_index(struct net *, int);
__be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope);
__be32 inet_confirm_addr(struct net *net, struct in_device *in_dev, __be32 dst,
__be32 local, int scope);
struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
__be32 mask);
struct in_ifaddr *inet_lookup_ifaddr_rcu(struct net *net, __be32 addr);
static inline bool inet_ifa_match(__be32 addr, const struct in_ifaddr *ifa)
{ … }
static __inline__ bool bad_mask(__be32 mask, __be32 addr)
{ … }
#define in_dev_for_each_ifa_rtnl(ifa, in_dev) …
#define in_dev_for_each_ifa_rcu(ifa, in_dev) …
static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev)
{ … }
static inline struct in_device *in_dev_get(const struct net_device *dev)
{ … }
static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev)
{ … }
static inline bool ip_ignore_linkdown(const struct net_device *dev)
{ … }
static inline struct neigh_parms *__in_dev_arp_parms_get_rcu(const struct net_device *dev)
{ … }
void in_dev_finish_destroy(struct in_device *idev);
static inline void in_dev_put(struct in_device *idev)
{ … }
#define __in_dev_put(idev) …
#define in_dev_hold(idev) …
#endif
static __inline__ __be32 inet_make_mask(int logmask)
{ … }
static __inline__ int inet_mask_len(__be32 mask)
{ … }
#endif