Home
last modified time | relevance | path

Searched refs:net (Results 1 – 200 of 1347) sorted by relevance

1234567

/linux-4.1.27/Documentation/DocBook/
D.80211.xml.cmd2net/cfg80211.h include/net/cfg80211.h include/net/cfg80211.h include/net/cfg80211.h include/net/cf…
D.networking.xml.cmd2net.h include/linux/skbuff.h include/net/sock.h net/socket.c net/core/skbuff.c net/core/sock.c net
/linux-4.1.27/include/net/
Dnet_namespace.h45 struct net { struct
141 extern struct net init_net; argument
144 struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
145 struct net *old_net);
150 static inline struct net *copy_net_ns(unsigned long flags, in copy_net_ns()
151 struct user_namespace *user_ns, struct net *old_net) in copy_net_ns()
162 struct net *get_net_ns_by_pid(pid_t pid);
163 struct net *get_net_ns_by_fd(int pid);
174 void __put_net(struct net *net);
176 static inline struct net *get_net(struct net *net) in get_net() argument
[all …]
Dip_fib.h102 struct net *fib_net;
170 __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
172 #define FIB_RES_SADDR(net, res) \ argument
174 atomic_read(&(net)->ipv4.dev_addr_genid)) ? \
176 fib_info_update_nh_saddr((net), &FIB_RES_NH(res)))
181 #define FIB_RES_PREFSRC(net, res) ((res).fi->fib_prefsrc ? : \ argument
182 FIB_RES_SADDR(net, res))
210 static inline struct fib_table *fib_get_table(struct net *net, u32 id) in fib_get_table() argument
216 &net->ipv4.fib_table_hash[TABLE_LOCAL_INDEX] : in fib_get_table()
217 &net->ipv4.fib_table_hash[TABLE_MAIN_INDEX]; in fib_get_table()
[all …]
Dwext.h6 struct net;
9 int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
11 int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
17 static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, in wext_handle_ioctl() argument
22 static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, in compat_wext_handle_ioctl() argument
30 int wext_proc_init(struct net *net);
31 void wext_proc_exit(struct net *net);
33 static inline int wext_proc_init(struct net *net) in wext_proc_init() argument
37 static inline void wext_proc_exit(struct net *net) in wext_proc_exit() argument
Dip6_route.h67 struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
70 static inline struct dst_entry *ip6_route_output(struct net *net, in ip6_route_output() argument
74 return ip6_route_output_flags(net, sk, fl6, 0); in ip6_route_output()
77 struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6,
83 int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg);
89 int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
93 struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
99 void fib6_force_start_gc(struct net *net);
113 void rt6_purge_dflt_routers(struct net *net);
118 void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, int oif,
[all …]
Dip.h138 int ip_send_skb(struct net *net, struct sk_buff *skb);
192 #define IP_INC_STATS(net, field) SNMP_INC_STATS64((net)->mib.ip_statistics, field) argument
193 #define IP_INC_STATS_BH(net, field) SNMP_INC_STATS64_BH((net)->mib.ip_statistics, field) argument
194 #define IP_ADD_STATS(net, field, val) SNMP_ADD_STATS64((net)->mib.ip_statistics, field, val) argument
195 #define IP_ADD_STATS_BH(net, field, val) SNMP_ADD_STATS64_BH((net)->mib.ip_statistics, field, val) argument
196 #define IP_UPD_PO_STATS(net, field, val) SNMP_UPD_PO_STATS64((net)->mib.ip_statistics, field, val) argument
197 #define IP_UPD_PO_STATS_BH(net, field, val) SNMP_UPD_PO_STATS64_BH((net)->mib.ip_statistics, field,… argument
198 #define NET_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.net_statistics, field) argument
199 #define NET_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.net_statistics, field) argument
200 #define NET_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)->mib.net_statistics, field) argument
[all …]
Droute.h111 void rt_cache_flush(struct net *net);
113 struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp);
114 struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
116 struct dst_entry *ipv4_blackhole_route(struct net *net,
119 static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp) in ip_route_output_key() argument
121 return ip_route_output_flow(net, flp, NULL); in ip_route_output_key()
124 static inline struct rtable *ip_route_output(struct net *net, __be32 daddr, in ip_route_output() argument
133 return ip_route_output_key(net, &fl4); in ip_route_output()
136 static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4, in ip_route_output_ports() argument
148 return ip_route_output_flow(net, fl4, sk); in ip_route_output_ports()
[all …]
Dudp.h84 struct net *net, unsigned int num) in udp_hashslot() argument
86 return &table->hash[udp_hashfn(net, num, table->mask)]; in udp_hashslot()
199 static inline __be16 udp_flow_src_port(struct net *net, struct sk_buff *skb, in udp_flow_src_port() argument
206 inet_get_local_port_range(net, &min, &max); in udp_flow_src_port()
257 struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
259 struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
262 struct sock *udp6_lib_lookup(struct net *net,
266 struct sock *__udp6_lib_lookup(struct net *net,
274 #define UDP_INC_STATS_USER(net, field, is_udplite) do { \ argument
275 if (is_udplite) SNMP_INC_STATS_USER((net)->mib.udplite_statistics, field); \
[all …]
Dicmp.h32 #define ICMP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.icmp_statistics, field) argument
33 #define ICMP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.icmp_statistics, field) argument
34 #define ICMPMSGOUT_INC_STATS(net, field) SNMP_INC_STATS_ATOMIC_LONG((net)->mib.icmpmsg_statistics, … argument
35 #define ICMPMSGIN_INC_STATS_BH(net, field) SNMP_INC_STATS_ATOMIC_LONG((net)->mib.icmpmsg_statistics… argument
40 struct net;
46 void icmp_out_count(struct net *net, unsigned char type);
Dipv6.h115 #define IP6_REPLY_MARK(net, mark) \ argument
116 ((net)->ipv6.sysctl.fwmark_reflect ? (mark) : 0)
124 #define _DEVINC(net, statname, modifier, idev, field) \ argument
129 SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\
133 #define _DEVINCATOMIC(net, statname, modifier, idev, field) \ argument
138 SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\
142 #define _DEVINC_ATOMIC_ATOMIC(net, statname, idev, field) \ argument
147 SNMP_INC_STATS_ATOMIC_LONG((net)->mib.statname##_statistics, (field));\
150 #define _DEVADD(net, statname, modifier, idev, field, val) \ argument
155 SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\
[all …]
Dip_vs.h33 static inline struct netns_ipvs *net_ipvs(struct net* net) in net_ipvs() argument
35 return net->ipvs; in net_ipvs()
41 static inline struct net *skb_net(const struct sk_buff *skb) in skb_net()
69 static inline struct net *skb_sknet(const struct sk_buff *skb) in skb_sknet()
94 static inline struct net *seq_file_single_net(struct seq_file *seq) in seq_file_single_net()
97 return (struct net *)seq->private; in seq_file_single_net()
440 int (*init_netns)(struct net *net, struct ip_vs_proto_data *pd);
442 void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd);
476 int (*register_app)(struct net *net, struct ip_vs_app *inc);
478 void (*unregister_app)(struct net *net, struct ip_vs_app *inc);
[all …]
Dinet_hashtables.h89 static inline struct net *ib_net(struct inet_bind_bucket *ib) in ib_net()
218 inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net,
224 static inline u32 inet_bhashfn(const struct net *net, const __u16 lport, in inet_bhashfn() argument
227 return (lport + net_hash_mix(net)) & (bhash_size - 1); in inet_bhashfn()
234 static inline u32 inet_lhashfn(const struct net *net, const unsigned short num) in inet_lhashfn() argument
236 return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1); in inet_lhashfn()
256 struct sock *__inet_lookup_listener(struct net *net,
263 static inline struct sock *inet_lookup_listener(struct net *net, in inet_lookup_listener() argument
268 return __inet_lookup_listener(net, hashinfo, saddr, sport, in inet_lookup_listener()
326 struct sock *__inet_lookup_established(struct net *net,
[all …]
Dxfrm.h47 #define XFRM_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.xfrm_statistics, field) argument
48 #define XFRM_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.xfrm_statistics, field) argument
49 #define XFRM_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)-mib.xfrm_statistics, field) argument
51 #define XFRM_INC_STATS(net, field) ((void)(net)) argument
52 #define XFRM_INC_STATS_BH(net, field) ((void)(net)) argument
53 #define XFRM_INC_STATS_USER(net, field) ((void)(net)) argument
234 static inline struct net *xs_net(struct xfrm_state *x) in xs_net()
265 struct net *net; member
286 void (*garbage_collect)(struct net *net);
287 struct dst_entry *(*dst_lookup)(struct net *net, int tos,
[all …]
Dgenetlink.h64 int (*mcast_bind)(struct net *net, int group);
65 void (*mcast_unbind)(struct net *net, int group);
100 static inline struct net *genl_info_net(struct genl_info *info) in genl_info_net()
105 static inline void genl_info_net_set(struct genl_info *info, struct net *net) in genl_info_net_set() argument
107 write_pnet(&info->_net, net); in genl_info_net_set()
187 struct sk_buff *skb, struct net *net, u32 portid,
294 struct net *net, struct sk_buff *skb, in genlmsg_multicast_netns() argument
300 return nlmsg_multicast(net->genl_sock, skb, portid, group, flags); in genlmsg_multicast_netns()
338 static inline int genlmsg_unicast(struct net *net, struct sk_buff *skb, u32 portid) in genlmsg_unicast() argument
340 return nlmsg_unicast(net->genl_sock, skb, portid); in genlmsg_unicast()
[all …]
Daddrconf.h59 int addrconf_add_ifaddr(struct net *net, void __user *arg);
60 int addrconf_del_ifaddr(struct net *net, void __user *arg);
61 int addrconf_set_dstaddr(struct net *net, void __user *arg);
63 int ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
65 int ipv6_chk_addr_and_flags(struct net *net, const struct in6_addr *addr,
70 int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr);
79 struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
83 int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
122 u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr,
211 bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
[all …]
Dudp_tunnel.h37 int udp_sock_create4(struct net *net, struct udp_port_cfg *cfg,
41 int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg,
44 static inline int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg, in udp_sock_create6() argument
51 static inline int udp_sock_create(struct net *net, in udp_sock_create() argument
56 return udp_sock_create4(net, cfg, sockp); in udp_sock_create()
59 return udp_sock_create6(net, cfg, sockp); in udp_sock_create()
76 void setup_udp_tunnel_sock(struct net *net, struct socket *sock,
Dinet6_hashtables.h47 struct sock *__inet6_lookup_established(struct net *net,
54 struct sock *inet6_lookup_listener(struct net *net,
61 static inline struct sock *__inet6_lookup(struct net *net, in __inet6_lookup() argument
69 struct sock *sk = __inet6_lookup_established(net, hashinfo, saddr, in __inet6_lookup()
74 return inet6_lookup_listener(net, hashinfo, saddr, sport, in __inet6_lookup()
95 struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
Daf_unix.h80 int unix_sysctl_register(struct net *net);
81 void unix_sysctl_unregister(struct net *net);
83 static inline int unix_sysctl_register(struct net *net) { return 0; } in unix_sysctl_register() argument
84 static inline void unix_sysctl_unregister(struct net *net) {} in unix_sysctl_unregister() argument
/linux-4.1.27/net/core/
Dnet_namespace.c35 struct net init_net = {
56 static int net_assign_generic(struct net *net, int id, void *data) in net_assign_generic() argument
63 old_ng = rcu_dereference_protected(net->gen, in net_assign_generic()
86 rcu_assign_pointer(net->gen, ng); in net_assign_generic()
93 static int ops_init(const struct pernet_operations *ops, struct net *net) in ops_init() argument
103 err = net_assign_generic(net, *ops->id, data); in ops_init()
109 err = ops->init(net); in ops_init()
120 static void ops_free(const struct pernet_operations *ops, struct net *net) in ops_free() argument
124 kfree(net_generic(net, id)); in ops_free()
131 struct net *net; in ops_exit_list() local
[all …]
Ddev_ioctl.c20 static int dev_ifname(struct net *net, struct ifreq __user *arg) in dev_ifname() argument
32 error = netdev_get_name(net, ifr.ifr_name, ifr.ifr_ifindex); in dev_ifname()
67 static int dev_ifconf(struct net *net, char __user *arg) in dev_ifconf() argument
91 for_each_netdev(net, dev) { in dev_ifconf()
121 static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc_locked() argument
124 struct net_device *dev = dev_get_by_name_rcu(net, ifr->ifr_name); in dev_ifsioc_locked()
241 static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) in dev_ifsioc() argument
244 struct net_device *dev = __dev_get_by_name(net, ifr->ifr_name); in dev_ifsioc()
359 void dev_load(struct net *net, const char *name) in dev_load() argument
365 dev = dev_get_by_name_rcu(net, name); in dev_load()
[all …]
Dflow.c34 struct net *net; member
192 flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir, in flow_cache_lookup() argument
195 struct flow_cache *fc = &net->xfrm.flow_cache_global; in flow_cache_lookup()
222 if (tfle->net == net && in flow_cache_lookup()
237 fle->net = net; in flow_cache_lookup()
245 } else if (likely(fle->genid == atomic_read(&net->xfrm.flow_cache_genid))) { in flow_cache_lookup()
264 flo = resolver(net, key, family, dir, flo, ctx); in flow_cache_lookup()
266 fle->genid = atomic_read(&net->xfrm.flow_cache_genid); in flow_cache_lookup()
340 void flow_cache_flush(struct net *net) in flow_cache_flush() argument
353 mutex_lock(&net->xfrm.flow_flush_sem); in flow_cache_flush()
[all …]
Dnet-procfs.c17 struct net *net = seq_file_net(seq); in dev_from_same_bucket() local
22 h = &net->dev_name_head[get_bucket(*pos)]; in dev_from_same_bucket()
315 static int __net_init dev_proc_net_init(struct net *net) in dev_proc_net_init() argument
319 if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops)) in dev_proc_net_init()
321 if (!proc_create("softnet_stat", S_IRUGO, net->proc_net, in dev_proc_net_init()
324 if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops)) in dev_proc_net_init()
327 if (wext_proc_init(net)) in dev_proc_net_init()
333 remove_proc_entry("ptype", net->proc_net); in dev_proc_net_init()
335 remove_proc_entry("softnet_stat", net->proc_net); in dev_proc_net_init()
337 remove_proc_entry("dev", net->proc_net); in dev_proc_net_init()
[all …]
Dfib_rules.c68 static struct fib_rules_ops *lookup_rules_ops(struct net *net, int family) in lookup_rules_ops() argument
73 list_for_each_entry_rcu(ops, &net->rules_ops, list) { in lookup_rules_ops()
102 struct net *net; in __fib_rules_register() local
104 net = ops->fro_net; in __fib_rules_register()
114 spin_lock(&net->rules_mod_lock); in __fib_rules_register()
115 list_for_each_entry(o, &net->rules_ops, list) in __fib_rules_register()
119 list_add_tail_rcu(&ops->list, &net->rules_ops); in __fib_rules_register()
122 spin_unlock(&net->rules_mod_lock); in __fib_rules_register()
128 fib_rules_register(const struct fib_rules_ops *tmpl, struct net *net) in fib_rules_register() argument
138 ops->fro_net = net; in fib_rules_register()
[all …]
/linux-4.1.27/fs/proc/
Dproc_net.c29 static inline struct net *PDE_NET(struct proc_dir_entry *pde) in PDE_NET()
34 static struct net *get_proc_net(const struct inode *inode) in get_proc_net()
42 struct net *net; in seq_open_net() local
47 net = get_proc_net(ino); in seq_open_net()
48 if (net == NULL) in seq_open_net()
53 put_net(net); in seq_open_net()
57 p->net = net; in seq_open_net()
67 struct net *net; in single_open_net() local
70 net = get_proc_net(inode); in single_open_net()
71 if (net == NULL) in single_open_net()
[all …]
/linux-4.1.27/net/tipc/
Dbcast.h115 int tipc_bclink_init(struct net *net);
116 void tipc_bclink_stop(struct net *net);
117 void tipc_bclink_add_node(struct net *net, u32 addr);
118 void tipc_bclink_remove_node(struct net *net, u32 addr);
119 struct tipc_node *tipc_bclink_retransmit_to(struct net *tn);
121 void tipc_bclink_rcv(struct net *net, struct sk_buff *buf);
122 u32 tipc_bclink_get_last_sent(struct net *net);
126 int tipc_bclink_reset_stats(struct net *net);
127 int tipc_bclink_set_queue_limits(struct net *net, u32 limit);
128 void tipc_bcbearer_sort(struct net *net, struct tipc_node_map *nm_ptr,
[all …]
Dname_distr.c71 static struct sk_buff *named_prepare_buf(struct net *net, u32 type, u32 size, in named_prepare_buf() argument
74 struct tipc_net *tn = net_generic(net, tipc_net_id); in named_prepare_buf()
87 void named_cluster_distribute(struct net *net, struct sk_buff *skb) in named_cluster_distribute() argument
89 struct tipc_net *tn = net_generic(net, tipc_net_id); in named_cluster_distribute()
97 if (in_own_node(net, dnode)) in named_cluster_distribute()
105 tipc_link_xmit_skb(net, oskb, dnode, dnode); in named_cluster_distribute()
115 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ) in tipc_named_publish() argument
117 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_named_publish()
127 buf = named_prepare_buf(net, PUBLICATION, ITEM_SIZE, 0); in tipc_named_publish()
141 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ) in tipc_named_withdraw() argument
[all …]
Dname_distr.h70 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ);
71 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ);
72 void named_cluster_distribute(struct net *net, struct sk_buff *buf);
73 void tipc_named_node_up(struct net *net, u32 dnode);
74 void tipc_named_rcv(struct net *net, struct sk_buff_head *msg_queue);
75 void tipc_named_reinit(struct net *net);
76 void tipc_named_process_backlog(struct net *net);
77 void tipc_publ_notify(struct net *net, struct list_head *nsub_list, u32 addr);
Dbcast.c55 static void tipc_bclink_lock(struct net *net) in tipc_bclink_lock() argument
57 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bclink_lock()
62 static void tipc_bclink_unlock(struct net *net) in tipc_bclink_unlock() argument
64 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bclink_unlock()
69 void tipc_bclink_input(struct net *net) in tipc_bclink_input() argument
71 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bclink_input()
73 tipc_sk_mcast_rcv(net, &tn->bclink->arrvq, &tn->bclink->inputq); in tipc_bclink_input()
96 void tipc_bclink_add_node(struct net *net, u32 addr) in tipc_bclink_add_node() argument
98 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bclink_add_node()
100 tipc_bclink_lock(net); in tipc_bclink_add_node()
[all …]
Dnet.c110 int tipc_net_start(struct net *net, u32 addr) in tipc_net_start() argument
112 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_net_start()
117 tipc_named_reinit(net); in tipc_net_start()
118 tipc_sk_reinit(net); in tipc_net_start()
119 res = tipc_bclink_init(net); in tipc_net_start()
123 tipc_nametbl_publish(net, TIPC_CFG_SRV, tn->own_addr, tn->own_addr, in tipc_net_start()
133 void tipc_net_stop(struct net *net) in tipc_net_stop() argument
135 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_net_stop()
140 tipc_nametbl_withdraw(net, TIPC_CFG_SRV, tn->own_addr, 0, in tipc_net_stop()
143 tipc_bearer_stop(net); in tipc_net_stop()
[all …]
Dbearer.h105 int (*send_msg)(struct net *net, struct sk_buff *buf,
108 int (*enable_media)(struct net *net, struct tipc_bearer *b_ptr,
178 void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b_ptr);
205 int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
208 int tipc_l2_send_msg(struct net *net, struct sk_buff *buf,
211 void tipc_bearer_add_dest(struct net *net, u32 bearer_id, u32 dest);
212 void tipc_bearer_remove_dest(struct net *net, u32 bearer_id, u32 dest);
213 struct tipc_bearer *tipc_bearer_find(struct net *net, const char *name);
217 void tipc_bearer_stop(struct net *net);
218 void tipc_bearer_send(struct net *net, u32 bearer_id, struct sk_buff *buf,
Dname_table.h100 u32 tipc_nametbl_translate(struct net *net, u32 type, u32 instance, u32 *node);
101 int tipc_nametbl_mc_translate(struct net *net, u32 type, u32 lower, u32 upper,
103 struct publication *tipc_nametbl_publish(struct net *net, u32 type, u32 lower,
106 int tipc_nametbl_withdraw(struct net *net, u32 type, u32 lower, u32 ref,
108 struct publication *tipc_nametbl_insert_publ(struct net *net, u32 type,
111 struct publication *tipc_nametbl_remove_publ(struct net *net, u32 type,
116 int tipc_nametbl_init(struct net *net);
117 void tipc_nametbl_stop(struct net *net);
Daddr.c41 u32 tipc_own_addr(struct net *net) in tipc_own_addr() argument
43 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_own_addr()
51 int in_own_cluster(struct net *net, u32 addr) in in_own_cluster() argument
53 return in_own_cluster_exact(net, addr) || !addr; in in_own_cluster()
56 int in_own_cluster_exact(struct net *net, u32 addr) in in_own_cluster_exact() argument
58 struct tipc_net *tn = net_generic(net, tipc_net_id); in in_own_cluster_exact()
66 int in_own_node(struct net *net, u32 addr) in in_own_node() argument
68 struct tipc_net *tn = net_generic(net, tipc_net_id); in in_own_node()
79 u32 addr_domain(struct net *net, u32 sc) in addr_domain() argument
81 struct tipc_net *tn = net_generic(net, tipc_net_id); in addr_domain()
Dnode.h121 struct net *net; member
141 struct tipc_node *tipc_node_find(struct net *net, u32 addr);
143 struct tipc_node *tipc_node_create(struct net *net, u32 addr);
144 void tipc_node_stop(struct net *net);
151 int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 node,
154 int tipc_node_add_conn(struct net *net, u32 dnode, u32 port, u32 peer_port);
155 void tipc_node_remove_conn(struct net *net, u32 dnode, u32 port);
170 static inline uint tipc_node_get_mtu(struct net *net, u32 addr, u32 selector) in tipc_node_get_mtu() argument
175 node = tipc_node_find(net, addr); in tipc_node_get_mtu()
Dsocket.h47 int tipc_sk_rcv(struct net *net, struct sk_buff_head *inputq);
48 void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,
50 void tipc_sk_reinit(struct net *net);
51 int tipc_sk_rht_init(struct net *net);
52 void tipc_sk_rht_destroy(struct net *net);
Dcore.c52 static int __net_init tipc_init_net(struct net *net) in tipc_init_net() argument
54 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_init_net()
63 err = tipc_sk_rht_init(net); in tipc_init_net()
67 err = tipc_nametbl_init(net); in tipc_init_net()
71 err = tipc_subscr_start(net); in tipc_init_net()
77 tipc_nametbl_stop(net); in tipc_init_net()
79 tipc_sk_rht_destroy(net); in tipc_init_net()
84 static void __net_exit tipc_exit_net(struct net *net) in tipc_exit_net() argument
86 tipc_subscr_stop(net); in tipc_exit_net()
87 tipc_net_stop(net); in tipc_exit_net()
[all …]
Daddr.h58 u32 tipc_own_addr(struct net *net);
59 int in_own_cluster(struct net *net, u32 addr);
60 int in_own_cluster_exact(struct net *net, u32 addr);
61 int in_own_node(struct net *net, u32 addr);
62 u32 addr_domain(struct net *net, u32 sc);
Dnode.c91 struct tipc_node *tipc_node_find(struct net *net, u32 addr) in tipc_node_find() argument
93 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_node_find()
96 if (unlikely(!in_own_cluster_exact(net, addr))) in tipc_node_find()
112 struct tipc_node *tipc_node_create(struct net *net, u32 addr) in tipc_node_create() argument
114 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_node_create()
118 n_ptr = tipc_node_find(net, addr); in tipc_node_create()
127 n_ptr->net = net; in tipc_node_create()
156 void tipc_node_stop(struct net *net) in tipc_node_stop() argument
158 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_node_stop()
167 int tipc_node_add_conn(struct net *net, u32 dnode, u32 port, u32 peer_port) in tipc_node_add_conn() argument
[all …]
Dbearer.c74 static void bearer_disable(struct net *net, struct tipc_bearer *b_ptr,
176 struct tipc_bearer *tipc_bearer_find(struct net *net, const char *name) in tipc_bearer_find() argument
178 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bearer_find()
190 void tipc_bearer_add_dest(struct net *net, u32 bearer_id, u32 dest) in tipc_bearer_add_dest() argument
192 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bearer_add_dest()
198 tipc_bcbearer_sort(net, &b_ptr->nodes, dest, true); in tipc_bearer_add_dest()
204 void tipc_bearer_remove_dest(struct net *net, u32 bearer_id, u32 dest) in tipc_bearer_remove_dest() argument
206 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_bearer_remove_dest()
212 tipc_bcbearer_sort(net, &b_ptr->nodes, dest, false); in tipc_bearer_remove_dest()
221 static int tipc_enable_bearer(struct net *net, const char *name, in tipc_enable_bearer() argument
[all …]
Ddiscover.c65 struct net *net; member
80 static void tipc_disc_init_msg(struct net *net, struct sk_buff *buf, u32 type, in tipc_disc_init_msg() argument
83 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_disc_init_msg()
123 void tipc_disc_rcv(struct net *net, struct sk_buff *buf, in tipc_disc_rcv() argument
126 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_disc_rcv()
158 if (in_own_node(net, onode)) { in tipc_disc_rcv()
168 node = tipc_node_create(net, onode); in tipc_disc_rcv()
257 tipc_disc_init_msg(net, rbuf, DSC_RESP_MSG, bearer); in tipc_disc_rcv()
258 tipc_bearer_send(net, bearer->identity, rbuf, &maddr); in tipc_disc_rcv()
333 tipc_bearer_send(req->net, req->bearer_id, req->buf, &req->dest); in disc_timeout()
[all …]
Dname_table.c232 static struct publication *tipc_nameseq_insert_publ(struct net *net, in tipc_nameseq_insert_publ() argument
321 if (in_own_cluster(net, node)) { in tipc_nameseq_insert_publ()
326 if (in_own_node(net, node)) { in tipc_nameseq_insert_publ()
355 static struct publication *tipc_nameseq_remove_publ(struct net *net, in tipc_nameseq_remove_publ() argument
386 if (in_own_cluster(net, node)) { in tipc_nameseq_remove_publ()
392 if (in_own_node(net, node)) { in tipc_nameseq_remove_publ()
455 static struct name_seq *nametbl_find_seq(struct net *net, u32 type) in nametbl_find_seq() argument
457 struct tipc_net *tn = net_generic(net, tipc_net_id); in nametbl_find_seq()
470 struct publication *tipc_nametbl_insert_publ(struct net *net, u32 type, in tipc_nametbl_insert_publ() argument
474 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_nametbl_insert_publ()
[all …]
Ddiscover.h42 int tipc_disc_create(struct net *net, struct tipc_bearer *b_ptr,
45 void tipc_disc_reset(struct net *net, struct tipc_bearer *b_ptr);
48 void tipc_disc_rcv(struct net *net, struct sk_buff *buf,
Dsubscr.c69 struct tipc_net *tn = net_generic(sub->net, tipc_net_id); in subscr_send_event()
122 struct tipc_net *tn = net_generic(sub->net, tipc_net_id); in subscr_timeout()
157 struct tipc_net *tn = net_generic(sub->net, tipc_net_id); in subscr_del()
230 static int subscr_subscribe(struct net *net, struct tipc_subscr *s, in subscr_subscribe() argument
234 struct tipc_net *tn = net_generic(net, tipc_net_id); in subscr_subscribe()
263 sub->net = net; in subscr_subscribe()
296 static void subscr_conn_msg_event(struct net *net, int conid, in subscr_conn_msg_event() argument
302 struct tipc_net *tn = net_generic(net, tipc_net_id); in subscr_conn_msg_event()
305 if (subscr_subscribe(net, (struct tipc_subscr *)buf, subscriber, &sub)) in subscr_conn_msg_event()
330 int tipc_subscr_start(struct net *net) in tipc_subscr_start() argument
[all …]
Dsubscr.h65 struct net *net; member
80 int tipc_subscr_start(struct net *net);
81 void tipc_subscr_stop(struct net *net);
/linux-4.1.27/drivers/net/ethernet/
DKconfig20 source "drivers/net/ethernet/3com/Kconfig"
21 source "drivers/net/ethernet/adaptec/Kconfig"
22 source "drivers/net/ethernet/aeroflex/Kconfig"
23 source "drivers/net/ethernet/agere/Kconfig"
24 source "drivers/net/ethernet/allwinner/Kconfig"
25 source "drivers/net/ethernet/alteon/Kconfig"
26 source "drivers/net/ethernet/altera/Kconfig"
27 source "drivers/net/ethernet/amd/Kconfig"
28 source "drivers/net/ethernet/apm/Kconfig"
29 source "drivers/net/ethernet/apple/Kconfig"
[all …]
/linux-4.1.27/net/xfrm/
Dxfrm_sysctl.c6 static void __net_init __xfrm_sysctl_init(struct net *net) in __xfrm_sysctl_init() argument
8 net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME; in __xfrm_sysctl_init()
9 net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE; in __xfrm_sysctl_init()
10 net->xfrm.sysctl_larval_drop = 1; in __xfrm_sysctl_init()
11 net->xfrm.sysctl_acq_expires = 30; in __xfrm_sysctl_init()
43 int __net_init xfrm_sysctl_init(struct net *net) in xfrm_sysctl_init() argument
47 __xfrm_sysctl_init(net); in xfrm_sysctl_init()
52 table[0].data = &net->xfrm.sysctl_aevent_etime; in xfrm_sysctl_init()
53 table[1].data = &net->xfrm.sysctl_aevent_rseqth; in xfrm_sysctl_init()
54 table[2].data = &net->xfrm.sysctl_larval_drop; in xfrm_sysctl_init()
[all …]
Dxfrm_policy.c118 static inline struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos, in __xfrm_dst_lookup() argument
130 dst = afinfo->dst_lookup(net, tos, saddr, daddr); in __xfrm_dst_lookup()
142 struct net *net = xs_net(x); in xfrm_dst_lookup() local
156 dst = __xfrm_dst_lookup(net, tos, saddr, daddr, family); in xfrm_dst_lookup()
280 struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp) in xfrm_policy_alloc() argument
287 write_pnet(&policy->xp_net, net); in xfrm_policy_alloc()
348 static inline unsigned int idx_hash(struct net *net, u32 index) in idx_hash() argument
350 return __idx_hash(index, net->xfrm.policy_idx_hmask); in idx_hash()
354 static void __get_hash_thresh(struct net *net, in __get_hash_thresh() argument
360 *dbits = net->xfrm.policy_bydst[dir].dbits4; in __get_hash_thresh()
[all …]
Dxfrm_state.c40 static inline unsigned int xfrm_dst_hash(struct net *net, in xfrm_dst_hash() argument
46 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); in xfrm_dst_hash()
49 static inline unsigned int xfrm_src_hash(struct net *net, in xfrm_src_hash() argument
54 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); in xfrm_src_hash()
58 xfrm_spi_hash(struct net *net, const xfrm_address_t *daddr, in xfrm_spi_hash() argument
61 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash()
102 struct net *net = container_of(work, struct net, xfrm.state_hash_work); in xfrm_hash_resize() local
108 nsize = xfrm_hash_new_size(net->xfrm.state_hmask); in xfrm_hash_resize()
124 spin_lock_bh(&net->xfrm.xfrm_state_lock); in xfrm_hash_resize()
127 for (i = net->xfrm.state_hmask; i >= 0; i--) in xfrm_hash_resize()
[all …]
Dxfrm_proc.c53 struct net *net = seq->private; in xfrm_statistics_seq_show() local
57 snmp_fold_field(net->mib.xfrm_statistics, in xfrm_statistics_seq_show()
75 int __net_init xfrm_proc_init(struct net *net) in xfrm_proc_init() argument
77 if (!proc_create("xfrm_stat", S_IRUGO, net->proc_net, in xfrm_proc_init()
83 void xfrm_proc_fini(struct net *net) in xfrm_proc_fini() argument
85 remove_proc_entry("xfrm_stat", net->proc_net); in xfrm_proc_fini()
Dxfrm_user.c502 static struct xfrm_state *xfrm_state_construct(struct net *net, in xfrm_state_construct() argument
507 struct xfrm_state *x = xfrm_state_alloc(net); in xfrm_state_construct()
570 x->replay_maxdiff = net->xfrm.sysctl_aevent_rseqth; in xfrm_state_construct()
572 x->replay_maxage = (net->xfrm.sysctl_aevent_etime*HZ)/XFRM_AE_ETH_M; in xfrm_state_construct()
593 struct net *net = sock_net(skb->sk); in xfrm_add_sa() local
603 x = xfrm_state_construct(net, p, attrs, &err); in xfrm_add_sa()
631 static struct xfrm_state *xfrm_user_state_lookup(struct net *net, in xfrm_user_state_lookup() argument
643 x = xfrm_state_lookup(net, mark, &p->daddr, p->spi, p->proto, p->family); in xfrm_user_state_lookup()
654 x = xfrm_state_lookup_byaddr(net, mark, in xfrm_user_state_lookup()
668 struct net *net = sock_net(skb->sk); in xfrm_del_sa() local
[all …]
/linux-4.1.27/include/net/netfilter/
Dnf_conntrack_ecache.h37 struct net *net = nf_ct_net(ct); in nf_ct_ecache_ext_add() local
40 if (!ctmask && !expmask && net->ct.sysctl_events) { in nf_ct_ecache_ext_add()
70 int nf_conntrack_register_notifier(struct net *net,
72 void nf_conntrack_unregister_notifier(struct net *net,
80 struct net *net = nf_ct_net(ct); in nf_conntrack_event_cache() local
83 if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb)) in nf_conntrack_event_cache()
100 struct net *net = nf_ct_net(ct); in nf_conntrack_eventmask_report() local
105 notify = rcu_dereference(net->ct.nf_conntrack_event_cb); in nf_conntrack_eventmask_report()
170 int nf_ct_expect_register_notifier(struct net *net,
172 void nf_ct_expect_unregister_notifier(struct net *net,
[all …]
Dnf_conntrack_timestamp.h29 struct net *net = nf_ct_net(ct); in nf_ct_tstamp_ext_add() local
31 if (!net->ct.sysctl_tstamp) in nf_ct_tstamp_ext_add()
40 static inline bool nf_ct_tstamp_enabled(struct net *net) in nf_ct_tstamp_enabled() argument
42 return net->ct.sysctl_tstamp != 0; in nf_ct_tstamp_enabled()
45 static inline void nf_ct_set_tstamp(struct net *net, bool enable) in nf_ct_set_tstamp() argument
47 net->ct.sysctl_tstamp = enable; in nf_ct_set_tstamp()
51 int nf_conntrack_tstamp_pernet_init(struct net *net);
52 void nf_conntrack_tstamp_pernet_fini(struct net *net);
57 static inline int nf_conntrack_tstamp_pernet_init(struct net *net) in nf_conntrack_tstamp_pernet_init() argument
62 static inline void nf_conntrack_tstamp_pernet_fini(struct net *net) in nf_conntrack_tstamp_pernet_fini() argument
Dnf_conntrack_l4proto.h54 int (*error)(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb,
66 unsigned int *(*get_timeouts)(struct net *net);
91 struct net *net, void *data);
100 int (*init_net)(struct net *net, u_int16_t proto);
103 struct nf_proto_net *(*get_net_proto)(struct net *net);
125 int nf_ct_l4proto_pernet_register(struct net *net,
127 void nf_ct_l4proto_pernet_unregister(struct net *net,
151 #define LOG_INVALID(net, proto) \ argument
152 ((net)->ct.sysctl_log_invalid == (proto) || \
153 (net)->ct.sysctl_log_invalid == IPPROTO_RAW)
[all …]
Dnf_conntrack_acct.h35 struct net *net = nf_ct_net(ct); in nf_ct_acct_ext_add() local
38 if (!net->ct.sysctl_acct) in nf_ct_acct_ext_add()
53 static inline bool nf_ct_acct_enabled(struct net *net) in nf_ct_acct_enabled() argument
55 return net->ct.sysctl_acct != 0; in nf_ct_acct_enabled()
59 static inline void nf_ct_set_acct(struct net *net, bool enable) in nf_ct_set_acct() argument
61 net->ct.sysctl_acct = enable; in nf_ct_set_acct()
64 int nf_conntrack_acct_pernet_init(struct net *net);
65 void nf_conntrack_acct_pernet_fini(struct net *net);
Dnf_conntrack_core.h23 unsigned int nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
26 int nf_conntrack_init_net(struct net *net);
27 void nf_conntrack_cleanup_net(struct net *net);
30 int nf_conntrack_proto_pernet_init(struct net *net);
31 void nf_conntrack_proto_pernet_fini(struct net *net);
55 nf_conntrack_find_get(struct net *net, u16 zone,
Dnf_log.h36 typedef void nf_logfn(struct net *net,
56 void nf_log_set(struct net *net, u_int8_t pf,
58 void nf_log_unset(struct net *net, const struct nf_logger *logger);
60 int nf_log_bind_pf(struct net *net, u_int8_t pf,
62 void nf_log_unbind_pf(struct net *net, u_int8_t pf);
73 void nf_log_packet(struct net *net,
83 void nf_log_trace(struct net *net,
Dnf_conntrack_expect.h57 static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp) in nf_ct_exp_net()
72 int nf_conntrack_expect_pernet_init(struct net *net);
73 void nf_conntrack_expect_pernet_fini(struct net *net);
79 __nf_ct_expect_find(struct net *net, u16 zone,
83 nf_ct_expect_find_get(struct net *net, u16 zone,
87 nf_ct_find_expectation(struct net *net, u16 zone,
Dnf_conntrack.h143 extern struct net init_net;
145 static inline struct net *nf_ct_net(const struct nf_conn *ct) in nf_ct_net()
187 __nf_conntrack_find(struct net *net, u16 zone,
250 void nf_ct_iterate_cleanup(struct net *net,
254 struct nf_conn *nf_conntrack_alloc(struct net *net, u16 zone,
294 void nf_conntrack_tmpl_insert(struct net *net, struct nf_conn *tmpl);
296 #define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count) argument
297 #define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count) argument
/linux-4.1.27/drivers/net/usb/
Dsmsc75xx.c102 netdev_warn(dev->net, "Failed to read reg index 0x%08x: %d\n", in __smsc75xx_read_reg()
132 netdev_warn(dev->net, "Failed to write reg index 0x%08x: %d\n", in __smsc75xx_write_reg()
174 netdev_warn(dev->net, "Error reading MII_ACCESS\n"); in __smsc75xx_phy_wait_not_busy()
197 netdev_warn(dev->net, "MII is busy in smsc75xx_mdio_read\n"); in __smsc75xx_mdio_read()
209 netdev_warn(dev->net, "Error writing MII_ACCESS\n"); in __smsc75xx_mdio_read()
215 netdev_warn(dev->net, "Timed out reading MII reg %02X\n", idx); in __smsc75xx_mdio_read()
221 netdev_warn(dev->net, "Error reading MII_DATA\n"); in __smsc75xx_mdio_read()
244 netdev_warn(dev->net, "MII is busy in smsc75xx_mdio_write\n"); in __smsc75xx_mdio_write()
251 netdev_warn(dev->net, "Error writing MII_DATA\n"); in __smsc75xx_mdio_write()
263 netdev_warn(dev->net, "Error writing MII_ACCESS\n"); in __smsc75xx_mdio_write()
[all …]
Dsr9800.c67 if (skb->len < dev->net->hard_header_len) in sr_rx_fixup()
79 netdev_err(dev->net, "%s : Bad Header Length\n", in sr_rx_fixup()
84 if ((size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) || in sr_rx_fixup()
86 netdev_err(dev->net, "%s : Bad RX Length %d\n", in sr_rx_fixup()
90 sr_skb = netdev_alloc_skb_ip_align(dev->net, size); in sr_rx_fixup()
102 netdev_err(dev->net, "%s : Bad SKB Length %d\n", __func__, in sr_rx_fixup()
161 if (netif_carrier_ok(dev->net) != link) { in sr_status()
163 netdev_dbg(dev->net, "Link Status is: %d\n", link); in sr_status()
175 netdev_err(dev->net, "Failed to enable software MII access\n"); in sr_set_sw_mii()
185 netdev_err(dev->net, "Failed to enable hardware MII access\n"); in sr_set_hw_mii()
[all …]
Dax88172a.c43 return asix_mdio_read(((struct usbnet *)bus->priv)->net, phy_id, in asix_mdio_bus_read()
50 asix_mdio_write(((struct usbnet *)bus->priv)->net, phy_id, regnum, val); in asix_mdio_bus_write()
54 static int ax88172a_ioctl(struct net_device *net, struct ifreq *rq, int cmd) in ax88172a_ioctl() argument
56 if (!netif_running(net)) in ax88172a_ioctl()
59 if (!net->phydev) in ax88172a_ioctl()
62 return phy_mii_ioctl(net->phydev, rq, cmd); in ax88172a_ioctl()
105 netdev_err(dev->net, "Could not allocate MDIO bus\n"); in ax88172a_init_mdio()
127 netdev_err(dev->net, "Could not register MDIO bus\n"); in ax88172a_init_mdio()
131 netdev_info(dev->net, "registered mdio bus %s\n", priv->mdio->id); in ax88172a_init_mdio()
145 netdev_info(dev->net, "deregistering mdio bus %s\n", priv->mdio->id); in ax88172a_remove_mdio()
[all …]
Dasix_devices.c56 if (netif_carrier_ok(dev->net) != link) { in asix_status()
58 netdev_dbg(dev->net, "Link Status is: %d\n", link); in asix_status()
65 memcpy(dev->net->dev_addr, addr, ETH_ALEN); in asix_set_netdev_dev_addr()
67 netdev_info(dev->net, "invalid hw address, using random\n"); in asix_set_netdev_dev_addr()
68 eth_hw_addr_random(dev->net); in asix_set_netdev_dev_addr()
81 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
92 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
101 static u32 asix_get_link(struct net_device *net) in asix_get_link() argument
103 struct usbnet *dev = netdev_priv(net); in asix_get_link()
108 static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) in asix_ioctl() argument
[all …]
Dusbnet.c168 tmp = hex2bin(dev->net->dev_addr, buf, 6); in usbnet_get_ethernet_addr()
194 netif_dbg(dev, ifdown, dev->net, in intr_complete()
202 netdev_dbg(dev->net, "intr status %d\n", status); in intr_complete()
208 netif_err(dev, timer, dev->net, in intr_complete()
326 skb->protocol = eth_type_trans (skb, dev->net); in usbnet_skb_return()
327 dev->net->stats.rx_packets++; in usbnet_skb_return()
328 dev->net->stats.rx_bytes += skb->len; in usbnet_skb_return()
330 netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", in usbnet_skb_return()
339 netif_dbg(dev, rx_err, dev->net, in usbnet_skb_return()
376 int usbnet_change_mtu (struct net_device *net, int new_mtu) in usbnet_change_mtu() argument
[all …]
Dsmsc95xx.c95 netdev_warn(dev->net, "Failed to read reg index 0x%08x: %d\n", in __smsc95xx_read_reg()
125 netdev_warn(dev->net, "Failed to write reg index 0x%08x: %d\n", in __smsc95xx_write_reg()
167 netdev_warn(dev->net, "Error reading MII_ACCESS\n"); in __smsc95xx_phy_wait_not_busy()
190 netdev_warn(dev->net, "MII is busy in smsc95xx_mdio_read\n"); in __smsc95xx_mdio_read()
200 netdev_warn(dev->net, "Error writing MII_ADDR\n"); in __smsc95xx_mdio_read()
206 netdev_warn(dev->net, "Timed out reading MII reg %02X\n", idx); in __smsc95xx_mdio_read()
212 netdev_warn(dev->net, "Error reading MII_DATA\n"); in __smsc95xx_mdio_read()
235 netdev_warn(dev->net, "MII is busy in smsc95xx_mdio_write\n"); in __smsc95xx_mdio_write()
242 netdev_warn(dev->net, "Error writing MII_DATA\n"); in __smsc95xx_mdio_write()
252 netdev_warn(dev->net, "Error writing MII_ADDR\n"); in __smsc95xx_mdio_write()
[all …]
Ddm9601.c133 netdev_err(dev->net, "%s read timed out!\n", phy ? "phy" : "eeprom"); in dm_read_shared_word()
141 netdev_dbg(dev->net, "read shared %d 0x%02x returned 0x%04x, %d\n", in dm_read_shared_word()
176 netdev_err(dev->net, "%s write timed out!\n", phy ? "phy" : "eeprom"); in dm_write_shared_word()
200 static int dm9601_get_eeprom(struct net_device *net, in dm9601_get_eeprom() argument
203 struct usbnet *dev = netdev_priv(net); in dm9601_get_eeprom()
226 netdev_dbg(dev->net, "Only internal phy supported\n"); in dm9601_mdio_read()
232 netdev_dbg(dev->net, in dm9601_mdio_read()
246 netdev_dbg(dev->net, "Only internal phy supported\n"); in dm9601_mdio_write()
250 netdev_dbg(dev->net, "dm9601_mdio_write() phy_id=0x%02x, loc=0x%02x, val=0x%04x\n", in dm9601_mdio_write()
256 static void dm9601_get_drvinfo(struct net_device *net, in dm9601_get_drvinfo() argument
[all …]
Dasix_common.c87 netdev_err(dev->net, "asix_rx_fixup() Bad Header Length 0x%x, offset %d\n", in asix_rx_fixup_internal()
92 rx->ax_skb = netdev_alloc_skb_ip_align(dev->net, in asix_rx_fixup_internal()
98 if (rx->size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) { in asix_rx_fixup_internal()
99 netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", in asix_rx_fixup_internal()
123 netdev_err(dev->net, "asix_rx_fixup() Bad SKB Length %d, %d\n", in asix_rx_fixup_internal()
201 netdev_err(dev->net, "Failed to enable software MII access\n"); in asix_set_sw_mii()
210 netdev_err(dev->net, "Failed to enable hardware MII access\n"); in asix_set_hw_mii()
220 netdev_dbg(dev->net, "asix_get_phy_addr()\n"); in asix_read_phy_addr()
223 netdev_err(dev->net, "Error reading PHYID register: %02x\n", ret); in asix_read_phy_addr()
226 netdev_dbg(dev->net, "asix_get_phy_addr() returning 0x%04x\n", in asix_read_phy_addr()
[all …]
Dpegasus.c135 netif_dbg(pegasus, drv, pegasus->net, in get_registers()
148 netif_dbg(pegasus, drv, pegasus->net, in set_registers()
161 netif_dbg(pegasus, drv, pegasus->net, in set_register()
194 netif_device_detach(pegasus->net); in update_eth_regs_async()
195 netif_err(pegasus, drv, pegasus->net, in update_eth_regs_async()
231 netif_dbg(p, drv, p->net, "%s failed\n", __func__); in __mii_op()
290 netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); in read_eprom_word()
339 netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); in write_eprom_word()
365 memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id)); in set_ethernet_addr()
442 struct net_device *net; in read_bulk_callback() local
[all …]
Dnet1080.c153 netdev_dbg(dev->net, "registers:\n");
165 netdev_dbg(dev->net, "reg [0x%x] ==> error %d\n",
168 netdev_dbg(dev->net, "reg [0x%x] = 0x%x\n", reg, *vp);
196 netif_dbg(dev, link, dev->net, in nc_dump_usbctl()
239 netif_dbg(dev, link, dev->net, in nc_dump_status()
273 netif_dbg(dev, link, dev->net, "net1080 %s-%s ttl 0x%x this = %d, other = %d\n", in nc_dump_ttl()
289 netdev_dbg(dev->net, "can't read %s-%s status: %d\n", in net1080_reset()
297 netdev_dbg(dev->net, "can't read USBCTL, %d\n", retval); in net1080_reset()
307 netdev_dbg(dev->net, "can't read TTL, %d\n", retval); in net1080_reset()
315 netdev_dbg(dev->net, "assigned TTL, %d ms\n", NC_READ_TTL_MS); in net1080_reset()
[all …]
Dmcs7830.c332 static int mcs7830_ioctl(struct net_device *net, struct ifreq *rq, int cmd) in mcs7830_ioctl() argument
334 struct usbnet *dev = netdev_priv(net); in mcs7830_ioctl()
359 static void mcs7830_data_set_multicast(struct net_device *net) in mcs7830_data_set_multicast() argument
361 struct usbnet *dev = netdev_priv(net); in mcs7830_data_set_multicast()
371 if (net->flags & IFF_PROMISC) { in mcs7830_data_set_multicast()
373 } else if (net->flags & IFF_ALLMULTI || in mcs7830_data_set_multicast()
374 netdev_mc_count(net) > MCS7830_MAX_MCAST) { in mcs7830_data_set_multicast()
376 } else if (netdev_mc_empty(net)) { in mcs7830_data_set_multicast()
387 netdev_for_each_mc_addr(ha, net) { in mcs7830_data_set_multicast()
399 ret = mcs7830_hif_set_mac_address(dev, dev->net->dev_addr); in mcs7830_apply_base_config()
[all …]
Dipheth.c142 struct net_device *net; member
242 dev->net->stats.rx_length_errors++; in ipheth_rcvbulk_callback()
252 dev->net->stats.rx_dropped++; in ipheth_rcvbulk_callback()
257 skb->dev = dev->net; in ipheth_rcvbulk_callback()
258 skb->protocol = eth_type_trans(skb, dev->net); in ipheth_rcvbulk_callback()
260 dev->net->stats.rx_packets++; in ipheth_rcvbulk_callback()
261 dev->net->stats.rx_bytes += len; in ipheth_rcvbulk_callback()
284 netif_wake_queue(dev->net); in ipheth_sndbulk_callback()
307 netif_carrier_on(dev->net); in ipheth_carrier_set()
309 netif_carrier_off(dev->net); in ipheth_carrier_set()
[all …]
Dsierra_net.c168 static int sierra_net_change_mtu(struct net_device *net, int new_mtu);
210 netdev_err(dev->net, "Non linear buffer-dropping\n"); in check_ethip_packet()
318 netdev_err(dev->net, "Submit %s failed %d\n", cmd_name, status); in sierra_net_send_cmd()
355 netdev_err(dev->net, "%s: Data length %d, exp %Zu\n", in sierra_net_parse_lsi()
362 netdev_err(dev->net, "%s: LSI_UMTS_STATUS_LEN %d, exp %u\n", in sierra_net_parse_lsi()
370 netdev_err(dev->net, "Protocol unsupported, 0x%02x\n", in sierra_net_parse_lsi()
377 netdev_err(dev->net, "Link type unsupported: 0x%02x\n", in sierra_net_parse_lsi()
385 netdev_err(dev->net, "No coverage, 0x%02x\n", lsi->coverage); in sierra_net_parse_lsi()
391 netdev_err(dev->net, "Session idle, 0x%02x\n", in sierra_net_parse_lsi()
409 netdev_err(dev->net, "Invalid LSI\n"); in sierra_net_handle_lsi()
[all …]
Dkaweth.c228 struct net_device *net; member
268 netdev_dbg(kaweth->net, "kaweth_control()\n"); in kaweth_control()
271 netdev_dbg(kaweth->net, "in_interrupt()\n"); in kaweth_control()
303 netdev_dbg(kaweth->net, "Reading kaweth configuration\n"); in kaweth_read_configuration()
325 netdev_dbg(kaweth->net, "Setting URB size to %d\n", (unsigned)urb_size); in kaweth_set_urb_size()
347 netdev_dbg(kaweth->net, "Set SOFS wait to %d\n", (unsigned)sofs_wait); in kaweth_set_sofs_wait()
370 netdev_dbg(kaweth->net, "Set receive filter to %d\n", in kaweth_set_receive_filter()
420 netdev_dbg(kaweth->net, "High: %i, Low:%i\n", kaweth->firmware_buf[3], in kaweth_download_firmware()
423 netdev_dbg(kaweth->net, in kaweth_download_firmware()
426 netdev_dbg(kaweth->net, "Firmware length: %d\n", data_len); in kaweth_download_firmware()
[all …]
/linux-4.1.27/net/netfilter/
Dnf_conntrack_timestamp.c43 static int nf_conntrack_tstamp_init_sysctl(struct net *net) in nf_conntrack_tstamp_init_sysctl() argument
52 table[0].data = &net->ct.sysctl_tstamp; in nf_conntrack_tstamp_init_sysctl()
55 if (net->user_ns != &init_user_ns) in nf_conntrack_tstamp_init_sysctl()
58 net->ct.tstamp_sysctl_header = register_net_sysctl(net, "net/netfilter", in nf_conntrack_tstamp_init_sysctl()
60 if (!net->ct.tstamp_sysctl_header) { in nf_conntrack_tstamp_init_sysctl()
72 static void nf_conntrack_tstamp_fini_sysctl(struct net *net) in nf_conntrack_tstamp_fini_sysctl() argument
76 table = net->ct.tstamp_sysctl_header->ctl_table_arg; in nf_conntrack_tstamp_fini_sysctl()
77 unregister_net_sysctl_table(net->ct.tstamp_sysctl_header); in nf_conntrack_tstamp_fini_sysctl()
81 static int nf_conntrack_tstamp_init_sysctl(struct net *net) in nf_conntrack_tstamp_init_sysctl() argument
86 static void nf_conntrack_tstamp_fini_sysctl(struct net *net) in nf_conntrack_tstamp_fini_sysctl() argument
[all …]
Dnf_conntrack_ecache.c120 struct net *net = nf_ct_net(ct); in nf_ct_deliver_cached_events() local
128 notify = rcu_dereference(net->ct.nf_conntrack_event_cb); in nf_ct_deliver_cached_events()
170 int nf_conntrack_register_notifier(struct net *net, in nf_conntrack_register_notifier() argument
177 notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb, in nf_conntrack_register_notifier()
183 rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new); in nf_conntrack_register_notifier()
192 void nf_conntrack_unregister_notifier(struct net *net, in nf_conntrack_unregister_notifier() argument
198 notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb, in nf_conntrack_unregister_notifier()
201 RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, NULL); in nf_conntrack_unregister_notifier()
206 int nf_ct_expect_register_notifier(struct net *net, in nf_ct_expect_register_notifier() argument
213 notify = rcu_dereference_protected(net->ct.nf_expect_event_cb, in nf_ct_expect_register_notifier()
[all …]
Dnf_conntrack_acct.c65 static int nf_conntrack_acct_init_sysctl(struct net *net) in nf_conntrack_acct_init_sysctl() argument
74 table[0].data = &net->ct.sysctl_acct; in nf_conntrack_acct_init_sysctl()
77 if (net->user_ns != &init_user_ns) in nf_conntrack_acct_init_sysctl()
80 net->ct.acct_sysctl_header = register_net_sysctl(net, "net/netfilter", in nf_conntrack_acct_init_sysctl()
82 if (!net->ct.acct_sysctl_header) { in nf_conntrack_acct_init_sysctl()
94 static void nf_conntrack_acct_fini_sysctl(struct net *net) in nf_conntrack_acct_fini_sysctl() argument
98 table = net->ct.acct_sysctl_header->ctl_table_arg; in nf_conntrack_acct_fini_sysctl()
99 unregister_net_sysctl_table(net->ct.acct_sysctl_header); in nf_conntrack_acct_fini_sysctl()
103 static int nf_conntrack_acct_init_sysctl(struct net *net) in nf_conntrack_acct_init_sysctl() argument
108 static void nf_conntrack_acct_fini_sysctl(struct net *net) in nf_conntrack_acct_fini_sysctl() argument
[all …]
Dnf_conntrack_standalone.c57 struct net *net = seq_file_net(seq); in ct_get_first() local
62 st->bucket < net->ct.htable_size; in ct_get_first()
64 n = rcu_dereference(hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_first()
74 struct net *net = seq_file_net(seq); in ct_get_next() local
80 if (++st->bucket >= net->ct.htable_size) in ct_get_next()
85 &net->ct.hash[st->bucket])); in ct_get_next()
272 struct net *net = seq_file_net(seq); in ct_cpu_seq_start() local
282 return per_cpu_ptr(net->ct.stat, cpu); in ct_cpu_seq_start()
290 struct net *net = seq_file_net(seq); in ct_cpu_seq_next() local
297 return per_cpu_ptr(net->ct.stat, cpu); in ct_cpu_seq_next()
[all …]
Dnf_conntrack_core.c79 static bool nf_conntrack_double_lock(struct net *net, unsigned int h1, in nf_conntrack_double_lock() argument
94 if (read_seqcount_retry(&net->ct.generation, sequence)) { in nf_conntrack_double_lock()
148 static u32 hash_bucket(u32 hash, const struct net *net) in hash_bucket() argument
150 return __hash_bucket(hash, net->ct.htable_size); in hash_bucket()
159 static inline u_int32_t hash_conntrack(const struct net *net, u16 zone, in hash_conntrack() argument
162 return __hash_conntrack(tuple, zone, net->ct.htable_size); in hash_conntrack()
294 struct net *net = nf_ct_net(ct); in destroy_conntrack() local
318 NF_CT_STAT_INC(net, delete); in destroy_conntrack()
330 struct net *net = nf_ct_net(ct); in nf_ct_delete_from_lists() local
339 sequence = read_seqcount_begin(&net->ct.generation); in nf_ct_delete_from_lists()
[all …]
Dnf_log.c42 void nf_log_set(struct net *net, u_int8_t pf, const struct nf_logger *logger) in nf_log_set() argument
50 log = nft_log_dereference(net->nf.nf_loggers[pf]); in nf_log_set()
52 rcu_assign_pointer(net->nf.nf_loggers[pf], logger); in nf_log_set()
58 void nf_log_unset(struct net *net, const struct nf_logger *logger) in nf_log_unset() argument
65 log = nft_log_dereference(net->nf.nf_loggers[i]); in nf_log_unset()
67 RCU_INIT_POINTER(net->nf.nf_loggers[i], NULL); in nf_log_unset()
124 int nf_log_bind_pf(struct net *net, u_int8_t pf, in nf_log_bind_pf() argument
127 if (pf >= ARRAY_SIZE(net->nf.nf_loggers)) in nf_log_bind_pf()
134 rcu_assign_pointer(net->nf.nf_loggers[pf], logger); in nf_log_bind_pf()
140 void nf_log_unbind_pf(struct net *net, u_int8_t pf) in nf_log_unbind_pf() argument
[all …]
Dnf_conntrack_proto.c39 nf_ct_register_sysctl(struct net *net, in nf_ct_register_sysctl() argument
45 *header = register_net_sysctl(net, path, table); in nf_ct_register_sysctl()
162 static struct nf_ip_net *nf_ct_l3proto_net(struct net *net, in nf_ct_l3proto_net() argument
166 return &net->ct.nf_ct_proto; in nf_ct_l3proto_net()
171 static int nf_ct_l3proto_register_sysctl(struct net *net, in nf_ct_l3proto_register_sysctl() argument
175 struct nf_ip_net *in = nf_ct_l3proto_net(net, l3proto); in nf_ct_l3proto_register_sysctl()
182 err = nf_ct_register_sysctl(net, in nf_ct_l3proto_register_sysctl()
195 static void nf_ct_l3proto_unregister_sysctl(struct net *net, in nf_ct_l3proto_unregister_sysctl() argument
198 struct nf_ip_net *in = nf_ct_l3proto_net(net, l3proto); in nf_ct_l3proto_unregister_sysctl()
241 int nf_ct_l3proto_pernet_register(struct net *net, in nf_ct_l3proto_pernet_register() argument
[all …]
Dnf_conntrack_proto_udplite.c44 static inline struct udplite_net *udplite_pernet(struct net *net) in udplite_pernet() argument
46 return net_generic(net, udplite_net_id); in udplite_pernet()
82 static unsigned int *udplite_get_timeouts(struct net *net) in udplite_get_timeouts() argument
84 return udplite_pernet(net)->timeouts; in udplite_get_timeouts()
118 static int udplite_error(struct net *net, struct nf_conn *tmpl, in udplite_error() argument
133 if (LOG_INVALID(net, IPPROTO_UDPLITE)) in udplite_error()
134 nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, in udplite_error()
143 if (LOG_INVALID(net, IPPROTO_UDPLITE)) in udplite_error()
144 nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, in udplite_error()
151 if (LOG_INVALID(net, IPPROTO_UDPLITE)) in udplite_error()
[all …]
Dnf_conntrack_helper.c58 static int nf_conntrack_helper_init_sysctl(struct net *net) in nf_conntrack_helper_init_sysctl() argument
67 table[0].data = &net->ct.sysctl_auto_assign_helper; in nf_conntrack_helper_init_sysctl()
70 if (net->user_ns != &init_user_ns) in nf_conntrack_helper_init_sysctl()
73 net->ct.helper_sysctl_header = in nf_conntrack_helper_init_sysctl()
74 register_net_sysctl(net, "net/netfilter", table); in nf_conntrack_helper_init_sysctl()
76 if (!net->ct.helper_sysctl_header) { in nf_conntrack_helper_init_sysctl()
88 static void nf_conntrack_helper_fini_sysctl(struct net *net) in nf_conntrack_helper_fini_sysctl() argument
92 table = net->ct.helper_sysctl_header->ctl_table_arg; in nf_conntrack_helper_fini_sysctl()
93 unregister_net_sysctl_table(net->ct.helper_sysctl_header); in nf_conntrack_helper_fini_sysctl()
97 static int nf_conntrack_helper_init_sysctl(struct net *net) in nf_conntrack_helper_init_sysctl() argument
[all …]
Dnf_conntrack_proto_gre.c64 static inline struct netns_proto_gre *gre_pernet(struct net *net) in gre_pernet() argument
66 return net_generic(net, proto_gre_net_id); in gre_pernet()
69 static void nf_ct_gre_keymap_flush(struct net *net) in nf_ct_gre_keymap_flush() argument
71 struct netns_proto_gre *net_gre = gre_pernet(net); in nf_ct_gre_keymap_flush()
93 static __be16 gre_keymap_lookup(struct net *net, struct nf_conntrack_tuple *t) in gre_keymap_lookup() argument
95 struct netns_proto_gre *net_gre = gre_pernet(net); in gre_keymap_lookup()
118 struct net *net = nf_ct_net(ct); in nf_ct_gre_keymap_add() local
119 struct netns_proto_gre *net_gre = gre_pernet(net); in nf_ct_gre_keymap_add()
159 struct net *net = nf_ct_net(ct); in nf_ct_gre_keymap_destroy() local
160 struct netns_proto_gre *net_gre = gre_pernet(net); in nf_ct_gre_keymap_destroy()
[all …]
Dxt_addrtype.c36 static u32 match_lookup_rt6(struct net *net, const struct net_device *dev, in match_lookup_rt6() argument
58 if (v6ops && v6ops->chk_addr(net, addr, dev, true)) in match_lookup_rt6()
61 route_err = afinfo->route(net, (struct dst_entry **)&rt, in match_lookup_rt6()
83 static bool match_type6(struct net *net, const struct net_device *dev, in match_type6() argument
98 return !!(mask & match_lookup_rt6(net, dev, addr, mask)); in match_type6()
103 addrtype_mt6(struct net *net, const struct net_device *dev, in addrtype_mt6() argument
110 ret &= match_type6(net, dev, &iph->saddr, info->source) ^ in addrtype_mt6()
113 ret &= match_type6(net, dev, &iph->daddr, info->dest) ^ in addrtype_mt6()
119 static inline bool match_type(struct net *net, const struct net_device *dev, in match_type() argument
122 return !!(mask & (1 << inet_dev_addr_type(net, dev, addr))); in match_type()
[all …]
Dnf_conntrack_expect.c47 struct net *net = nf_ct_exp_net(exp); in nf_ct_unlink_expect_report() local
53 net->ct.expect_count--; in nf_ct_unlink_expect_report()
61 NF_CT_STAT_INC(net, expect_delete); in nf_ct_unlink_expect_report()
91 __nf_ct_expect_find(struct net *net, u16 zone, in __nf_ct_expect_find() argument
97 if (!net->ct.expect_count) in __nf_ct_expect_find()
101 hlist_for_each_entry_rcu(i, &net->ct.expect_hash[h], hnode) { in __nf_ct_expect_find()
112 nf_ct_expect_find_get(struct net *net, u16 zone, in nf_ct_expect_find_get() argument
118 i = __nf_ct_expect_find(net, zone, tuple); in nf_ct_expect_find_get()
130 nf_ct_find_expectation(struct net *net, u16 zone, in nf_ct_find_expectation() argument
136 if (!net->ct.expect_count) in nf_ct_find_expectation()
[all …]
Dnf_tables_inet.c41 static int __net_init nf_tables_inet_init_net(struct net *net) in nf_tables_inet_init_net() argument
43 net->nft.inet = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_inet_init_net()
44 if (net->nft.inet == NULL) in nf_tables_inet_init_net()
46 memcpy(net->nft.inet, &nft_af_inet, sizeof(nft_af_inet)); in nf_tables_inet_init_net()
48 if (nft_register_afinfo(net, net->nft.inet) < 0) in nf_tables_inet_init_net()
54 kfree(net->nft.inet); in nf_tables_inet_init_net()
58 static void __net_exit nf_tables_inet_exit_net(struct net *net) in nf_tables_inet_exit_net() argument
60 nft_unregister_afinfo(net->nft.inet); in nf_tables_inet_exit_net()
61 kfree(net->nft.inet); in nf_tables_inet_exit_net()
Dnfnetlink.c119 int nfnetlink_has_listeners(struct net *net, unsigned int group) in nfnetlink_has_listeners() argument
121 return netlink_has_listeners(net->nfnl, group); in nfnetlink_has_listeners()
125 struct sk_buff *nfnetlink_alloc_skb(struct net *net, unsigned int size, in nfnetlink_alloc_skb() argument
128 return netlink_alloc_skb(net->nfnl, size, dst_portid, gfp_mask); in nfnetlink_alloc_skb()
132 int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid, in nfnetlink_send() argument
135 return nlmsg_notify(net->nfnl, skb, portid, group, echo, flags); in nfnetlink_send()
139 int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error) in nfnetlink_set_err() argument
141 return netlink_set_err(net->nfnl, portid, group, error); in nfnetlink_set_err()
145 int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid, in nfnetlink_unicast() argument
148 return netlink_unicast(net->nfnl, skb, portid, flags); in nfnetlink_unicast()
[all …]
Dnf_conntrack_proto_udp.c34 static inline struct nf_udp_net *udp_pernet(struct net *net) in udp_pernet() argument
36 return &net->ct.nf_ct_proto.udp; in udp_pernet()
74 static unsigned int *udp_get_timeouts(struct net *net) in udp_get_timeouts() argument
76 return udp_pernet(net)->timeouts; in udp_get_timeouts()
110 static int udp_error(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb, in udp_error() argument
122 if (LOG_INVALID(net, IPPROTO_UDP)) in udp_error()
123 nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, in udp_error()
130 if (LOG_INVALID(net, IPPROTO_UDP)) in udp_error()
131 nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, in udp_error()
144 if (net->ct.sysctl_checksum && hooknum == NF_INET_PRE_ROUTING && in udp_error()
[all …]
Dnf_conntrack_proto_generic.c41 static inline struct nf_generic_net *generic_pernet(struct net *net) in generic_pernet() argument
43 return &net->ct.nf_ct_proto.generic; in generic_pernet()
71 static unsigned int *generic_get_timeouts(struct net *net) in generic_get_timeouts() argument
73 return &(generic_pernet(net)->timeout); in generic_get_timeouts()
102 struct net *net, void *data) in generic_timeout_nlattr_to_obj() argument
105 struct nf_generic_net *gn = generic_pernet(net); in generic_timeout_nlattr_to_obj()
193 static int generic_init_net(struct net *net, u_int16_t proto) in generic_init_net() argument
196 struct nf_generic_net *gn = generic_pernet(net); in generic_init_net()
212 static struct nf_proto_net *generic_get_net_proto(struct net *net) in generic_get_net_proto() argument
214 return &net->ct.nf_ct_proto.generic.pn; in generic_get_net_proto()
Dnf_conntrack_proto_dccp.c395 static inline struct dccp_net *dccp_pernet(struct net *net) in dccp_pernet() argument
397 return net_generic(net, dccp_net_id); in dccp_pernet()
425 struct net *net = nf_ct_net(ct); in dccp_new() local
437 dn = dccp_pernet(net); in dccp_new()
458 if (LOG_INVALID(net, IPPROTO_DCCP)) in dccp_new()
459 nf_log_packet(net, nf_ct_l3num(ct), 0, skb, NULL, NULL, in dccp_new()
473 static unsigned int *dccp_get_timeouts(struct net *net) in dccp_get_timeouts() argument
475 return dccp_pernet(net)->dccp_timeout; in dccp_get_timeouts()
483 struct net *net = nf_ct_net(ct); in dccp_packet() local
545 if (LOG_INVALID(net, IPPROTO_DCCP)) in dccp_packet()
[all …]
Dnf_synproxy_core.c324 static int __net_init synproxy_proc_init(struct net *net) in synproxy_proc_init() argument
326 if (!proc_create("synproxy", S_IRUGO, net->proc_net_stat, in synproxy_proc_init()
332 static void __net_exit synproxy_proc_exit(struct net *net) in synproxy_proc_exit() argument
334 remove_proc_entry("synproxy", net->proc_net_stat); in synproxy_proc_exit()
337 static int __net_init synproxy_proc_init(struct net *net) in synproxy_proc_init() argument
342 static void __net_exit synproxy_proc_exit(struct net *net) in synproxy_proc_exit() argument
348 static int __net_init synproxy_net_init(struct net *net) in synproxy_net_init() argument
350 struct synproxy_net *snet = synproxy_pernet(net); in synproxy_net_init()
356 ct = nf_conntrack_alloc(net, 0, &t, &t, GFP_KERNEL); in synproxy_net_init()
367 nf_conntrack_tmpl_insert(net, ct); in synproxy_net_init()
[all …]
Dnfnetlink_log.c64 struct net *net; member
90 static struct nfnl_log_net *nfnl_log_pernet(struct net *net) in nfnl_log_pernet() argument
92 return net_generic(net, nfnl_log_net_id); in nfnl_log_pernet()
139 put_net(inst->net); in nfulnl_instance_free_rcu()
154 instance_create(struct net *net, u_int16_t group_num, in instance_create() argument
158 struct nfnl_log_net *log = nfnl_log_pernet(net); in instance_create()
186 inst->net = get_net(net); in instance_create()
326 nfulnl_alloc_skb(struct net *net, u32 peer_portid, unsigned int inst_size, in nfulnl_alloc_skb() argument
336 skb = nfnetlink_alloc_skb(net, n, peer_portid, GFP_ATOMIC); in nfulnl_alloc_skb()
342 skb = nfnetlink_alloc_skb(net, pkt_size, in nfulnl_alloc_skb()
[all …]
/linux-4.1.27/include/linux/sunrpc/
Dstats.h41 struct net;
43 int rpc_proc_init(struct net *);
44 void rpc_proc_exit(struct net *);
46 static inline int rpc_proc_init(struct net *net) in rpc_proc_init() argument
51 static inline void rpc_proc_exit(struct net *net) in rpc_proc_exit() argument
61 struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
62 void rpc_proc_unregister(struct net *,const char *);
64 struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *,
66 void svc_proc_unregister(struct net *, const char *);
72 static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { retur… in rpc_proc_register() argument
[all …]
Drpc_pipe_fs.h87 extern int rpc_pipefs_init_net(struct net *net);
88 extern void rpc_pipefs_exit_net(struct net *net);
89 extern struct super_block *rpc_get_sb_net(const struct net *net);
90 extern void rpc_put_sb_net(const struct net *net);
104 extern int rpc_add_pipe_dir_object(struct net *net,
107 extern void rpc_remove_pipe_dir_object(struct net *net,
111 struct net *net,
134 extern bool gssd_running(struct net *net);
Dsvcauth.h149 extern int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom);
152 extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr);
154 extern void svcauth_unix_purge(struct net *net);
158 extern int unix_gid_cache_create(struct net *net);
159 extern void unix_gid_cache_destroy(struct net *net);
/linux-4.1.27/net/sctp/
Dsm_statefuns.c62 static struct sctp_packet *sctp_abort_pkt_new(struct net *net,
71 static struct sctp_packet *sctp_ootb_pkt_new(struct net *net,
74 static void sctp_send_stale_cookie_err(struct net *net,
80 static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net,
86 static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net,
92 static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net,
100 static sctp_disposition_t sctp_stop_t1_and_abort(struct net *net,
107 struct net *net,
116 struct net *net,
124 struct net *net,
[all …]
Dprotocol.c84 static int __net_init sctp_proc_init(struct net *net) in sctp_proc_init() argument
87 net->sctp.proc_net_sctp = proc_net_mkdir(net, "sctp", net->proc_net); in sctp_proc_init()
88 if (!net->sctp.proc_net_sctp) in sctp_proc_init()
90 if (sctp_snmp_proc_init(net)) in sctp_proc_init()
92 if (sctp_eps_proc_init(net)) in sctp_proc_init()
94 if (sctp_assocs_proc_init(net)) in sctp_proc_init()
96 if (sctp_remaddr_proc_init(net)) in sctp_proc_init()
102 sctp_assocs_proc_exit(net); in sctp_proc_init()
104 sctp_eps_proc_exit(net); in sctp_proc_init()
106 sctp_snmp_proc_exit(net); in sctp_proc_init()
[all …]
Dinput.c62 static struct sctp_association *__sctp_rcv_lookup(struct net *net,
67 static struct sctp_endpoint *__sctp_rcv_lookup_endpoint(struct net *net,
70 struct net *net,
79 static inline int sctp_rcv_checksum(struct net *net, struct sk_buff *skb) in sctp_rcv_checksum() argument
87 SCTP_INC_STATS_BH(net, SCTP_MIB_CHECKSUMERRORS); in sctp_rcv_checksum()
120 struct net *net = dev_net(skb->dev); in sctp_rcv() local
125 SCTP_INC_STATS_BH(net, SCTP_MIB_INSCTPPACKS); in sctp_rcv()
140 else if (!sctp_checksum_disable && sctp_rcv_checksum(net, skb) < 0) in sctp_rcv()
174 asoc = __sctp_rcv_lookup(net, skb, &src, &dest, &transport); in sctp_rcv()
177 ep = __sctp_rcv_lookup_endpoint(net, &dest); in sctp_rcv()
[all …]
Dsysctl.c319 struct net *net = current->nsproxy->net_ns; in proc_sctp_do_hmac_alg() local
332 tbl.data = net->sctp.sctp_hmac_alg ? : none; in proc_sctp_do_hmac_alg()
340 net->sctp.sctp_hmac_alg = "md5"; in proc_sctp_do_hmac_alg()
346 net->sctp.sctp_hmac_alg = "sha1"; in proc_sctp_do_hmac_alg()
351 net->sctp.sctp_hmac_alg = NULL; in proc_sctp_do_hmac_alg()
365 struct net *net = current->nsproxy->net_ns; in proc_sctp_do_rto_min() local
377 tbl.data = &net->sctp.rto_min; in proc_sctp_do_rto_min()
384 net->sctp.rto_min = new_value; in proc_sctp_do_rto_min()
394 struct net *net = current->nsproxy->net_ns; in proc_sctp_do_rto_max() local
406 tbl.data = &net->sctp.rto_max; in proc_sctp_do_rto_max()
[all …]
Dproc.c76 struct net *net = seq->private; in sctp_snmp_seq_show() local
81 snmp_fold_field(net->sctp.sctp_statistics, in sctp_snmp_seq_show()
102 int __net_init sctp_snmp_proc_init(struct net *net) in sctp_snmp_proc_init() argument
106 p = proc_create("snmp", S_IRUGO, net->sctp.proc_net_sctp, in sctp_snmp_proc_init()
115 void sctp_snmp_proc_exit(struct net *net) in sctp_snmp_proc_exit() argument
117 remove_proc_entry("snmp", net->sctp.proc_net_sctp); in sctp_snmp_proc_exit()
266 int __net_init sctp_eps_proc_init(struct net *net) in sctp_eps_proc_init() argument
270 p = proc_create("eps", S_IRUGO, net->sctp.proc_net_sctp, in sctp_eps_proc_init()
279 void sctp_eps_proc_exit(struct net *net) in sctp_eps_proc_exit() argument
281 remove_proc_entry("eps", net->sctp.proc_net_sctp); in sctp_eps_proc_exit()
[all …]
/linux-4.1.27/net/ipv6/
Dsysctl_net_ipv6.c93 static int __net_init ipv6_sysctl_net_init(struct net *net) in ipv6_sysctl_net_init() argument
105 ipv6_table[0].data = &net->ipv6.sysctl.bindv6only; in ipv6_sysctl_net_init()
106 ipv6_table[1].data = &net->ipv6.sysctl.anycast_src_echo_reply; in ipv6_sysctl_net_init()
107 ipv6_table[2].data = &net->ipv6.sysctl.flowlabel_consistency; in ipv6_sysctl_net_init()
108 ipv6_table[3].data = &net->ipv6.sysctl.auto_flowlabels; in ipv6_sysctl_net_init()
109 ipv6_table[4].data = &net->ipv6.sysctl.fwmark_reflect; in ipv6_sysctl_net_init()
110 ipv6_table[5].data = &net->ipv6.sysctl.idgen_retries; in ipv6_sysctl_net_init()
111 ipv6_table[6].data = &net->ipv6.sysctl.idgen_delay; in ipv6_sysctl_net_init()
113 ipv6_route_table = ipv6_route_sysctl_init(net); in ipv6_sysctl_net_init()
117 ipv6_icmp_table = ipv6_icmp_sysctl_init(net); in ipv6_sysctl_net_init()
[all …]
Dproc.c35 struct net *net = seq->private; in sockstat6_seq_show() local
36 unsigned int frag_mem = ip6_frag_mem(net); in sockstat6_seq_show()
39 sock_prot_inuse_get(net, &tcpv6_prot)); in sockstat6_seq_show()
41 sock_prot_inuse_get(net, &udpv6_prot)); in sockstat6_seq_show()
43 sock_prot_inuse_get(net, &udplitev6_prot)); in sockstat6_seq_show()
45 sock_prot_inuse_get(net, &rawv6_prot)); in sockstat6_seq_show()
217 struct net *net = (struct net *)seq->private; in snmp6_seq_show() local
219 snmp6_seq_show_item64(seq, net->mib.ipv6_statistics, in snmp6_seq_show()
221 snmp6_seq_show_item(seq, net->mib.icmpv6_statistics, in snmp6_seq_show()
223 snmp6_seq_show_icmpv6msg(seq, net->mib.icmpv6msg_statistics->mibs); in snmp6_seq_show()
[all …]
Dip6_fib.c51 struct net *net; member
65 static void fib6_prune_clones(struct net *net, struct fib6_node *fn);
66 static struct rt6_info *fib6_find_prefix(struct net *net, struct fib6_node *fn);
67 static struct fib6_node *fib6_repair_tree(struct net *net, struct fib6_node *fn);
97 static int fib6_new_sernum(struct net *net) in fib6_new_sernum() argument
102 old = atomic_read(&net->ipv6.fib6_sernum); in fib6_new_sernum()
104 } while (atomic_cmpxchg(&net->ipv6.fib6_sernum, in fib6_new_sernum()
163 static void fib6_link_table(struct net *net, struct fib6_table *tb) in fib6_link_table() argument
179 hlist_add_head_rcu(&tb->tb6_hlist, &net->ipv6.fib_table_hash[h]); in fib6_link_table()
184 static struct fib6_table *fib6_alloc_table(struct net *net, u32 id) in fib6_alloc_table() argument
[all …]
Dxfrm6_tunnel.c48 static inline struct xfrm6_tunnel_net *xfrm6_tunnel_pernet(struct net *net) in xfrm6_tunnel_pernet() argument
50 return net_generic(net, xfrm6_tunnel_net_id); in xfrm6_tunnel_pernet()
87 static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *sa… in __xfrm6_tunnel_spi_lookup() argument
89 struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); in __xfrm6_tunnel_spi_lookup()
102 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) in xfrm6_tunnel_spi_lookup() argument
108 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); in xfrm6_tunnel_spi_lookup()
115 static int __xfrm6_tunnel_spi_check(struct net *net, u32 spi) in __xfrm6_tunnel_spi_check() argument
117 struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); in __xfrm6_tunnel_spi_check()
130 static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) in __xfrm6_tunnel_alloc_spi() argument
132 struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net); in __xfrm6_tunnel_alloc_spi()
[all …]
Droute.c98 static struct rt6_info *rt6_add_route_info(struct net *net,
102 static struct rt6_info *rt6_get_route_info(struct net *net,
302 static inline struct rt6_info *ip6_dst_alloc(struct net *net, in ip6_dst_alloc() argument
307 struct rt6_info *rt = dst_alloc(&net->ipv6.ip6_dst_ops, dev, in ip6_dst_alloc()
314 rt6_init_peer(rt, table ? &table->tb6_peers : net->ipv6.peers); in ip6_dst_alloc()
437 static inline struct rt6_info *rt6_device_match(struct net *net, in rt6_device_match() argument
467 if (ipv6_chk_addr(net, saddr, dev, in rt6_device_match()
478 return net->ipv6.ip6_null_entry; in rt6_device_match()
672 struct net *net; in rt6_select() local
693 net = dev_net(rt0->dst.dev); in rt6_select()
[all …]
Dxfrm6_policy.c29 static struct dst_entry *xfrm6_dst_lookup(struct net *net, int tos, in xfrm6_dst_lookup() argument
42 dst = ip6_route_output(net, NULL, &fl6); in xfrm6_dst_lookup()
53 static int xfrm6_get_saddr(struct net *net, in xfrm6_get_saddr() argument
59 dst = xfrm6_dst_lookup(net, 0, NULL, daddr); in xfrm6_get_saddr()
74 static void xfrm6_init_dst(struct net *net, struct xfrm_dst *xdst) in xfrm6_init_dst() argument
78 rt6_init_peer(rt, net->ipv6.peers); in xfrm6_init_dst()
227 struct net *net = container_of(ops, struct net, xfrm.xfrm6_dst_ops); in xfrm6_garbage_collect() local
229 xfrm6_policy_afinfo.garbage_collect(net); in xfrm6_garbage_collect()
339 static int __net_init xfrm6_net_sysctl_init(struct net *net) in xfrm6_net_sysctl_init() argument
345 if (!net_eq(net, &init_net)) { in xfrm6_net_sysctl_init()
[all …]
Dreassembly.c131 void ip6_expire_frag_queue(struct net *net, struct frag_queue *fq, in ip6_expire_frag_queue() argument
144 dev = dev_get_by_index_rcu(net, fq->iif); in ip6_expire_frag_queue()
148 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); in ip6_expire_frag_queue()
153 IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMTIMEOUT); in ip6_expire_frag_queue()
176 struct net *net; in ip6_frag_expire() local
179 net = container_of(fq->q.net, struct net, ipv6.frags); in ip6_frag_expire()
181 ip6_expire_frag_queue(net, fq, &ip6_frags); in ip6_frag_expire()
185 fq_find(struct net *net, __be32 id, const struct in6_addr *src, in fq_find() argument
201 q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash); in fq_find()
215 struct net *net = dev_net(skb_dst(skb)->dev); in ip6_frag_queue() local
[all …]
Daf_inet6.c100 static int inet6_create(struct net *net, struct socket *sock, int protocol, in inet6_create() argument
162 !ns_capable(net->user_ns, CAP_NET_RAW)) in inet6_create()
173 sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot); in inet6_create()
203 sk->sk_ipv6only = net->ipv6.sysctl.bindv6only; in inet6_create()
216 if (net->ipv4.sysctl_ip_no_pmtu_disc) in inet6_create()
261 struct net *net = sock_net(sk); in inet6_bind() local
282 if (snum && snum < PROT_SOCK && !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) in inet6_bind()
307 chk_addr_ret = inet_addr_type(net, v4addr); in inet6_bind()
308 if (!net->ipv4.sysctl_ip_nonlocal_bind && in inet6_bind()
336 dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if); in inet6_bind()
[all …]
Dinet6_hashtables.c26 u32 inet6_ehashfn(const struct net *net, in inet6_ehashfn() argument
42 inet6_ehash_secret + net_hash_mix(net)); in inet6_ehashfn()
51 struct sock *__inet6_lookup_established(struct net *net, in __inet6_lookup_established() argument
65 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established()
75 if (!INET6_MATCH(sk, net, saddr, daddr, ports, dif)) in __inet6_lookup_established()
80 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr, ports, dif))) { in __inet6_lookup_established()
96 static inline int compute_score(struct sock *sk, struct net *net, in compute_score() argument
103 if (net_eq(sock_net(sk), net) && inet_sk(sk)->inet_num == hnum && in compute_score()
121 struct sock *inet6_lookup_listener(struct net *net, in inet6_lookup_listener() argument
131 unsigned int hash = inet_lhashfn(net, hnum); in inet6_lookup_listener()
[all …]
Daddrlabel.c51 struct net *ip6addrlbl_net(const struct ip6addrlbl_entry *lbl) in ip6addrlbl_net()
150 static bool __ip6addrlbl_match(struct net *net, in __ip6addrlbl_match() argument
155 if (!net_eq(ip6addrlbl_net(p), net)) in __ip6addrlbl_match()
166 static struct ip6addrlbl_entry *__ipv6_addr_label(struct net *net, in __ipv6_addr_label() argument
172 if (__ip6addrlbl_match(net, p, addr, type, ifindex)) in __ipv6_addr_label()
178 u32 ipv6_addr_label(struct net *net, in ipv6_addr_label() argument
187 p = __ipv6_addr_label(net, addr, type, ifindex); in ipv6_addr_label()
198 static struct ip6addrlbl_entry *ip6addrlbl_alloc(struct net *net, in ip6addrlbl_alloc() argument
238 write_pnet(&newp->lbl_net, net); in ip6addrlbl_alloc()
283 static int ip6addrlbl_add(struct net *net, in ip6addrlbl_add() argument
[all …]
Dip6mr.c59 possible_net_t net; member
108 static struct mr6_table *ip6mr_new_table(struct net *net, u32 id);
111 static void ip6_mr_forward(struct net *net, struct mr6_table *mrt,
125 #define ip6mr_for_each_table(mrt, net) \ argument
126 list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list)
128 static struct mr6_table *ip6mr_get_table(struct net *net, u32 id) in ip6mr_get_table() argument
132 ip6mr_for_each_table(mrt, net) { in ip6mr_get_table()
139 static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6, in ip6mr_fib_lookup() argument
149 err = fib_rules_lookup(net->ipv6.mr6_rules_ops, in ip6mr_fib_lookup()
227 static int __net_init ip6mr_rules_init(struct net *net) in ip6mr_rules_init() argument
[all …]
Dfib6_rules.c32 struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, in fib6_rule_lookup() argument
40 fib_rules_lookup(net->ipv6.fib6_rules_ops, in fib6_rule_lookup()
46 dst_hold(&net->ipv6.ip6_null_entry->dst); in fib6_rule_lookup()
47 return &net->ipv6.ip6_null_entry->dst; in fib6_rule_lookup()
56 struct net *net = rule->fr_net; in fib6_rule_action() local
65 rt = net->ipv6.ip6_null_entry; in fib6_rule_action()
70 rt = net->ipv6.ip6_blk_hole_entry; in fib6_rule_action()
74 rt = net->ipv6.ip6_prohibit_entry; in fib6_rule_action()
78 table = fib6_get_table(net, rule->table); in fib6_rule_action()
84 rt = lookup(net, table, flp6, flags); in fib6_rule_action()
[all …]
Dicmp.c81 static inline struct sock *icmpv6_sk(struct net *net) in icmpv6_sk() argument
83 return net->ipv6.icmp_sk[smp_processor_id()]; in icmpv6_sk()
91 struct net *net = dev_net(skb->dev); in icmpv6_err() local
94 ip6_update_pmtu(skb, net, info, 0, 0); in icmpv6_err()
96 ip6_redirect(skb, net, skb->dev->ifindex, 0); in icmpv6_err()
111 static __inline__ struct sock *icmpv6_xmit_lock(struct net *net) in icmpv6_xmit_lock() argument
117 sk = icmpv6_sk(net); in icmpv6_xmit_lock()
175 struct net *net = sock_net(sk); in icmpv6_xrlim_allow() local
192 dst = ip6_route_output(net, sk, fl6); in icmpv6_xrlim_allow()
194 IP6_INC_STATS(net, ip6_dst_idev(dst), in icmpv6_xrlim_allow()
[all …]
Dip6_flowlabel.c74 static inline struct ip6_flowlabel *__fl_lookup(struct net *net, __be32 label) in __fl_lookup() argument
79 if (fl->label == label && net_eq(fl->fl_net, net)) in __fl_lookup()
85 static struct ip6_flowlabel *fl_lookup(struct net *net, __be32 label) in fl_lookup() argument
90 fl = __fl_lookup(net, label); in fl_lookup()
170 static void __net_exit ip6_fl_purge(struct net *net) in ip6_fl_purge() argument
182 if (net_eq(fl->fl_net, net) && in ip6_fl_purge()
195 static struct ip6_flowlabel *fl_intern(struct net *net, in fl_intern() argument
207 lfl = __fl_lookup(net, fl->label); in fl_intern()
221 lfl = __fl_lookup(net, fl->label); in fl_intern()
354 fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq, in fl_create() argument
[all …]
Danycast.c59 struct net *net = sock_net(sk); in ipv6_sock_ac_join() local
60 int ishost = !net->ipv6.devconf_all->forwarding; in ipv6_sock_ac_join()
65 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in ipv6_sock_ac_join()
69 if (ipv6_chk_addr(net, addr, NULL, 0)) in ipv6_sock_ac_join()
81 rt = rt6_lookup(net, addr, NULL, 0, 0); in ipv6_sock_ac_join()
90 dev = __dev_get_by_flags(net, IFF_UP, in ipv6_sock_ac_join()
94 dev = __dev_get_by_index(net, ifindex); in ipv6_sock_ac_join()
147 struct net *net = sock_net(sk); in ipv6_sock_ac_drop() local
165 dev = __dev_get_by_index(net, pac->acl_ifindex); in ipv6_sock_ac_drop()
178 struct net *net = sock_net(sk); in ipv6_sock_ac_close() local
[all …]
Dip6_vti.c92 vti6_tnl_lookup(struct net *net, const struct in6_addr *remote, in vti6_tnl_lookup() argument
97 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_lookup()
188 struct net *net = dev_net(dev); in vti6_tnl_create2() local
189 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_tnl_create2()
208 static struct ip6_tnl *vti6_tnl_create(struct net *net, struct __ip6_tnl_parm *p) in vti6_tnl_create() argument
224 dev_net_set(dev, net); in vti6_tnl_create()
228 t->net = dev_net(dev); in vti6_tnl_create()
256 static struct ip6_tnl *vti6_locate(struct net *net, struct __ip6_tnl_parm *p, in vti6_locate() argument
263 struct vti6_net *ip6n = net_generic(net, vti6_net_id); in vti6_locate()
278 return vti6_tnl_create(net, p); in vti6_locate()
[all …]
Dipcomp6.c59 struct net *net = dev_net(skb->dev); in ipcomp6_err() local
71 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ipcomp6_err()
77 ip6_redirect(skb, net, skb->dev->ifindex, 0); in ipcomp6_err()
79 ip6_update_pmtu(skb, net, info, 0, 0); in ipcomp6_err()
87 struct net *net = xs_net(x); in ipcomp6_tunnel_create() local
90 t = xfrm_state_alloc(net); in ipcomp6_tunnel_create()
95 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_create()
123 struct net *net = xs_net(x); in ipcomp6_tunnel_attach() local
129 spi = xfrm6_tunnel_spi_lookup(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_attach()
131 t = xfrm_state_lookup(net, mark, (xfrm_address_t *)&x->id.daddr, in ipcomp6_tunnel_attach()
Dip6_tunnel.c175 ip6_tnl_lookup(struct net *net, const struct in6_addr *remote, const struct in6_addr *local) in ip6_tnl_lookup() argument
179 struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); in ip6_tnl_lookup()
281 struct net *net = dev_net(dev); in ip6_tnl_create2() local
282 struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); in ip6_tnl_create2()
314 static struct ip6_tnl *ip6_tnl_create(struct net *net, struct __ip6_tnl_parm *p) in ip6_tnl_create() argument
331 dev_net_set(dev, net); in ip6_tnl_create()
335 t->net = dev_net(dev); in ip6_tnl_create()
362 static struct ip6_tnl *ip6_tnl_locate(struct net *net, in ip6_tnl_locate() argument
369 struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); in ip6_tnl_locate()
384 return ip6_tnl_create(net, p); in ip6_tnl_locate()
[all …]
/linux-4.1.27/net/ipv4/
Dfib_frontend.c51 static int __net_init fib4_rules_init(struct net *net) in fib4_rules_init() argument
64 &net->ipv4.fib_table_hash[TABLE_LOCAL_INDEX]); in fib4_rules_init()
66 &net->ipv4.fib_table_hash[TABLE_MAIN_INDEX]); in fib4_rules_init()
75 struct fib_table *fib_new_table(struct net *net, u32 id) in fib_new_table() argument
82 tb = fib_get_table(net, id); in fib_new_table()
87 alias = fib_new_table(net, RT_TABLE_MAIN); in fib_new_table()
95 rcu_assign_pointer(net->ipv4.fib_local, tb); in fib_new_table()
98 rcu_assign_pointer(net->ipv4.fib_main, tb); in fib_new_table()
101 rcu_assign_pointer(net->ipv4.fib_default, tb); in fib_new_table()
108 hlist_add_head_rcu(&tb->tb_hlist, &net->ipv4.fib_table_hash[h]); in fib_new_table()
[all …]
Dxfrm4_policy.c21 static struct dst_entry *__xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4, in __xfrm4_dst_lookup() argument
34 rt = __ip_route_output_key(net, fl4); in __xfrm4_dst_lookup()
41 static struct dst_entry *xfrm4_dst_lookup(struct net *net, int tos, in xfrm4_dst_lookup() argument
47 return __xfrm4_dst_lookup(net, &fl4, tos, saddr, daddr); in xfrm4_dst_lookup()
50 static int xfrm4_get_saddr(struct net *net, in xfrm4_get_saddr() argument
56 dst = __xfrm4_dst_lookup(net, &fl4, 0, NULL, daddr); in xfrm4_get_saddr()
191 struct net *net = container_of(ops, struct net, xfrm.xfrm4_dst_ops); in xfrm4_garbage_collect() local
193 xfrm4_policy_afinfo.garbage_collect(net); in xfrm4_garbage_collect()
269 static int __net_init xfrm4_net_sysctl_init(struct net *net) in xfrm4_net_sysctl_init() argument
275 if (!net_eq(net, &init_net)) { in xfrm4_net_sysctl_init()
[all …]
Dicmp.c206 static struct sock *icmp_sk(struct net *net) in icmp_sk() argument
208 return *this_cpu_ptr(net->ipv4.icmp_sk); in icmp_sk()
211 static inline struct sock *icmp_xmit_lock(struct net *net) in icmp_xmit_lock() argument
217 sk = icmp_sk(net); in icmp_xmit_lock()
288 static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, in icmpv4_xrlim_allow() argument
306 if (!((1 << type) & net->ipv4.sysctl_icmp_ratemask)) in icmpv4_xrlim_allow()
313 peer = inet_getpeer_v4(net->ipv4.peers, fl4->daddr, 1); in icmpv4_xrlim_allow()
315 net->ipv4.sysctl_icmp_ratelimit); in icmpv4_xrlim_allow()
326 void icmp_out_count(struct net *net, unsigned char type) in icmp_out_count() argument
328 ICMPMSGOUT_INC_STATS(net, type); in icmp_out_count()
[all …]
Dip_fragment.c90 int ip_frag_mem(struct net *net) in ip_frag_mem() argument
92 return sum_frag_mem_limit(&net->ipv4.frags); in ip_frag_mem()
135 struct netns_ipv4 *ipv4 = container_of(q->net, struct netns_ipv4, in ip4_frag_init()
137 struct net *net = container_of(ipv4, struct net, ipv4); in ip4_frag_init() local
148 inet_getpeer_v4(net->ipv4.peers, arg->iph->saddr, 1) : NULL; in ip4_frag_init()
182 struct net *net; in ip_expire() local
185 net = container_of(qp->q.net, struct net, ipv4.frags); in ip_expire()
193 IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS); in ip_expire()
200 IP_INC_STATS_BH(net, IPSTATS_MIB_REASMTIMEOUT); in ip_expire()
206 head->dev = dev_get_by_index_rcu(net, qp->iif); in ip_expire()
[all …]
Dproc.c54 struct net *net = seq->private; in sockstat_seq_show() local
65 sock_prot_inuse_get(net, &tcp_prot), orphans, in sockstat_seq_show()
69 sock_prot_inuse_get(net, &udp_prot), in sockstat_seq_show()
72 sock_prot_inuse_get(net, &udplite_prot)); in sockstat_seq_show()
74 sock_prot_inuse_get(net, &raw_prot)); in sockstat_seq_show()
75 frag_mem = ip_frag_mem(net); in sockstat_seq_show()
328 struct net *net = seq->private; in icmpmsg_put() local
332 val = atomic_long_read(&net->mib.icmpmsg_statistics->mibs[i]); in icmpmsg_put()
350 struct net *net = seq->private; in icmp_put() local
351 atomic_long_t *ptr = net->mib.icmpmsg_statistics->mibs; in icmp_put()
[all …]
Dipmr.c76 possible_net_t net; member
125 static struct mr_table *ipmr_new_table(struct net *net, u32 id);
128 static void ip_mr_forward(struct net *net, struct mr_table *mrt,
141 #define ipmr_for_each_table(mrt, net) \ argument
142 list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list)
144 static struct mr_table *ipmr_get_table(struct net *net, u32 id) in ipmr_get_table() argument
148 ipmr_for_each_table(mrt, net) { in ipmr_get_table()
155 static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4, in ipmr_fib_lookup() argument
165 err = fib_rules_lookup(net->ipv4.mr_rules_ops, in ipmr_fib_lookup()
243 static int __net_init ipmr_rules_init(struct net *net) in ipmr_rules_init() argument
[all …]
Dfib_rules.c50 int __fib_lookup(struct net *net, struct flowi4 *flp, struct fib_result *res) in __fib_lookup() argument
58 err = fib_rules_lookup(net->ipv4.rules_ops, flowi4_to_flowi(flp), 0, &arg); in __fib_lookup()
151 static struct fib_table *fib_empty_table(struct net *net) in fib_empty_table() argument
156 if (!fib_get_table(net, id)) in fib_empty_table()
157 return fib_new_table(net, id); in fib_empty_table()
170 struct net *net = sock_net(skb->sk); in fib4_rule_configure() local
178 err = fib_unmerge(net); in fib4_rule_configure()
186 table = fib_empty_table(net); in fib4_rule_configure()
206 net->ipv4.fib_num_tclassid_users++; in fib4_rule_configure()
216 net->ipv4.fib_has_custom_rules = true; in fib4_rule_configure()
[all …]
Ddevinet.c93 #define IPV4_DEVCONF_DFLT(net, attr) \ argument
94 IPV4_DEVCONF((*net->ipv4.devconf_dflt), attr)
110 static u32 inet_addr_hash(const struct net *net, __be32 addr) in inet_addr_hash() argument
112 u32 val = (__force u32) addr ^ net_hash_mix(net); in inet_addr_hash()
117 static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa) in inet_hash_insert() argument
119 u32 hash = inet_addr_hash(net, ifa->ifa_local); in inet_hash_insert()
139 struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref) in __ip_dev_find() argument
141 u32 hash = inet_addr_hash(net, addr); in __ip_dev_find()
150 if (!net_eq(dev_net(dev), net)) in __ip_dev_find()
164 local = fib_get_table(net, RT_TABLE_LOCAL); in __ip_dev_find()
[all …]
Dsysctl_net_ipv4.c46 static void set_local_port_range(struct net *net, int range[2]) in set_local_port_range() argument
48 write_seqlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range()
49 net->ipv4.ip_local_ports.range[0] = range[0]; in set_local_port_range()
50 net->ipv4.ip_local_ports.range[1] = range[1]; in set_local_port_range()
51 write_sequnlock_bh(&net->ipv4.ip_local_ports.lock); in set_local_port_range()
59 struct net *net = in ipv4_local_port_range() local
60 container_of(table->data, struct net, ipv4.ip_local_ports.range); in ipv4_local_port_range()
71 inet_get_local_port_range(net, &range[0], &range[1]); in ipv4_local_port_range()
79 set_local_port_range(net, range); in ipv4_local_port_range()
89 struct net *net = in inet_get_ping_group_range_table() local
[all …]
Dinet_hashtables.c27 static u32 inet_ehashfn(const struct net *net, const __be32 laddr, in inet_ehashfn() argument
36 inet_ehash_secret + net_hash_mix(net)); in inet_ehashfn()
61 struct net *net, in inet_bind_bucket_create() argument
68 write_pnet(&tb->ib_net, net); in inet_bind_bucket_create()
172 static inline int compute_score(struct sock *sk, struct net *net, in compute_score() argument
179 if (net_eq(sock_net(sk), net) && inet->inet_num == hnum && in compute_score()
205 struct sock *__inet_lookup_listener(struct net *net, in __inet_lookup_listener() argument
213 unsigned int hash = inet_lhashfn(net, hnum); in __inet_lookup_listener()
223 score = compute_score(sk, net, hnum, daddr, dif); in __inet_lookup_listener()
229 phash = inet_ehashfn(net, daddr, hnum, in __inet_lookup_listener()
[all …]
Daf_inet.c251 static int inet_create(struct net *net, struct socket *sock, int protocol, in inet_create() argument
314 !ns_capable(net->user_ns, CAP_NET_RAW)) in inet_create()
325 sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot); in inet_create()
344 if (net->ipv4.sysctl_ip_no_pmtu_disc) in inet_create()
429 struct net *net = sock_net(sk); in inet_bind() local
453 chk_addr_ret = inet_addr_type(net, addr->sin_addr.s_addr); in inet_bind()
463 if (!net->ipv4.sysctl_ip_nonlocal_bind && in inet_bind()
474 !ns_capable(net->user_ns, CAP_NET_BIND_SERVICE)) in inet_bind()
843 struct net *net = sock_net(sk); in inet_ioctl() local
855 err = ip_rt_ioctl(net, cmd, (void __user *)arg); in inet_ioctl()
[all …]
/linux-4.1.27/include/net/sctp/
Dsctp.h92 int sctp_copy_local_addr_list(struct net *, struct sctp_bind_addr *,
96 void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int);
117 int sctp_primitive_ASSOCIATE(struct net *, struct sctp_association *, void *arg);
118 int sctp_primitive_SHUTDOWN(struct net *, struct sctp_association *, void *arg);
119 int sctp_primitive_ABORT(struct net *, struct sctp_association *, void *arg);
120 int sctp_primitive_SEND(struct net *, struct sctp_association *, void *arg);
121 int sctp_primitive_REQUESTHEARTBEAT(struct net *, struct sctp_association *, void *arg);
122 int sctp_primitive_ASCONF(struct net *, struct sctp_association *, void *arg);
133 struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *,
150 int sctp_snmp_proc_init(struct net *net);
[all …]
/linux-4.1.27/fs/nfsd/
Dnfssvc.c176 int nfsd_nrthreads(struct net *net) in nfsd_nrthreads() argument
179 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in nfsd_nrthreads()
188 static int nfsd_init_socks(struct net *net) in nfsd_init_socks() argument
191 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in nfsd_init_socks()
196 error = svc_create_xprt(nn->nfsd_serv, "udp", net, PF_INET, NFS_PORT, in nfsd_init_socks()
201 error = svc_create_xprt(nn->nfsd_serv, "tcp", net, PF_INET, NFS_PORT, in nfsd_init_socks()
257 static int nfsd_startup_net(int nrservs, struct net *net) in nfsd_startup_net() argument
259 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in nfsd_startup_net()
268 ret = nfsd_init_socks(net); in nfsd_startup_net()
273 ret = lockd_up(net); in nfsd_startup_net()
[all …]
Dnfs4recover.c56 int (*init)(struct net *);
57 void (*exit)(struct net *);
162 nfsd4_client_tracking_exit(clp->net); in legacy_recdir_name_error()
174 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_create_clid_dir()
343 struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id); in nfsd4_remove_clid_dir()
432 nfsd4_recdir_load(struct net *net) { in nfsd4_recdir_load() argument
434 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in nfsd4_recdir_load()
451 nfsd4_init_recdir(struct net *net) in nfsd4_init_recdir() argument
453 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in nfsd4_init_recdir()
485 nfsd4_shutdown_recdir(struct net *net) in nfsd4_shutdown_recdir() argument
[all …]
Dnfsctl.c136 static int exports_net_open(struct net *net, struct file *file) in exports_net_open() argument
140 struct nfsd_net *nn = net_generic(net, nfsd_net_id); in exports_net_open()
235 static inline struct net *netns(struct file *file) in netns()
260 struct net *net = netns(file); in write_unlock_ip() local
273 if (rpc_pton(net, fo_path, size, sap, salen) == 0) in write_unlock_ip()
436 struct net *net = netns(file); in write_threads() local
445 rv = nfsd_svc(newthreads, net); in write_threads()
449 rv = nfsd_nrthreads(net); in write_threads()
487 struct net *net = netns(file); in write_pool_threads() local
490 npools = nfsd_nrpools(net); in write_pool_threads()
[all …]
Didmap.h45 int nfsd_idmap_init(struct net *);
46 void nfsd_idmap_shutdown(struct net *);
48 static inline int nfsd_idmap_init(struct net *net) in nfsd_idmap_init() argument
52 static inline void nfsd_idmap_shutdown(struct net *net) in nfsd_idmap_shutdown() argument
/linux-4.1.27/drivers/usb/gadget/function/
Du_ether.c57 struct net_device *net; member
112 printk(level "%s: " fmt , (d)->net->name , ## args)
139 static int ueth_change_mtu(struct net_device *net, int new_mtu) in ueth_change_mtu() argument
141 struct eth_dev *dev = netdev_priv(net); in ueth_change_mtu()
152 net->mtu = new_mtu; in ueth_change_mtu()
158 static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p) in eth_get_drvinfo() argument
160 struct eth_dev *dev = netdev_priv(net); in eth_get_drvinfo()
223 size += sizeof(struct ethhdr) + dev->net->mtu + RX_EXTRA; in rx_submit()
298 dev->net->stats.rx_errors++; in rx_complete()
299 dev->net->stats.rx_length_errors++; in rx_complete()
[all …]
Du_ether.h133 int gether_register_netdev(struct net_device *net);
156 void gether_set_gadget(struct net_device *net, struct usb_gadget *g);
167 int gether_set_dev_addr(struct net_device *net, const char *dev_addr);
178 int gether_get_dev_addr(struct net_device *net, char *dev_addr, int len);
189 int gether_set_host_addr(struct net_device *net, const char *host_addr);
200 int gether_get_host_addr(struct net_device *net, char *host_addr, int len);
212 int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len);
222 void gether_get_host_addr_u8(struct net_device *net, u8 host_mac[ETH_ALEN]);
232 void gether_set_qmult(struct net_device *net, unsigned qmult);
240 unsigned gether_get_qmult(struct net_device *net);
[all …]
/linux-4.1.27/fs/lockd/
Dsvc.c101 static void set_grace_period(struct net *net) in set_grace_period() argument
104 struct lockd_net *ln = net_generic(net, lockd_net_id); in set_grace_period()
106 locks_start_grace(net, &ln->lockd_manager); in set_grace_period()
114 struct net *net = &init_net; in restart_grace() local
115 struct lockd_net *ln = net_generic(net, lockd_net_id); in restart_grace()
120 set_grace_period(net); in restart_grace()
180 struct net *net, const int family, in create_lockd_listener() argument
185 xprt = svc_find_xprt(serv, name, net, family, 0); in create_lockd_listener()
187 return svc_create_xprt(serv, name, net, family, port, in create_lockd_listener()
193 static int create_lockd_family(struct svc_serv *serv, struct net *net, in create_lockd_family() argument
[all …]
Dhost.c50 static void nlm_gc_hosts(struct net *net);
61 struct net *net; /* network namespace to bind */ member
163 host->net = ni->net; in nlm_alloc_host()
177 struct lockd_net *ln = net_generic(host->net, lockd_net_id); in nlm_destroy_host_locked()
215 struct net *net) in nlmclnt_lookup_host() argument
226 .net = net, in nlmclnt_lookup_host()
231 struct lockd_net *ln = net_generic(net, lockd_net_id); in nlmclnt_lookup_host()
241 if (host->net != net) in nlmclnt_lookup_host()
329 struct net *net = SVC_NET(rqstp); in nlmsvc_lookup_host() local
338 .net = net, in nlmsvc_lookup_host()
[all …]
/linux-4.1.27/net/sunrpc/
Dsunrpc_syms.c30 static __net_init int sunrpc_init_net(struct net *net) in sunrpc_init_net() argument
33 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in sunrpc_init_net()
35 err = rpc_proc_init(net); in sunrpc_init_net()
39 err = ip_map_cache_create(net); in sunrpc_init_net()
43 err = unix_gid_cache_create(net); in sunrpc_init_net()
47 err = rpc_pipefs_init_net(net); in sunrpc_init_net()
57 unix_gid_cache_destroy(net); in sunrpc_init_net()
59 ip_map_cache_destroy(net); in sunrpc_init_net()
61 rpc_proc_exit(net); in sunrpc_init_net()
66 static __net_exit void sunrpc_exit_net(struct net *net) in sunrpc_exit_net() argument
[all …]
Dstats.c243 do_register(struct net *net, const char *name, void *data, in do_register() argument
249 sn = net_generic(net, sunrpc_net_id); in do_register()
254 rpc_proc_register(struct net *net, struct rpc_stat *statp) in rpc_proc_register() argument
256 return do_register(net, statp->program->name, statp, &rpc_proc_fops); in rpc_proc_register()
261 rpc_proc_unregister(struct net *net, const char *name) in rpc_proc_unregister() argument
265 sn = net_generic(net, sunrpc_net_id); in rpc_proc_unregister()
271 svc_proc_register(struct net *net, struct svc_stat *statp, const struct file_operations *fops) in svc_proc_register() argument
273 return do_register(net, statp->program->pg_name, statp, fops); in svc_proc_register()
278 svc_proc_unregister(struct net *net, const char *name) in svc_proc_unregister() argument
282 sn = net_generic(net, sunrpc_net_id); in svc_proc_unregister()
[all …]
/linux-4.1.27/net/
Dsysctl_net.c44 struct net *net = container_of(head->set, struct net, sysctls); in net_ctl_permissions() local
45 kuid_t root_uid = make_kuid(net->user_ns, 0); in net_ctl_permissions()
46 kgid_t root_gid = make_kgid(net->user_ns, 0); in net_ctl_permissions()
49 if (ns_capable(net->user_ns, CAP_NET_ADMIN) || in net_ctl_permissions()
67 static int __net_init sysctl_net_init(struct net *net) in sysctl_net_init() argument
69 setup_sysctl_set(&net->sysctls, &net_sysctl_root, is_seen); in sysctl_net_init()
73 static void __net_exit sysctl_net_exit(struct net *net) in sysctl_net_exit() argument
75 retire_sysctl_set(&net->sysctls); in sysctl_net_exit()
103 struct ctl_table_header *register_net_sysctl(struct net *net, in register_net_sysctl() argument
106 return __register_sysctl_table(&net->sysctls, path, table); in register_net_sysctl()
DKconfig19 contained in the package net-tools, the location and version number
50 source "net/packet/Kconfig"
51 source "net/unix/Kconfig"
52 source "net/xfrm/Kconfig"
53 source "net/iucv/Kconfig"
74 /proc/sys/net/ipv4/*; the options are explained in the file
80 source "net/ipv4/Kconfig"
81 source "net/ipv6/Kconfig"
82 source "net/netlabel/Kconfig"
135 correct local computer. This way, the computers on your local net
[all …]
/linux-4.1.27/drivers/rapidio/
Drio-scan.c62 static u16 rio_destid_alloc(struct rio_net *net) in rio_destid_alloc() argument
65 struct rio_id_table *idtab = &net->destid_table; in rio_destid_alloc()
88 static int rio_destid_reserve(struct rio_net *net, u16 destid) in rio_destid_reserve() argument
91 struct rio_id_table *idtab = &net->destid_table; in rio_destid_reserve()
107 static void rio_destid_free(struct rio_net *net, u16 destid) in rio_destid_free() argument
109 struct rio_id_table *idtab = &net->destid_table; in rio_destid_free()
121 static u16 rio_destid_first(struct rio_net *net) in rio_destid_first() argument
124 struct rio_id_table *idtab = &net->destid_table; in rio_destid_first()
141 static u16 rio_destid_next(struct rio_net *net, u16 from) in rio_destid_next() argument
144 struct rio_id_table *idtab = &net->destid_table; in rio_destid_next()
[all …]
/linux-4.1.27/fs/nfs/
Dcallback.c42 static int nfs4_callback_up_net(struct svc_serv *serv, struct net *net) in nfs4_callback_up_net() argument
45 struct nfs_net *nn = net_generic(net, nfs_net_id); in nfs4_callback_up_net()
47 ret = svc_create_xprt(serv, "tcp", net, PF_INET, in nfs4_callback_up_net()
53 nn->nfs_callback_tcpport, PF_INET, net); in nfs4_callback_up_net()
55 ret = svc_create_xprt(serv, "tcp", net, PF_INET6, in nfs4_callback_up_net()
60 nn->nfs_callback_tcpport6, PF_INET6, net); in nfs4_callback_up_net()
102 static int nfs41_callback_up_net(struct svc_serv *serv, struct net *net) in nfs41_callback_up_net() argument
109 return svc_create_xprt(serv, "tcp-bc", net, PF_INET, 0, in nfs41_callback_up_net()
191 static int nfs41_callback_up_net(struct svc_serv *serv, struct net *net) in nfs41_callback_up_net() argument
255 static void nfs_callback_down_net(u32 minorversion, struct svc_serv *serv, struct net *net) in nfs_callback_down_net() argument
[all …]
Ddns_resolve.h19 static inline int nfs_dns_resolver_cache_init(struct net *net) in nfs_dns_resolver_cache_init() argument
24 static inline void nfs_dns_resolver_cache_destroy(struct net *net) in nfs_dns_resolver_cache_destroy() argument
29 extern int nfs_dns_resolver_cache_init(struct net *net);
30 extern void nfs_dns_resolver_cache_destroy(struct net *net);
33 extern ssize_t nfs_dns_resolve_name(struct net *net, char *name,
Ddns_resolve.c17 ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, in nfs_dns_resolve_name() argument
26 ret = rpc_pton(net, ip_addr, ip_len, sa, salen); in nfs_dns_resolve_name()
234 key.addrlen = rpc_pton(cd->net, buf1, len, in nfs_dns_parse()
332 ssize_t nfs_dns_resolve_name(struct net *net, char *name, in nfs_dns_resolve_name() argument
341 struct nfs_net *nn = net_generic(net, nfs_net_id); in nfs_dns_resolve_name()
372 int nfs_dns_resolver_cache_init(struct net *net) in nfs_dns_resolver_cache_init() argument
375 struct nfs_net *nn = net_generic(net, nfs_net_id); in nfs_dns_resolver_cache_init()
377 nn->nfs_dns_resolve = cache_create_net(&nfs_dns_resolve_template, net); in nfs_dns_resolver_cache_init()
381 err = nfs_cache_register_net(net, nn->nfs_dns_resolve); in nfs_dns_resolver_cache_init()
387 cache_destroy_net(nn->nfs_dns_resolve, net); in nfs_dns_resolver_cache_init()
[all …]
/linux-4.1.27/drivers/net/hyperv/
Dnetvsc_drv.c83 static void netvsc_set_multicast_list(struct net_device *net) in netvsc_set_multicast_list() argument
85 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_set_multicast_list()
90 static int netvsc_open(struct net_device *net) in netvsc_open() argument
92 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_open()
98 netif_carrier_off(net); in netvsc_open()
103 netdev_err(net, "unable to open device (ret %d).\n", ret); in netvsc_open()
107 netif_tx_start_all_queues(net); in netvsc_open()
112 netif_carrier_on(net); in netvsc_open()
117 static int netvsc_close(struct net_device *net) in netvsc_close() argument
119 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_close()
[all …]
/linux-4.1.27/fs/nfs_common/
Dgrace.c28 locks_start_grace(struct net *net, struct lock_manager *lm) in locks_start_grace() argument
30 struct list_head *grace_list = net_generic(net, grace_net_id); in locks_start_grace()
66 locks_in_grace(struct net *net) in locks_in_grace() argument
68 struct list_head *grace_list = net_generic(net, grace_net_id); in locks_in_grace()
75 grace_init_net(struct net *net) in grace_init_net() argument
77 struct list_head *grace_list = net_generic(net, grace_net_id); in grace_init_net()
84 grace_exit_net(struct net *net) in grace_exit_net() argument
86 struct list_head *grace_list = net_generic(net, grace_net_id); in grace_exit_net()
/linux-4.1.27/net/unix/
Dsysctl_net_unix.c29 int __net_init unix_sysctl_register(struct net *net) in unix_sysctl_register() argument
38 if (net->user_ns != &init_user_ns) in unix_sysctl_register()
41 table[0].data = &net->unx.sysctl_max_dgram_qlen; in unix_sysctl_register()
42 net->unx.ctl = register_net_sysctl(net, "net/unix", table); in unix_sysctl_register()
43 if (net->unx.ctl == NULL) in unix_sysctl_register()
54 void unix_sysctl_unregister(struct net *net) in unix_sysctl_unregister() argument
58 table = net->unx.ctl->ctl_table_arg; in unix_sysctl_unregister()
59 unregister_net_sysctl_table(net->unx.ctl); in unix_sysctl_unregister()
/linux-4.1.27/drivers/net/can/spi/
Dmcp251x.c244 struct net_device *net; member
284 static void mcp251x_clean(struct net_device *net) in mcp251x_clean() argument
286 struct mcp251x_priv *priv = netdev_priv(net); in mcp251x_clean()
289 net->stats.tx_errors++; in mcp251x_clean()
293 can_free_echo_skb(priv->net, 0); in mcp251x_clean()
467 skb = alloc_can_skb(priv->net, &frame); in mcp251x_hw_rx()
470 priv->net->stats.rx_dropped++; in mcp251x_hw_rx()
501 priv->net->stats.rx_packets++; in mcp251x_hw_rx()
502 priv->net->stats.rx_bytes += frame->can_dlc; in mcp251x_hw_rx()
504 can_led_event(priv->net, CAN_LED_EVENT_RX); in mcp251x_hw_rx()
[all …]
/linux-4.1.27/net/ipv4/netfilter/
Diptable_raw.c26 const struct net *net; in iptable_raw_hook() local
34 net = dev_net(state->in ? state->in : state->out); in iptable_raw_hook()
35 return ipt_do_table(skb, ops->hooknum, state, net->ipv4.iptable_raw); in iptable_raw_hook()
40 static int __net_init iptable_raw_net_init(struct net *net) in iptable_raw_net_init() argument
47 net->ipv4.iptable_raw = in iptable_raw_net_init()
48 ipt_register_table(net, &packet_raw, repl); in iptable_raw_net_init()
50 return PTR_ERR_OR_ZERO(net->ipv4.iptable_raw); in iptable_raw_net_init()
53 static void __net_exit iptable_raw_net_exit(struct net *net) in iptable_raw_net_exit() argument
55 ipt_unregister_table(net, net->ipv4.iptable_raw); in iptable_raw_net_exit()
Diptable_security.c43 const struct net *net; in iptable_security_hook() local
51 net = dev_net(state->in ? state->in : state->out); in iptable_security_hook()
53 net->ipv4.iptable_security); in iptable_security_hook()
58 static int __net_init iptable_security_net_init(struct net *net) in iptable_security_net_init() argument
65 net->ipv4.iptable_security = in iptable_security_net_init()
66 ipt_register_table(net, &security_table, repl); in iptable_security_net_init()
68 return PTR_ERR_OR_ZERO(net->ipv4.iptable_security); in iptable_security_net_init()
71 static void __net_exit iptable_security_net_exit(struct net *net) in iptable_security_net_exit() argument
73 ipt_unregister_table(net, net->ipv4.iptable_security); in iptable_security_net_exit()
Diptable_filter.c39 const struct net *net; in iptable_filter_hook() local
47 net = dev_net(state->in ? state->in : state->out); in iptable_filter_hook()
48 return ipt_do_table(skb, ops->hooknum, state, net->ipv4.iptable_filter); in iptable_filter_hook()
57 static int __net_init iptable_filter_net_init(struct net *net) in iptable_filter_net_init() argument
68 net->ipv4.iptable_filter = in iptable_filter_net_init()
69 ipt_register_table(net, &packet_filter, repl); in iptable_filter_net_init()
71 return PTR_ERR_OR_ZERO(net->ipv4.iptable_filter); in iptable_filter_net_init()
74 static void __net_exit iptable_filter_net_exit(struct net *net) in iptable_filter_net_exit() argument
76 ipt_unregister_table(net, net->ipv4.iptable_filter); in iptable_filter_net_exit()
Dnf_conntrack_l3proto_ipv4_compat.c34 struct net *net = seq_file_net(seq); in ct_get_first() local
39 st->bucket < net->ct.htable_size; in ct_get_first()
42 hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_first()
52 struct net *net = seq_file_net(seq); in ct_get_next() local
58 if (++st->bucket >= net->ct.htable_size) in ct_get_next()
62 hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_next()
223 struct net *net = seq_file_net(seq); in ct_expect_get_first() local
229 hlist_first_rcu(&net->ct.expect_hash[st->bucket])); in ct_expect_get_first()
239 struct net *net = seq_file_net(seq); in ct_expect_get_next() local
247 hlist_first_rcu(&net->ct.expect_hash[st->bucket])); in ct_expect_get_next()
[all …]
Dnf_tables_arp.c41 static int nf_tables_arp_init_net(struct net *net) in nf_tables_arp_init_net() argument
43 net->nft.arp = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_arp_init_net()
44 if (net->nft.arp== NULL) in nf_tables_arp_init_net()
47 memcpy(net->nft.arp, &nft_af_arp, sizeof(nft_af_arp)); in nf_tables_arp_init_net()
49 if (nft_register_afinfo(net, net->nft.arp) < 0) in nf_tables_arp_init_net()
54 kfree(net->nft.arp); in nf_tables_arp_init_net()
58 static void nf_tables_arp_exit_net(struct net *net) in nf_tables_arp_exit_net() argument
60 nft_unregister_afinfo(net->nft.arp); in nf_tables_arp_exit_net()
61 kfree(net->nft.arp); in nf_tables_arp_exit_net()
Darptable_filter.c33 const struct net *net = dev_net(state->in ? state->in : state->out); in arptable_filter_hook() local
36 net->ipv4.arptable_filter); in arptable_filter_hook()
41 static int __net_init arptable_filter_net_init(struct net *net) in arptable_filter_net_init() argument
48 net->ipv4.arptable_filter = in arptable_filter_net_init()
49 arpt_register_table(net, &packet_filter, repl); in arptable_filter_net_init()
51 return PTR_ERR_OR_ZERO(net->ipv4.arptable_filter); in arptable_filter_net_init()
54 static void __net_exit arptable_filter_net_exit(struct net *net) in arptable_filter_net_exit() argument
56 arpt_unregister_table(net->ipv4.arptable_filter); in arptable_filter_net_exit()
Dnf_tables_ipv4.c62 static int nf_tables_ipv4_init_net(struct net *net) in nf_tables_ipv4_init_net() argument
64 net->nft.ipv4 = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_ipv4_init_net()
65 if (net->nft.ipv4 == NULL) in nf_tables_ipv4_init_net()
68 memcpy(net->nft.ipv4, &nft_af_ipv4, sizeof(nft_af_ipv4)); in nf_tables_ipv4_init_net()
70 if (nft_register_afinfo(net, net->nft.ipv4) < 0) in nf_tables_ipv4_init_net()
75 kfree(net->nft.ipv4); in nf_tables_ipv4_init_net()
79 static void nf_tables_ipv4_exit_net(struct net *net) in nf_tables_ipv4_exit_net() argument
81 nft_unregister_afinfo(net->nft.ipv4); in nf_tables_ipv4_exit_net()
82 kfree(net->nft.ipv4); in nf_tables_ipv4_exit_net()
Dnf_conntrack_proto_icmp.c27 static inline struct nf_icmp_net *icmp_pernet(struct net *net) in icmp_pernet() argument
29 return &net->ct.nf_ct_proto.icmp; in icmp_pernet()
84 static unsigned int *icmp_get_timeouts(struct net *net) in icmp_get_timeouts() argument
86 return &icmp_pernet(net)->timeout; in icmp_get_timeouts()
130 icmp_error_message(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb, in icmp_error_message() argument
163 h = nf_conntrack_find_get(net, zone, &innertuple); in icmp_error_message()
180 icmp_error(struct net *net, struct nf_conn *tmpl, in icmp_error() argument
190 if (LOG_INVALID(net, IPPROTO_ICMP)) in icmp_error()
191 nf_log_packet(net, PF_INET, 0, skb, NULL, NULL, in icmp_error()
197 if (net->ct.sysctl_checksum && hooknum == NF_INET_PRE_ROUTING && in icmp_error()
[all …]
Diptable_nat.c36 struct net *net = nf_ct_net(ct); in iptable_nat_do_chain() local
38 return ipt_do_table(skb, ops->hooknum, state, net->ipv4.nat_table); in iptable_nat_do_chain()
104 static int __net_init iptable_nat_net_init(struct net *net) in iptable_nat_net_init() argument
111 net->ipv4.nat_table = ipt_register_table(net, &nf_nat_ipv4_table, repl); in iptable_nat_net_init()
113 return PTR_ERR_OR_ZERO(net->ipv4.nat_table); in iptable_nat_net_init()
116 static void __net_exit iptable_nat_net_exit(struct net *net) in iptable_nat_net_exit() argument
118 ipt_unregister_table(net, net->ipv4.nat_table); in iptable_nat_net_exit()
/linux-4.1.27/drivers/tty/ipwireless/
Dnetwork.h33 void ipwireless_network_notify_control_line_change(struct ipw_network *net,
36 void ipwireless_network_packet_received(struct ipw_network *net,
40 void ipwireless_network_free(struct ipw_network *net);
41 void ipwireless_associate_network_tty(struct ipw_network *net,
43 void ipwireless_disassociate_network_ttys(struct ipw_network *net,
46 void ipwireless_ppp_open(struct ipw_network *net);
48 void ipwireless_ppp_close(struct ipw_network *net);
49 int ipwireless_ppp_channel_index(struct ipw_network *net);
50 int ipwireless_ppp_unit_number(struct ipw_network *net);
51 int ipwireless_ppp_mru(const struct ipw_network *net);
/linux-4.1.27/net/ipv6/netfilter/
Dip6table_raw.c25 const struct net *net = dev_net(state->in ? state->in : state->out); in ip6table_raw_hook() local
27 return ip6t_do_table(skb, ops->hooknum, state, net->ipv6.ip6table_raw); in ip6table_raw_hook()
32 static int __net_init ip6table_raw_net_init(struct net *net) in ip6table_raw_net_init() argument
39 net->ipv6.ip6table_raw = in ip6table_raw_net_init()
40 ip6t_register_table(net, &packet_raw, repl); in ip6table_raw_net_init()
42 return PTR_ERR_OR_ZERO(net->ipv6.ip6table_raw); in ip6table_raw_net_init()
45 static void __net_exit ip6table_raw_net_exit(struct net *net) in ip6table_raw_net_exit() argument
47 ip6t_unregister_table(net, net->ipv6.ip6table_raw); in ip6table_raw_net_exit()
Dip6table_security.c42 const struct net *net = dev_net(state->in ? state->in : state->out); in ip6table_security_hook() local
45 net->ipv6.ip6table_security); in ip6table_security_hook()
50 static int __net_init ip6table_security_net_init(struct net *net) in ip6table_security_net_init() argument
57 net->ipv6.ip6table_security = in ip6table_security_net_init()
58 ip6t_register_table(net, &security_table, repl); in ip6table_security_net_init()
60 return PTR_ERR_OR_ZERO(net->ipv6.ip6table_security); in ip6table_security_net_init()
63 static void __net_exit ip6table_security_net_exit(struct net *net) in ip6table_security_net_exit() argument
65 ip6t_unregister_table(net, net->ipv6.ip6table_security); in ip6table_security_net_exit()
Dip6table_filter.c38 const struct net *net = dev_net(state->in ? state->in : state->out); in ip6table_filter_hook() local
40 return ip6t_do_table(skb, ops->hooknum, state, net->ipv6.ip6table_filter); in ip6table_filter_hook()
49 static int __net_init ip6table_filter_net_init(struct net *net) in ip6table_filter_net_init() argument
60 net->ipv6.ip6table_filter = in ip6table_filter_net_init()
61 ip6t_register_table(net, &packet_filter, repl); in ip6table_filter_net_init()
63 return PTR_ERR_OR_ZERO(net->ipv6.ip6table_filter); in ip6table_filter_net_init()
66 static void __net_exit ip6table_filter_net_exit(struct net *net) in ip6table_filter_net_exit() argument
68 ip6t_unregister_table(net, net->ipv6.ip6table_filter); in ip6table_filter_net_exit()
Dnf_tables_ipv6.c61 static int nf_tables_ipv6_init_net(struct net *net) in nf_tables_ipv6_init_net() argument
63 net->nft.ipv6 = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_ipv6_init_net()
64 if (net->nft.ipv6 == NULL) in nf_tables_ipv6_init_net()
67 memcpy(net->nft.ipv6, &nft_af_ipv6, sizeof(nft_af_ipv6)); in nf_tables_ipv6_init_net()
69 if (nft_register_afinfo(net, net->nft.ipv6) < 0) in nf_tables_ipv6_init_net()
74 kfree(net->nft.ipv6); in nf_tables_ipv6_init_net()
78 static void nf_tables_ipv6_exit_net(struct net *net) in nf_tables_ipv6_exit_net() argument
80 nft_unregister_afinfo(net->nft.ipv6); in nf_tables_ipv6_exit_net()
81 kfree(net->nft.ipv6); in nf_tables_ipv6_exit_net()
Dnf_conntrack_reasm.c97 static int nf_ct_frag6_sysctl_register(struct net *net) in nf_ct_frag6_sysctl_register() argument
103 if (!net_eq(net, &init_net)) { in nf_ct_frag6_sysctl_register()
109 table[0].data = &net->nf_frag.frags.timeout; in nf_ct_frag6_sysctl_register()
110 table[1].data = &net->nf_frag.frags.low_thresh; in nf_ct_frag6_sysctl_register()
111 table[1].extra2 = &net->nf_frag.frags.high_thresh; in nf_ct_frag6_sysctl_register()
112 table[2].data = &net->nf_frag.frags.high_thresh; in nf_ct_frag6_sysctl_register()
113 table[2].extra1 = &net->nf_frag.frags.low_thresh; in nf_ct_frag6_sysctl_register()
117 hdr = register_net_sysctl(net, "net/netfilter", table); in nf_ct_frag6_sysctl_register()
121 net->nf_frag.sysctl.frags_hdr = hdr; in nf_ct_frag6_sysctl_register()
125 if (!net_eq(net, &init_net)) in nf_ct_frag6_sysctl_register()
[all …]
Dnf_conntrack_proto_icmpv6.c32 static inline struct nf_icmp_net *icmpv6_pernet(struct net *net) in icmpv6_pernet() argument
34 return &net->ct.nf_ct_proto.icmpv6; in icmpv6_pernet()
96 static unsigned int *icmpv6_get_timeouts(struct net *net) in icmpv6_get_timeouts() argument
98 return &icmpv6_pernet(net)->timeout; in icmpv6_get_timeouts()
144 icmpv6_error_message(struct net *net, struct nf_conn *tmpl, in icmpv6_error_message() argument
180 h = nf_conntrack_find_get(net, zone, &intuple); in icmpv6_error_message()
196 icmpv6_error(struct net *net, struct nf_conn *tmpl, in icmpv6_error() argument
206 if (LOG_INVALID(net, IPPROTO_ICMPV6)) in icmpv6_error()
207 nf_log_packet(net, PF_INET6, 0, skb, NULL, NULL, NULL, in icmpv6_error()
212 if (net->ct.sysctl_checksum && hooknum == NF_INET_PRE_ROUTING && in icmpv6_error()
[all …]
Dip6table_nat.c38 struct net *net = nf_ct_net(ct); in ip6table_nat_do_chain() local
40 return ip6t_do_table(skb, ops->hooknum, state, net->ipv6.ip6table_nat); in ip6table_nat_do_chain()
106 static int __net_init ip6table_nat_net_init(struct net *net) in ip6table_nat_net_init() argument
113 net->ipv6.ip6table_nat = ip6t_register_table(net, &nf_nat_ipv6_table, repl); in ip6table_nat_net_init()
115 return PTR_ERR_OR_ZERO(net->ipv6.ip6table_nat); in ip6table_nat_net_init()
118 static void __net_exit ip6table_nat_net_exit(struct net *net) in ip6table_nat_net_exit() argument
120 ip6t_unregister_table(net, net->ipv6.ip6table_nat); in ip6table_nat_net_exit()
Dip6t_REJECT.c43 struct net *net = dev_net((par->in != NULL) ? par->in : par->out); in reject_tg6() local
48 nf_send_unreach6(net, skb, ICMPV6_NOROUTE, par->hooknum); in reject_tg6()
51 nf_send_unreach6(net, skb, ICMPV6_ADM_PROHIBITED, par->hooknum); in reject_tg6()
54 nf_send_unreach6(net, skb, ICMPV6_NOT_NEIGHBOUR, par->hooknum); in reject_tg6()
57 nf_send_unreach6(net, skb, ICMPV6_ADDR_UNREACH, par->hooknum); in reject_tg6()
60 nf_send_unreach6(net, skb, ICMPV6_PORT_UNREACH, par->hooknum); in reject_tg6()
66 nf_send_reset6(net, skb, par->hooknum); in reject_tg6()
/linux-4.1.27/security/
Dlsm_audit.c52 ad->u.net->v4info.saddr = ih->saddr; in ipv4_skb_to_auditdata()
53 ad->u.net->v4info.daddr = ih->daddr; in ipv4_skb_to_auditdata()
67 ad->u.net->sport = th->source; in ipv4_skb_to_auditdata()
68 ad->u.net->dport = th->dest; in ipv4_skb_to_auditdata()
76 ad->u.net->sport = uh->source; in ipv4_skb_to_auditdata()
77 ad->u.net->dport = uh->dest; in ipv4_skb_to_auditdata()
85 ad->u.net->sport = dh->dccph_sport; in ipv4_skb_to_auditdata()
86 ad->u.net->dport = dh->dccph_dport; in ipv4_skb_to_auditdata()
93 ad->u.net->sport = sh->source; in ipv4_skb_to_auditdata()
94 ad->u.net->dport = sh->dest; in ipv4_skb_to_auditdata()
[all …]
/linux-4.1.27/drivers/staging/rtl8188eu/os_dep/
Drtw_android.c88 static int rtw_android_get_rssi(struct net_device *net, char *command, in rtw_android_get_rssi() argument
91 struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); in rtw_android_get_rssi()
105 static int rtw_android_get_link_speed(struct net_device *net, char *command, in rtw_android_get_link_speed() argument
108 struct adapter *padapter = (struct adapter *)rtw_netdev_priv(net); in rtw_android_get_link_speed()
116 static int rtw_android_get_macaddr(struct net_device *net, char *command, in rtw_android_get_macaddr() argument
120 net->dev_addr); in rtw_android_get_macaddr()
123 static int android_set_cntry(struct net_device *net, char *command, in android_set_cntry() argument
126 struct adapter *adapter = (struct adapter *)rtw_netdev_priv(net); in android_set_cntry()
134 static int android_get_p2p_addr(struct net_device *net, char *command, in android_get_p2p_addr() argument
138 memcpy(command, net->dev_addr, ETH_ALEN); in android_get_p2p_addr()
[all …]
/linux-4.1.27/net/bridge/netfilter/
Dnf_log_bridge.c19 static void nf_log_bridge_packet(struct net *net, u_int8_t pf, in nf_log_bridge_packet() argument
29 nf_log_packet(net, NFPROTO_IPV4, hooknum, skb, in, out, in nf_log_bridge_packet()
33 nf_log_packet(net, NFPROTO_IPV6, hooknum, skb, in, out, in nf_log_bridge_packet()
38 nf_log_packet(net, NFPROTO_ARP, hooknum, skb, in, out, in nf_log_bridge_packet()
51 static int __net_init nf_log_bridge_net_init(struct net *net) in nf_log_bridge_net_init() argument
53 nf_log_set(net, NFPROTO_BRIDGE, &nf_bridge_logger); in nf_log_bridge_net_init()
57 static void __net_exit nf_log_bridge_net_exit(struct net *net) in nf_log_bridge_net_exit() argument
59 nf_log_unset(net, &nf_bridge_logger); in nf_log_bridge_net_exit()
Debtable_broute.c62 static int __net_init broute_net_init(struct net *net) in broute_net_init() argument
64 net->xt.broute_table = ebt_register_table(net, &broute_table); in broute_net_init()
65 return PTR_ERR_OR_ZERO(net->xt.broute_table); in broute_net_init()
68 static void __net_exit broute_net_exit(struct net *net) in broute_net_exit() argument
70 ebt_unregister_table(net, net->xt.broute_table); in broute_net_exit()
Dnf_tables_bridge.c127 static int nf_tables_bridge_init_net(struct net *net) in nf_tables_bridge_init_net() argument
129 net->nft.bridge = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_bridge_init_net()
130 if (net->nft.bridge == NULL) in nf_tables_bridge_init_net()
133 memcpy(net->nft.bridge, &nft_af_bridge, sizeof(nft_af_bridge)); in nf_tables_bridge_init_net()
135 if (nft_register_afinfo(net, net->nft.bridge) < 0) in nf_tables_bridge_init_net()
140 kfree(net->nft.bridge); in nf_tables_bridge_init_net()
144 static void nf_tables_bridge_exit_net(struct net *net) in nf_tables_bridge_exit_net() argument
146 nft_unregister_afinfo(net->nft.bridge); in nf_tables_bridge_exit_net()
147 kfree(net->nft.bridge); in nf_tables_bridge_exit_net()
Debtable_filter.c99 static int __net_init frame_filter_net_init(struct net *net) in frame_filter_net_init() argument
101 net->xt.frame_filter = ebt_register_table(net, &frame_filter); in frame_filter_net_init()
102 return PTR_ERR_OR_ZERO(net->xt.frame_filter); in frame_filter_net_init()
105 static void __net_exit frame_filter_net_exit(struct net *net) in frame_filter_net_exit() argument
107 ebt_unregister_table(net, net->xt.frame_filter); in frame_filter_net_exit()
Debtable_nat.c99 static int __net_init frame_nat_net_init(struct net *net) in frame_nat_net_init() argument
101 net->xt.frame_nat = ebt_register_table(net, &frame_nat); in frame_nat_net_init()
102 return PTR_ERR_OR_ZERO(net->xt.frame_nat); in frame_nat_net_init()
105 static void __net_exit frame_nat_net_exit(struct net *net) in frame_nat_net_exit() argument
107 ebt_unregister_table(net, net->xt.frame_nat); in frame_nat_net_exit()
/linux-4.1.27/include/net/phonet/
Dpn_dev.h31 struct phonet_device_list *phonet_device_list(struct net *net);
43 struct net_device *phonet_device_get(struct net *net);
48 int phonet_address_lookup(struct net *net, u8 addr);
54 struct net_device *phonet_route_get_rcu(struct net *net, u8 daddr);
55 struct net_device *phonet_route_output(struct net *net, u8 daddr);
/linux-4.1.27/net/netfilter/ipvs/
Dip_vs_ctl.c76 static bool __ip_vs_addr_is_local_v6(struct net *net, in __ip_vs_addr_is_local_v6() argument
82 struct dst_entry *dst = ip6_route_output(net, NULL, &fl6); in __ip_vs_addr_is_local_v6()
231 ip_vs_random_dropentry(ipvs->net); in defense_work_handler()
266 ip_vs_svc_hashkey(struct net *net, int af, unsigned int proto, in ip_vs_svc_hashkey() argument
279 ahash ^= ((size_t) net >> 8); in ip_vs_svc_hashkey()
288 static inline unsigned int ip_vs_svc_fwm_hashkey(struct net *net, __u32 fwmark) in ip_vs_svc_fwm_hashkey() argument
290 return (((size_t)net>>8) ^ fwmark) & IP_VS_SVC_TAB_MASK; in ip_vs_svc_fwm_hashkey()
312 hash = ip_vs_svc_hashkey(svc->net, svc->af, svc->protocol, in ip_vs_svc_hash()
319 hash = ip_vs_svc_fwm_hashkey(svc->net, svc->fwmark); in ip_vs_svc_hash()
360 __ip_vs_service_find(struct net *net, int af, __u16 protocol, in __ip_vs_service_find() argument
[all …]
Dip_vs_app.c78 ip_vs_app_inc_new(struct net *net, struct ip_vs_app *app, __u16 proto, in ip_vs_app_inc_new() argument
110 ret = pp->register_app(net, inc); in ip_vs_app_inc_new()
130 ip_vs_app_inc_release(struct net *net, struct ip_vs_app *inc) in ip_vs_app_inc_release() argument
138 pp->unregister_app(net, inc); in ip_vs_app_inc_release()
178 register_ip_vs_app_inc(struct net *net, struct ip_vs_app *app, __u16 proto, in register_ip_vs_app_inc() argument
185 result = ip_vs_app_inc_new(net, app, proto, port); in register_ip_vs_app_inc()
194 struct ip_vs_app *register_ip_vs_app(struct net *net, struct ip_vs_app *app) in register_ip_vs_app() argument
196 struct netns_ipvs *ipvs = net_ipvs(net); in register_ip_vs_app()
233 void unregister_ip_vs_app(struct net *net, struct ip_vs_app *app) in unregister_ip_vs_app() argument
235 struct netns_ipvs *ipvs = net_ipvs(net); in unregister_ip_vs_app()
[all …]
Dip_vs_est.c105 struct net *net = (struct net *)arg; in estimation_timer() local
108 ipvs = net_ipvs(net); in estimation_timer()
143 void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats) in ip_vs_start_estimator() argument
145 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_start_estimator()
155 void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats) in ip_vs_stop_estimator() argument
157 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_stop_estimator()
195 int __net_init ip_vs_estimator_net_init(struct net *net) in ip_vs_estimator_net_init() argument
197 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_estimator_net_init()
201 setup_timer(&ipvs->est_timer, estimation_timer, (unsigned long)net); in ip_vs_estimator_net_init()
206 void __net_exit ip_vs_estimator_net_cleanup(struct net *net) in ip_vs_estimator_net_cleanup() argument
[all …]
Dip_vs_proto.c66 register_ip_vs_proto_netns(struct net *net, struct ip_vs_protocol *pp) in register_ip_vs_proto_netns() argument
68 struct netns_ipvs *ipvs = net_ipvs(net); in register_ip_vs_proto_netns()
82 int ret = pp->init_netns(net, pd); in register_ip_vs_proto_netns()
119 unregister_ip_vs_proto_netns(struct net *net, struct ip_vs_proto_data *pd) in unregister_ip_vs_proto_netns() argument
121 struct netns_ipvs *ipvs = net_ipvs(net); in unregister_ip_vs_proto_netns()
130 pd->pp->exit_netns(net, pd); in unregister_ip_vs_proto_netns()
174 ip_vs_proto_data_get(struct net *net, unsigned short proto) in ip_vs_proto_data_get() argument
176 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_proto_data_get()
320 int __net_init ip_vs_protocol_net_init(struct net *net) in ip_vs_protocol_net_init() argument
342 ret = register_ip_vs_proto_netns(net, protos[i]); in ip_vs_protocol_net_init()
[all …]
Dip_vs_sync.c196 struct net *net; member
527 static void ip_vs_sync_conn_v0(struct net *net, struct ip_vs_conn *cp, in ip_vs_sync_conn_v0() argument
530 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_sync_conn_v0()
615 ip_vs_sync_conn(net, cp, pkts); in ip_vs_sync_conn_v0()
624 void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp, int pkts) in ip_vs_sync_conn() argument
626 struct netns_ipvs *ipvs = net_ipvs(net); in ip_vs_sync_conn()
637 ip_vs_sync_conn_v0(net, cp, pkts); in ip_vs_sync_conn()
784 ip_vs_conn_fill_param_sync(struct net *net, int af, union ip_vs_sync_conn *sc, in ip_vs_conn_fill_param_sync() argument
791 ip_vs_conn_fill_param(net, af, sc->v6.protocol, in ip_vs_conn_fill_param_sync()
798 ip_vs_conn_fill_param(net, af, sc->v4.protocol, in ip_vs_conn_fill_param_sync()
[all …]
Dip_vs_proto_ah_esp.c44 ah_esp_conn_fill_param_proto(struct net *net, int af, in ah_esp_conn_fill_param_proto() argument
49 ip_vs_conn_fill_param(net, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
53 ip_vs_conn_fill_param(net, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
65 struct net *net = skb_net(skb); in ah_esp_conn_in_get() local
67 ah_esp_conn_fill_param_proto(net, af, iph, inverse, &p); in ah_esp_conn_in_get()
92 struct net *net = skb_net(skb); in ah_esp_conn_out_get() local
94 ah_esp_conn_fill_param_proto(net, af, iph, inverse, &p); in ah_esp_conn_out_get()
/linux-4.1.27/net/8021q/
Dvlanproc.c126 void vlan_proc_cleanup(struct net *net) in vlan_proc_cleanup() argument
128 struct vlan_net *vn = net_generic(net, vlan_net_id); in vlan_proc_cleanup()
134 remove_proc_entry(name_root, net->proc_net); in vlan_proc_cleanup()
145 int __net_init vlan_proc_init(struct net *net) in vlan_proc_init() argument
147 struct vlan_net *vn = net_generic(net, vlan_net_id); in vlan_proc_init()
149 vn->proc_vlan_dir = proc_net_mkdir(net, name_root, net->proc_net); in vlan_proc_init()
161 vlan_proc_cleanup(net); in vlan_proc_init()
206 struct net *net = seq_file_net(seq); in vlan_seq_start() local
213 for_each_netdev_rcu(net, dev) { in vlan_seq_start()
227 struct net *net = seq_file_net(seq); in vlan_seq_next() local
[all …]
Dvlanproc.h5 struct net;
7 int vlan_proc_init(struct net *net);
10 void vlan_proc_cleanup(struct net *net);
14 #define vlan_proc_init(net) (0) argument
15 #define vlan_proc_cleanup(net) do {} while (0) argument
/linux-4.1.27/net/mpls/
Daf_mpls.c41 struct nlmsghdr *nlh, struct net *net, u32 portid,
44 static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index) in mpls_route_input_rcu() argument
48 if (index < net->mpls.platform_labels) { in mpls_route_input_rcu()
50 rcu_dereference(net->mpls.platform_label); in mpls_route_input_rcu()
139 struct net *net = dev_net(dev); in mpls_forward() local
175 rt = mpls_route_input_rcu(net, dec.label); in mpls_forward()
279 static void mpls_notify_route(struct net *net, unsigned index, in mpls_notify_route() argument
290 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route()
293 static void mpls_route_update(struct net *net, unsigned index, in mpls_route_update() argument
302 platform_label = rtnl_dereference(net->mpls.platform_label); in mpls_route_update()
[all …]
/linux-4.1.27/fs/nfs/blocklayout/
Drpc_pipefs.c56 struct net *net = server->nfs_client->cl_net; in bl_resolve_deviceid() local
57 struct nfs_net *nn = net_generic(net, nfs_net_id); in bl_resolve_deviceid()
169 struct net *net = sb->s_fs_info; in rpc_pipefs_event() local
170 struct nfs_net *nn = net_generic(net, nfs_net_id); in rpc_pipefs_event()
207 static struct dentry *nfs4blocklayout_register_net(struct net *net, in nfs4blocklayout_register_net() argument
213 pipefs_sb = rpc_get_sb_net(net); in nfs4blocklayout_register_net()
217 rpc_put_sb_net(net); in nfs4blocklayout_register_net()
221 static void nfs4blocklayout_unregister_net(struct net *net, in nfs4blocklayout_unregister_net() argument
226 pipefs_sb = rpc_get_sb_net(net); in nfs4blocklayout_unregister_net()
229 rpc_put_sb_net(net); in nfs4blocklayout_unregister_net()
[all …]
/linux-4.1.27/include/linux/netfilter/
Dnfnetlink.h36 int nfnetlink_has_listeners(struct net *net, unsigned int group);
37 struct sk_buff *nfnetlink_alloc_skb(struct net *net, unsigned int size,
39 int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid,
41 int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error);
42 int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
Dx_tables.h58 struct net *net; member
72 struct net *net; member
88 struct net *net; member
99 struct net *net; member
247 struct xt_table *xt_register_table(struct net *net,
265 struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af,
269 int xt_proto_init(struct net *net, u_int8_t af);
270 void xt_proto_fini(struct net *net, u_int8_t af);
/linux-4.1.27/net/netlink/
Daf_netlink.h44 int (*netlink_bind)(struct net *net, int group);
45 void (*netlink_unbind)(struct net *net, int group);
80 int (*bind)(struct net *net, int group);
81 void (*unbind)(struct net *net, int group);
82 bool (*compare)(struct net *net, struct sock *sock);
/linux-4.1.27/net/wireless/
Dwext-proc.c92 struct net *net = seq_file_net(seq); in wireless_dev_seq_start() local
101 for_each_netdev(net, dev) in wireless_dev_seq_start()
109 struct net *net = seq_file_net(seq); in wireless_dev_seq_next() local
114 first_net_device(net) : next_net_device(v); in wireless_dev_seq_next()
143 int __net_init wext_proc_init(struct net *net) in wext_proc_init() argument
146 if (!proc_create("wireless", S_IRUGO, net->proc_net, in wext_proc_init()
153 void __net_exit wext_proc_exit(struct net *net) in wext_proc_exit() argument
155 remove_proc_entry("wireless", net->proc_net); in wext_proc_exit()
/linux-4.1.27/net/phonet/
Dpn_dev.c49 static struct phonet_net *phonet_pernet(struct net *net) in phonet_pernet() argument
51 BUG_ON(!net); in phonet_pernet()
53 return net_generic(net, phonet_net_id); in phonet_pernet()
56 struct phonet_device_list *phonet_device_list(struct net *net) in phonet_device_list() argument
58 struct phonet_net *pnn = phonet_pernet(net); in phonet_device_list()
124 struct net_device *phonet_device_get(struct net *net) in phonet_device_get() argument
126 struct phonet_device_list *pndevs = phonet_device_list(net); in phonet_device_get()
222 int phonet_address_lookup(struct net *net, u8 addr) in phonet_address_lookup() argument
224 struct phonet_device_list *pndevs = phonet_device_list(net); in phonet_address_lookup()
319 static int __net_init phonet_init_net(struct net *net) in phonet_init_net() argument
[all …]
/linux-4.1.27/drivers/firewire/
Dnet.c216 static int fwnet_header_create(struct sk_buff *skb, struct net_device *net, in fwnet_header_create() argument
225 if (net->flags & (IFF_LOOPBACK | IFF_NOARP)) { in fwnet_header_create()
226 memset(h->h_dest, 0, net->addr_len); in fwnet_header_create()
228 return net->hard_header_len; in fwnet_header_create()
232 memcpy(h->h_dest, daddr, net->addr_len); in fwnet_header_create()
234 return net->hard_header_len; in fwnet_header_create()
237 return -net->hard_header_len; in fwnet_header_create()
243 struct net_device *net; in fwnet_header_cache() local
248 net = neigh->dev; in fwnet_header_cache()
251 memcpy(h->h_dest, neigh->ha, net->addr_len); in fwnet_header_cache()
[all …]
/linux-4.1.27/net/ieee802154/6lowpan/
Dreassembly.c97 struct net *net; in lowpan_frag_expire() local
100 net = container_of(fq->q.net, struct net, ieee802154_lowpan.frags); in lowpan_frag_expire()
114 fq_find(struct net *net, const struct lowpan_frag_info *frag_info, in fq_find() argument
122 net_ieee802154_lowpan(net); in fq_find()
357 struct net *net = dev_net(skb->dev); in lowpan_frag_rcv() local
374 fq = fq_find(net, frag_info, &source, &dest); in lowpan_frag_rcv()
436 static int __net_init lowpan_frags_ns_sysctl_register(struct net *net) in lowpan_frags_ns_sysctl_register() argument
441 net_ieee802154_lowpan(net); in lowpan_frags_ns_sysctl_register()
444 if (!net_eq(net, &init_net)) { in lowpan_frags_ns_sysctl_register()
458 if (net->user_ns != &init_user_ns) in lowpan_frags_ns_sysctl_register()
[all …]
/linux-4.1.27/include/linux/
Dnetlink.h11 struct net;
49 int (*bind)(struct net *net, int group);
50 void (*unbind)(struct net *net, int group);
51 bool (*compare)(struct net *net, struct sock *sk);
54 extern struct sock *__netlink_kernel_create(struct net *net, int unit,
58 netlink_kernel_create(struct net *net, int unit, struct netlink_kernel_cfg *cfg) in netlink_kernel_create() argument
60 return __netlink_kernel_create(net, unit, THIS_MODULE, cfg); in netlink_kernel_create()
136 struct net *net; member
Dseq_file_net.h6 struct net;
7 extern struct net init_net;
11 struct net *net; member
21 static inline struct net *seq_file_net(struct seq_file *seq) in seq_file_net()
24 return ((struct seq_net_private *)seq->private)->net; in seq_file_net()
Dinetdevice.h50 #define IPV4_DEVCONF_ALL(net, attr) \ argument
51 IPV4_DEVCONF((*(net)->ipv4.devconf_all), attr)
81 #define IN_DEV_NET_ORCONF(in_dev, net, attr) \ argument
82 (IPV4_DEVCONF_ALL(net, attr) || \
114 #define IN_DEV_NET_ROUTE_LOCALNET(in_dev, net) \ argument
115 IN_DEV_NET_ORCONF(in_dev, net, ROUTE_LOCALNET)
153 void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
156 struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref);
157 static inline struct net_device *ip_dev_find(struct net *net, __be32 addr) in ip_dev_find() argument
159 return __ip_dev_find(net, addr, true); in ip_dev_find()
[all …]
/linux-4.1.27/samples/pktgen/
Dpktgen.conf-2-223 PGDEV=/proc/net/pktgen/kpktgend_0
29 PGDEV=/proc/net/pktgen/kpktgend_1
48 PGDEV=/proc/net/pktgen/eth1
57 PGDEV=/proc/net/pktgen/eth2
67 PGDEV=/proc/net/pktgen/pgctrl
73 cat /proc/net/pktgen/eth1 /proc/net/pktgen/eth2
/linux-4.1.27/include/linux/lockd/
Dbind.h45 struct net *net; member
57 extern int lockd_up(struct net *net);
58 extern void lockd_down(struct net *net);
/linux-4.1.27/Documentation/ABI/testing/
Dsysfs-driver-hid-roccat-ryos3 Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
7 Users: http://roccat.sourceforge.net
11 Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
19 Users: http://roccat.sourceforge.net
23 Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
29 Users: http://roccat.sourceforge.net
33 Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
39 Users: http://roccat.sourceforge.net
43 Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
49 Users: http://roccat.sourceforge.net
[all …]
/linux-4.1.27/drivers/staging/lustre/lnet/lnet/
Dconfig.c81 lnet_net_unique(__u32 net, struct list_head *nilist) in lnet_net_unique() argument
89 if (LNET_NIDNET(ni->ni_nid) == net) in lnet_net_unique()
112 lnet_ni_alloc(__u32 net, struct cfs_expr_list *el, struct list_head *nilist) in lnet_ni_alloc() argument
119 if (!lnet_net_unique(net, nilist)) { in lnet_ni_alloc()
121 libcfs_net2str(net)); in lnet_ni_alloc()
128 libcfs_net2str(net)); in lnet_ni_alloc()
154 libcfs_net2str(net), rc); in lnet_ni_alloc()
168 ni->ni_nid = LNET_MKNID(net, 0); in lnet_ni_alloc()
186 __u32 net; in lnet_parse_networks() local
255 net = libcfs_str2net(cfs_trimwhite(str)); in lnet_parse_networks()
[all …]
/linux-4.1.27/net/bridge/
Dbr_ioctl.c25 static int get_bridge_ifindices(struct net *net, int *indices, int num) in get_bridge_ifindices() argument
30 for_each_netdev(net, dev) { in get_bridge_ifindices()
88 struct net *net = dev_net(br->dev); in add_del_if() local
92 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in add_del_if()
95 dev = __dev_get_by_index(net, ifindex); in add_del_if()
296 static int old_deviceless(struct net *net, void __user *uarg) in old_deviceless() argument
318 args[2] = get_bridge_ifindices(net, indices, args[2]); in old_deviceless()
332 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) in old_deviceless()
341 return br_add_bridge(net, buf); in old_deviceless()
343 return br_del_bridge(net, buf); in old_deviceless()
[all …]

1234567