默默的一块石头
发布时间:2019-12-06 10:19:27
在通过ifconfig eth0 xxx 修改ip地址的时候内核流程为:fib_inetaddr_notifier{}:fib_inetaddr_event->fib_add_ifaddr()在此我们已ifconfig eth0 192.168.11.103为例子看一下fib_add_ifaddr的执行过程//ifconfig eth0 192.168.11.103void fib_add_ifaddr(struct in_ifaddr *ifa){ struct in_device *in_dev = ifa-.........【阅读全文】
发布时间:2019-12-06 10:02:23
in_ifaddr表示地址结构,其成员包含了地址,掩码,范围等信息,多个地址连接成链表,主地址在前,从地址在后;/* 地址结构 */struct in_ifaddr { struct hlist_node hash; /* 下一个地址节点 */ struct in_ifaddr *ifa_next; /* 所.........【阅读全文】
发布时间:2019-11-20 14:30:12
The rest of this page will walk through what the SKB data area looks like in a newly allocated SKB. How to modify those pointers to add headers, add user data, and pop headers.As you can see, the head, data, and tail pointers all point to the beginning of the data buffer. And the end pointer.........【阅读全文】
发布时间:2019-11-19 19:16:10
1.setsockopt/* * Set a socket option. Because we don't know the option lengths we have * to pass the user mode parameter for the protocols to sort out. */SYSCALL_DEFINE5(setsockopt, int, fd, int, level, int, optname, char __user *, optval, int, optlen){ ...... if (level == SO.........【阅读全文】