##summary
There is a struct in_device __rcu *ip_ptr
under every net_device.
which stores all the IPv4 related information for this device.
Each IPv4 address is stored a struct in_ifaddr
,
all the IPv4 address of a net device are stored into a list(netdev->ip_ptr->ifa_list).
1 | 1075 struct net_device { |
1 | 55 struct in_device { |
1 | 161 struct in_ifaddr { |
1 | 2284 void __init devinet_init(void) |
##calltrace
1 | > inet_rtm_newaddr |
####NOTE:
inetaddr_chain will be shown in next blog.
1 | 807 static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh) |
1 | 708 static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh, |
1 | 426 static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, |