rtnetlink.c (4c3af034fafeb7269176bf1310c9bcff0b9fd9bb) | rtnetlink.c (a31f2d17b331db970259e875b7223d3aba7e3821) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Routing netlink socket interface: protocol independent part. 7 * 8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> --- 2339 unchanged lines hidden (view full) --- 2348static struct notifier_block rtnetlink_dev_notifier = { 2349 .notifier_call = rtnetlink_event, 2350}; 2351 2352 2353static int __net_init rtnetlink_net_init(struct net *net) 2354{ 2355 struct sock *sk; | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Routing netlink socket interface: protocol independent part. 7 * 8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> --- 2339 unchanged lines hidden (view full) --- 2348static struct notifier_block rtnetlink_dev_notifier = { 2349 .notifier_call = rtnetlink_event, 2350}; 2351 2352 2353static int __net_init rtnetlink_net_init(struct net *net) 2354{ 2355 struct sock *sk; |
2356 sk = netlink_kernel_create(net, NETLINK_ROUTE, RTNLGRP_MAX, 2357 rtnetlink_rcv, &rtnl_mutex, THIS_MODULE); | 2356 struct netlink_kernel_cfg cfg = { 2357 .groups = RTNLGRP_MAX, 2358 .input = rtnetlink_rcv, 2359 .cb_mutex = &rtnl_mutex, 2360 }; 2361 2362 sk = netlink_kernel_create(net, NETLINK_ROUTE, THIS_MODULE, &cfg); |
2358 if (!sk) 2359 return -ENOMEM; 2360 net->rtnl = sk; 2361 return 0; 2362} 2363 2364static void __net_exit rtnetlink_net_exit(struct net *net) 2365{ --- 41 unchanged lines hidden --- | 2363 if (!sk) 2364 return -ENOMEM; 2365 net->rtnl = sk; 2366 return 0; 2367} 2368 2369static void __net_exit rtnetlink_net_exit(struct net *net) 2370{ --- 41 unchanged lines hidden --- |