/net/tipc/ |
D | bcast.c | 72 static struct tipc_bc_base *tipc_bc_base(struct net *net) in tipc_bc_base() argument 74 return tipc_net(net)->bcbase; in tipc_bc_base() 77 int tipc_bcast_get_mtu(struct net *net) in tipc_bcast_get_mtu() argument 79 return tipc_link_mtu(tipc_bc_sndlink(net)) - INT_H_SIZE; in tipc_bcast_get_mtu() 82 void tipc_bcast_disable_rcast(struct net *net) in tipc_bcast_disable_rcast() argument 84 tipc_bc_base(net)->rcast_support = false; in tipc_bcast_disable_rcast() 87 static void tipc_bcbase_calc_bc_threshold(struct net *net) in tipc_bcbase_calc_bc_threshold() argument 89 struct tipc_bc_base *bb = tipc_bc_base(net); in tipc_bcbase_calc_bc_threshold() 90 int cluster_size = tipc_link_bc_peers(tipc_bc_sndlink(net)); in tipc_bcbase_calc_bc_threshold() 98 static void tipc_bcbase_select_primary(struct net *net) in tipc_bcbase_select_primary() argument [all …]
|
D | bcast.h | 74 int tipc_bcast_init(struct net *net); 75 void tipc_bcast_stop(struct net *net); 76 void tipc_bcast_add_peer(struct net *net, struct tipc_link *l, 78 void tipc_bcast_remove_peer(struct net *net, struct tipc_link *rcv_bcl); 79 void tipc_bcast_inc_bearer_dst_cnt(struct net *net, int bearer_id); 80 void tipc_bcast_dec_bearer_dst_cnt(struct net *net, int bearer_id); 81 int tipc_bcast_get_mtu(struct net *net); 82 void tipc_bcast_disable_rcast(struct net *net); 83 int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts, 86 int tipc_bcast_rcv(struct net *net, struct tipc_link *l, struct sk_buff *skb); [all …]
|
D | monitor.h | 60 int tipc_mon_create(struct net *net, int bearer_id); 61 void tipc_mon_delete(struct net *net, int bearer_id); 63 void tipc_mon_peer_up(struct net *net, u32 addr, int bearer_id); 64 void tipc_mon_peer_down(struct net *net, u32 addr, int bearer_id); 65 void tipc_mon_prep(struct net *net, void *data, int *dlen, 67 void tipc_mon_rcv(struct net *net, void *data, u16 dlen, u32 addr, 69 void tipc_mon_get_state(struct net *net, u32 addr, 72 void tipc_mon_remove_peer(struct net *net, u32 addr, int bearer_id); 74 int tipc_nl_monitor_set_threshold(struct net *net, u32 cluster_size); 75 int tipc_nl_monitor_get_threshold(struct net *net); [all …]
|
D | name_distr.c | 68 static struct sk_buff *named_prepare_buf(struct net *net, u32 type, u32 size, in named_prepare_buf() argument 71 struct tipc_net *tn = net_generic(net, tipc_net_id); in named_prepare_buf() 87 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ) in tipc_named_publish() argument 89 struct tipc_net *tn = net_generic(net, tipc_net_id); in tipc_named_publish() 99 buf = named_prepare_buf(net, PUBLICATION, ITEM_SIZE, 0); in tipc_named_publish() 113 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ) in tipc_named_withdraw() argument 123 buf = named_prepare_buf(net, WITHDRAWAL, ITEM_SIZE, 0); in tipc_named_withdraw() 140 static void named_distribute(struct net *net, struct sk_buff_head *list, in named_distribute() argument 146 u32 msg_dsz = ((tipc_node_get_mtu(net, dnode, 0) - INT_H_SIZE) / in named_distribute() 153 skb = named_prepare_buf(net, PUBLICATION, msg_rem, in named_distribute() [all …]
|
D | node.h | 60 void tipc_node_stop(struct net *net); 61 void tipc_node_check_dest(struct net *net, u32 onode, 66 void tipc_node_delete_links(struct net *net, int bearer_id); 67 int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 node, 69 int tipc_node_xmit(struct net *net, struct sk_buff_head *list, u32 dnode, 71 int tipc_node_xmit_skb(struct net *net, struct sk_buff *skb, u32 dest, 73 void tipc_node_subscribe(struct net *net, struct list_head *subscr, u32 addr); 74 void tipc_node_unsubscribe(struct net *net, struct list_head *subscr, u32 addr); 75 void tipc_node_broadcast(struct net *net, struct sk_buff *skb); 76 int tipc_node_add_conn(struct net *net, u32 dnode, u32 port, u32 peer_port); [all …]
|
D | bearer.h | 102 int (*send_msg)(struct net *net, struct sk_buff *buf, 105 int (*enable_media)(struct net *net, struct tipc_bearer *b, 176 void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b); 204 int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b, 207 int tipc_l2_send_msg(struct net *net, struct sk_buff *buf, 210 void tipc_bearer_add_dest(struct net *net, u32 bearer_id, u32 dest); 211 void tipc_bearer_remove_dest(struct net *net, u32 bearer_id, u32 dest); 212 struct tipc_bearer *tipc_bearer_find(struct net *net, const char *name); 213 int tipc_bearer_get_name(struct net *net, char *name, u32 bearer_id); 217 void tipc_bearer_stop(struct net *net); [all …]
|
/net/core/ |
D | net_namespace.c | 37 struct net init_net = { 64 static int net_assign_generic(struct net *net, unsigned int id, void *data) in net_assign_generic() argument 71 old_ng = rcu_dereference_protected(net->gen, in net_assign_generic() 97 rcu_assign_pointer(net->gen, ng); in net_assign_generic() 102 static int ops_init(const struct pernet_operations *ops, struct net *net) in ops_init() argument 112 err = net_assign_generic(net, *ops->id, data); in ops_init() 118 err = ops->init(net); in ops_init() 129 static void ops_free(const struct pernet_operations *ops, struct net *net) in ops_free() argument 132 kfree(net_generic(net, *ops->id)); in ops_free() 139 struct net *net; in ops_exit_list() local [all …]
|
D | fib_notifier.c | 12 int call_fib_notifier(struct notifier_block *nb, struct net *net, in call_fib_notifier() argument 16 info->net = net; in call_fib_notifier() 21 int call_fib_notifiers(struct net *net, enum fib_event_type event_type, in call_fib_notifiers() argument 24 info->net = net; in call_fib_notifiers() 33 struct net *net; in fib_seq_sum() local 36 for_each_net(net) { in fib_seq_sum() 37 list_for_each_entry(ops, &net->fib_notifier_ops, list) { in fib_seq_sum() 40 fib_seq += ops->fib_seq_read(net); in fib_seq_sum() 49 static int fib_net_dump(struct net *net, struct notifier_block *nb) in fib_net_dump() argument 53 list_for_each_entry_rcu(ops, &net->fib_notifier_ops, list) { in fib_net_dump() [all …]
|
/net/can/ |
D | proc.c | 78 static void can_init_stats(struct net *net) in can_init_stats() argument 80 struct s_stats *can_stats = net->can.can_stats; in can_init_stats() 81 struct s_pstats *can_pstats = net->can.can_pstats; in can_init_stats() 120 struct net *net = (struct net *)data; in can_stat_update() local 121 struct s_stats *can_stats = net->can.can_stats; in can_stat_update() 126 can_init_stats(net); in can_stat_update() 130 can_init_stats(net); in can_stat_update() 134 can_init_stats(net); in can_stat_update() 138 can_init_stats(net); in can_stat_update() 142 can_init_stats(net); in can_stat_update() [all …]
|
/net/sctp/ |
D | protocol.c | 84 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 …]
|
D | sm_statefuns.c | 63 struct net *net, 72 struct net *net, 75 static void sctp_send_stale_cookie_err(struct net *net, 82 struct net *net, 89 struct net *net, 96 struct net *net, 105 struct net *net, 112 struct net *net, 121 struct net *net, 129 struct net *net, [all …]
|
/net/ipv6/ |
D | ip6_fib.c | 53 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); 68 static int fib6_walk(struct net *net, struct fib6_walker *w); 80 #define FOR_WALKERS(net, w) \ argument 81 list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh) 83 static void fib6_walker_link(struct net *net, struct fib6_walker *w) in fib6_walker_link() argument 85 write_lock_bh(&net->ipv6.fib6_walker_lock); in fib6_walker_link() 86 list_add(&w->lh, &net->ipv6.fib6_walkers); in fib6_walker_link() [all …]
|
D | fib6_notifier.c | 10 int call_fib6_notifier(struct notifier_block *nb, struct net *net, in call_fib6_notifier() argument 15 return call_fib_notifier(nb, net, event_type, info); in call_fib6_notifier() 18 int call_fib6_notifiers(struct net *net, enum fib_event_type event_type, in call_fib6_notifiers() argument 22 return call_fib_notifiers(net, event_type, info); in call_fib6_notifiers() 25 static unsigned int fib6_seq_read(struct net *net) in fib6_seq_read() argument 27 return fib6_tables_seq_read(net) + fib6_rules_seq_read(net); in fib6_seq_read() 30 static int fib6_dump(struct net *net, struct notifier_block *nb) in fib6_dump() argument 34 err = fib6_rules_dump(net, nb); in fib6_dump() 38 return fib6_tables_dump(net, nb); in fib6_dump() 48 int __net_init fib6_notifier_init(struct net *net) in fib6_notifier_init() argument [all …]
|
D | reassembly.c | 79 struct net *net; in ip6_frag_expire() local 82 net = container_of(fq->q.net, struct net, ipv6.frags); in ip6_frag_expire() 84 ip6frag_expire_frag_queue(net, fq); in ip6_frag_expire() 88 fq_find(struct net *net, __be32 id, const struct ipv6hdr *hdr, int iif) in fq_find() argument 103 q = inet_frag_find(&net->ipv6.frags, &key); in fq_find() 114 struct net *net = dev_net(skb_dst(skb)->dev); in ip6_frag_queue() local 203 add_frag_mem_limit(fq->q.net, skb->truesize); in ip6_frag_queue() 236 __IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), in ip6_frag_queue() 240 __IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), in ip6_frag_queue() 257 struct net *net = container_of(fq->q.net, struct net, ipv6.frags); in ip6_frag_reasm() local [all …]
|
D | sysctl_net_ipv6.c | 139 static int __net_init ipv6_sysctl_net_init(struct net *net) in ipv6_sysctl_net_init() argument 151 ipv6_table[0].data = &net->ipv6.sysctl.bindv6only; in ipv6_sysctl_net_init() 152 ipv6_table[1].data = &net->ipv6.sysctl.anycast_src_echo_reply; in ipv6_sysctl_net_init() 153 ipv6_table[2].data = &net->ipv6.sysctl.flowlabel_consistency; in ipv6_sysctl_net_init() 154 ipv6_table[3].data = &net->ipv6.sysctl.auto_flowlabels; in ipv6_sysctl_net_init() 155 ipv6_table[4].data = &net->ipv6.sysctl.fwmark_reflect; in ipv6_sysctl_net_init() 156 ipv6_table[5].data = &net->ipv6.sysctl.idgen_retries; in ipv6_sysctl_net_init() 157 ipv6_table[6].data = &net->ipv6.sysctl.idgen_delay; in ipv6_sysctl_net_init() 158 ipv6_table[7].data = &net->ipv6.sysctl.flowlabel_state_ranges; in ipv6_sysctl_net_init() 159 ipv6_table[8].data = &net->ipv6.sysctl.ip_nonlocal_bind; in ipv6_sysctl_net_init() [all …]
|
/net/ipv4/ |
D | fib_frontend.c | 54 static int __net_init fib4_rules_init(struct net *net) in fib4_rules_init() argument 67 &net->ipv4.fib_table_hash[TABLE_LOCAL_INDEX]); in fib4_rules_init() 69 &net->ipv4.fib_table_hash[TABLE_MAIN_INDEX]); in fib4_rules_init() 78 struct fib_table *fib_new_table(struct net *net, u32 id) in fib_new_table() argument 85 tb = fib_get_table(net, id); in fib_new_table() 89 if (id == RT_TABLE_LOCAL && !net->ipv4.fib_has_custom_rules) in fib_new_table() 90 alias = fib_new_table(net, RT_TABLE_MAIN); 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 …]
|
D | fib_notifier.c | 12 int call_fib4_notifier(struct notifier_block *nb, struct net *net, in call_fib4_notifier() argument 17 return call_fib_notifier(nb, net, event_type, info); in call_fib4_notifier() 20 int call_fib4_notifiers(struct net *net, enum fib_event_type event_type, in call_fib4_notifiers() argument 26 net->ipv4.fib_seq++; in call_fib4_notifiers() 27 return call_fib_notifiers(net, event_type, info); in call_fib4_notifiers() 30 static unsigned int fib4_seq_read(struct net *net) in fib4_seq_read() argument 34 return net->ipv4.fib_seq + fib4_rules_seq_read(net); in fib4_seq_read() 37 static int fib4_dump(struct net *net, struct notifier_block *nb) in fib4_dump() argument 41 err = fib4_rules_dump(net, nb); in fib4_dump() 45 fib_notify(net, nb); in fib4_dump() [all …]
|
D | ip_fragment.c | 85 struct netns_ipv4 *ipv4 = container_of(q->net, struct netns_ipv4, in ip4_frag_init() 87 struct net *net = container_of(ipv4, struct net, ipv4); in ip4_frag_init() local 93 qp->peer = q->net->max_dist ? in ip4_frag_init() 94 inet_getpeer_v4(net->ipv4.peers, key->saddr, key->vif, 1) : in ip4_frag_init() 140 struct net *net; in ip_expire() local 145 net = container_of(qp->q.net, struct net, ipv4.frags); in ip_expire() 154 __IP_INC_STATS(net, IPSTATS_MIB_REASMFAILS); in ip_expire() 155 __IP_INC_STATS(net, IPSTATS_MIB_REASMTIMEOUT); in ip_expire() 167 head->dev = dev_get_by_index_rcu(net, qp->iif); in ip_expire() 202 static struct ipq *ip_find(struct net *net, struct iphdr *iph, in ip_find() argument [all …]
|
/net/netfilter/ |
D | nf_conntrack_ecache.c | 124 struct net *net = nf_ct_net(ct); in nf_conntrack_eventmask_report() local 129 notify = rcu_dereference(net->ct.nf_conntrack_event_cb); in nf_conntrack_eventmask_report() 180 struct net *net = nf_ct_net(ct); in nf_ct_deliver_cached_events() local 188 notify = rcu_dereference(net->ct.nf_conntrack_event_cb); in nf_ct_deliver_cached_events() 235 struct net *net = nf_ct_exp_net(exp); in nf_ct_expect_event_report() local 240 notify = rcu_dereference(net->ct.nf_expect_event_cb); in nf_ct_expect_event_report() 260 int nf_conntrack_register_notifier(struct net *net, in nf_conntrack_register_notifier() argument 267 notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb, in nf_conntrack_register_notifier() 273 rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new); in nf_conntrack_register_notifier() 282 void nf_conntrack_unregister_notifier(struct net *net, in nf_conntrack_unregister_notifier() argument [all …]
|
D | nf_log.c | 44 int nf_log_set(struct net *net, u_int8_t pf, const struct nf_logger *logger) in nf_log_set() argument 48 if (pf == NFPROTO_UNSPEC || pf >= ARRAY_SIZE(net->nf.nf_loggers)) in nf_log_set() 52 log = nft_log_dereference(net->nf.nf_loggers[pf]); in nf_log_set() 54 rcu_assign_pointer(net->nf.nf_loggers[pf], logger); in nf_log_set() 62 void nf_log_unset(struct net *net, const struct nf_logger *logger) in nf_log_unset() argument 69 log = nft_log_dereference(net->nf.nf_loggers[i]); in nf_log_unset() 71 RCU_INIT_POINTER(net->nf.nf_loggers[i], NULL); in nf_log_unset() 127 int nf_log_bind_pf(struct net *net, u_int8_t pf, in nf_log_bind_pf() argument 130 if (pf >= ARRAY_SIZE(net->nf.nf_loggers)) in nf_log_bind_pf() 137 rcu_assign_pointer(net->nf.nf_loggers[pf], logger); in nf_log_bind_pf() [all …]
|
D | nf_conntrack_timestamp.c | 43 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 …]
|
D | nf_conntrack_core.c | 135 static bool nf_conntrack_double_lock(struct net *net, unsigned int h1, in nf_conntrack_double_lock() argument 196 const struct net *net) in hash_conntrack_raw() argument 207 seed = nf_conntrack_hash_rnd ^ net_hash_mix(net); in hash_conntrack_raw() 219 static u32 __hash_conntrack(const struct net *net, in __hash_conntrack() argument 223 return reciprocal_scale(hash_conntrack_raw(tuple, net), size); in __hash_conntrack() 226 static u32 hash_conntrack(const struct net *net, in hash_conntrack() argument 229 return scale_hash(hash_conntrack_raw(tuple, net)); in hash_conntrack() 238 struct net *net, in nf_ct_get_tuple() argument 252 return l4proto->pkt_to_tuple(skb, dataoff, net, tuple); in nf_ct_get_tuple() 258 struct net *net, struct nf_conntrack_tuple *tuple) in nf_ct_get_tuplepr() argument [all …]
|
D | nf_conntrack_acct.c | 65 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 …]
|
/net/xfrm/ |
D | xfrm_sysctl.c | 7 static void __net_init __xfrm_sysctl_init(struct net *net) in __xfrm_sysctl_init() argument 9 net->xfrm.sysctl_aevent_etime = XFRM_AE_ETIME; in __xfrm_sysctl_init() 10 net->xfrm.sysctl_aevent_rseqth = XFRM_AE_SEQT_SIZE; in __xfrm_sysctl_init() 11 net->xfrm.sysctl_larval_drop = 1; in __xfrm_sysctl_init() 12 net->xfrm.sysctl_acq_expires = 30; in __xfrm_sysctl_init() 44 int __net_init xfrm_sysctl_init(struct net *net) in xfrm_sysctl_init() argument 48 __xfrm_sysctl_init(net); in xfrm_sysctl_init() 53 table[0].data = &net->xfrm.sysctl_aevent_etime; in xfrm_sysctl_init() 54 table[1].data = &net->xfrm.sysctl_aevent_rseqth; in xfrm_sysctl_init() 55 table[2].data = &net->xfrm.sysctl_larval_drop; in xfrm_sysctl_init() [all …]
|
D | xfrm_policy.c | 128 struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos, int oif, in __xfrm_dst_lookup() argument 140 dst = afinfo->dst_lookup(net, tos, oif, saddr, daddr, mark); in __xfrm_dst_lookup() 154 struct net *net = xs_net(x); in xfrm_dst_lookup() local 168 dst = __xfrm_dst_lookup(net, tos, oif, saddr, daddr, family, mark); in xfrm_dst_lookup() 262 struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp) in xfrm_policy_alloc() argument 269 write_pnet(&policy->xp_net, net); in xfrm_policy_alloc() 330 static inline unsigned int idx_hash(struct net *net, u32 index) in idx_hash() argument 332 return __idx_hash(index, net->xfrm.policy_idx_hmask); in idx_hash() 336 static void __get_hash_thresh(struct net *net, in __get_hash_thresh() argument 342 *dbits = net->xfrm.policy_bydst[dir].dbits4; in __get_hash_thresh() [all …]
|