/net/netlink/ |
D | genetlink.c | 89 static int genl_ctrl_event(int event, const struct genl_family *family, 100 const struct genl_family *family; in genl_family_find_byname() local 103 idr_for_each_entry(&genl_fam_idr, family, id) in genl_family_find_byname() 104 if (strcmp(family->name, name) == 0) in genl_family_find_byname() 105 return family; in genl_family_find_byname() 111 const struct genl_family *family) in genl_get_cmd() argument 115 for (i = 0; i < family->n_ops; i++) in genl_get_cmd() 116 if (family->ops[i].cmd == cmd) in genl_get_cmd() 117 return &family->ops[i]; in genl_get_cmd() 184 static int genl_validate_assign_mc_groups(struct genl_family *family) in genl_validate_assign_mc_groups() argument [all …]
|
/net/xfrm/ |
D | xfrm_state.c | 62 unsigned short family) in xfrm_dst_hash() argument 64 return __xfrm_dst_hash(daddr, saddr, reqid, family, net->xfrm.state_hmask); in xfrm_dst_hash() 70 unsigned short family) in xfrm_src_hash() argument 72 return __xfrm_src_hash(daddr, saddr, family, net->xfrm.state_hmask); in xfrm_src_hash() 77 __be32 spi, u8 proto, unsigned short family) in xfrm_spi_hash() argument 79 return __xfrm_spi_hash(daddr, spi, proto, family, net->xfrm.state_hmask); in xfrm_spi_hash() 95 x->props.reqid, x->props.family, in xfrm_hash_transfer() 100 x->props.family, in xfrm_hash_transfer() 106 x->id.proto, x->props.family, in xfrm_hash_transfer() 182 int xfrm_register_type(const struct xfrm_type *type, unsigned short family) in xfrm_register_type() argument [all …]
|
D | xfrm_input.c | 55 if (WARN_ON(afinfo->family >= ARRAY_SIZE(xfrm_input_afinfo))) in xfrm_input_register_afinfo() 59 if (unlikely(xfrm_input_afinfo[afinfo->family] != NULL)) in xfrm_input_register_afinfo() 62 rcu_assign_pointer(xfrm_input_afinfo[afinfo->family], afinfo); in xfrm_input_register_afinfo() 73 if (likely(xfrm_input_afinfo[afinfo->family] != NULL)) { in xfrm_input_unregister_afinfo() 74 if (unlikely(xfrm_input_afinfo[afinfo->family] != afinfo)) in xfrm_input_unregister_afinfo() 77 RCU_INIT_POINTER(xfrm_input_afinfo[afinfo->family], NULL); in xfrm_input_unregister_afinfo() 85 static const struct xfrm_input_afinfo *xfrm_input_get_afinfo(unsigned int family) in xfrm_input_get_afinfo() argument 89 if (WARN_ON_ONCE(family >= ARRAY_SIZE(xfrm_input_afinfo))) in xfrm_input_get_afinfo() 93 afinfo = rcu_dereference(xfrm_input_afinfo[family]); in xfrm_input_get_afinfo() 99 static int xfrm_rcv_cb(struct sk_buff *skb, unsigned int family, u8 protocol, in xfrm_rcv_cb() argument [all …]
|
D | xfrm_policy.c | 112 u16 family; member 170 xfrm_policy_inexact_lookup(struct net *net, u8 type, u16 family, u8 dir, 175 u8 type, u16 family, u8 dir, u32 if_id); 220 unsigned short family) in xfrm_selector_match() argument 222 switch (family) { in xfrm_selector_match() 231 static const struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) in xfrm_policy_get_afinfo() argument 235 if (unlikely(family >= ARRAY_SIZE(xfrm_policy_afinfo))) in xfrm_policy_get_afinfo() 238 afinfo = rcu_dereference(xfrm_policy_afinfo[family]); in xfrm_policy_get_afinfo() 253 int family, u32 mark) in __xfrm_dst_lookup() argument 258 afinfo = xfrm_policy_get_afinfo(family); in __xfrm_dst_lookup() [all …]
|
D | xfrm_hash.h | 86 u32 reqid, unsigned short family, in __xfrm_dst_hash() argument 89 unsigned int h = family ^ reqid; in __xfrm_dst_hash() 90 switch (family) { in __xfrm_dst_hash() 103 unsigned short family, in __xfrm_src_hash() argument 106 unsigned int h = family; in __xfrm_src_hash() 107 switch (family) { in __xfrm_src_hash() 120 unsigned short family, unsigned int hmask) in __xfrm_spi_hash() argument 123 switch (family) { in __xfrm_spi_hash() 140 unsigned short family, unsigned int hmask, in __sel_hash() argument 147 switch (family) { in __sel_hash() [all …]
|
/net/netlabel/ |
D | netlabel_domainhash.c | 137 u16 family) in netlbl_domhsh_search() argument 148 netlbl_family_match(iter->family, family) && in netlbl_domhsh_search() 171 u16 family) in netlbl_domhsh_search_def() argument 175 entry = netlbl_domhsh_search(domain, family); in netlbl_domhsh_search_def() 178 if (family == AF_INET || family == AF_UNSPEC) { in netlbl_domhsh_search_def() 183 if (family == AF_INET6 || family == AF_UNSPEC) { in netlbl_domhsh_search_def() 284 if (entry->family != AF_INET && entry->family != AF_INET6 && in netlbl_domhsh_validate() 285 (entry->family != AF_UNSPEC || in netlbl_domhsh_validate() 296 if (entry->family != AF_INET || in netlbl_domhsh_validate() 301 if (entry->family != AF_INET6 || in netlbl_domhsh_validate() [all …]
|
D | netlabel_kapi.c | 57 u16 family, in netlbl_cfg_map_del() argument 63 return netlbl_domhsh_remove(domain, family, audit_info); in netlbl_cfg_map_del() 65 switch (family) { in netlbl_cfg_map_del() 96 u16 family, in netlbl_cfg_unlbl_map_add() argument 115 entry->family = family; in netlbl_cfg_unlbl_map_add() 126 switch (family) { in netlbl_cfg_unlbl_map_add() 212 u16 family, in netlbl_cfg_unlbl_static_add() argument 218 switch (family) { in netlbl_cfg_unlbl_static_add() 255 u16 family, in netlbl_cfg_unlbl_static_del() argument 260 switch (family) { in netlbl_cfg_unlbl_static_del() [all …]
|
/net/netfilter/ |
D | xt_socket.c | 154 static int socket_mt_enable_defrag(struct net *net, int family) in socket_mt_enable_defrag() argument 156 switch (family) { in socket_mt_enable_defrag() 164 WARN_ONCE(1, "Unknown family %d\n", family); in socket_mt_enable_defrag() 173 err = socket_mt_enable_defrag(par->net, par->family); in socket_mt_v1_check() 190 err = socket_mt_enable_defrag(par->net, par->family); in socket_mt_v2_check() 208 err = socket_mt_enable_defrag(par->net, par->family); in socket_mt_v3_check() 223 .family = NFPROTO_IPV4, 232 .family = NFPROTO_IPV4, 244 .family = NFPROTO_IPV6, 256 .family = NFPROTO_IPV4, [all …]
|
D | nft_nat.c | 29 u8 family; member 44 if (priv->family == AF_INET) { in nft_nat_eval() 116 u32 family; in nft_nat_init() local 138 family = ntohl(nla_get_be32(tb[NFTA_NAT_FAMILY])); in nft_nat_init() 139 if (ctx->family != NFPROTO_INET && ctx->family != family) in nft_nat_init() 142 switch (family) { in nft_nat_init() 152 priv->family = family; in nft_nat_init() 202 return nf_ct_netns_get(ctx->net, family); in nft_nat_init() 220 if (nla_put_be32(skb, NFTA_NAT_FAMILY, htonl(priv->family))) in nft_nat_dump() 255 nf_ct_netns_put(ctx->net, priv->family); in nft_nat_destroy() [all …]
|
D | xt_conntrack.c | 42 u_int8_t family) in conntrack_mt_origsrc() argument 45 &info->origsrc_addr, &info->origsrc_mask, family); in conntrack_mt_origsrc() 51 u_int8_t family) in conntrack_mt_origdst() argument 54 &info->origdst_addr, &info->origdst_mask, family); in conntrack_mt_origdst() 60 u_int8_t family) in conntrack_mt_replsrc() argument 63 &info->replsrc_addr, &info->replsrc_mask, family); in conntrack_mt_replsrc() 69 u_int8_t family) in conntrack_mt_repldst() argument 72 &info->repldst_addr, &info->repldst_mask, family); in conntrack_mt_repldst() 270 ret = nf_ct_netns_get(par->net, par->family); in conntrack_mt_check() 273 par->family); in conntrack_mt_check() [all …]
|
D | xt_policy.c | 23 const union nf_inet_addr *a2, unsigned short family) in xt_addr_cmp() argument 25 switch (family) { in xt_addr_cmp() 36 unsigned short family) in match_xfrm_state() argument 39 (xt_addr_cmp(&e->x, &e->y, (const union nf_inet_addr *)(z), family) \ in match_xfrm_state() 53 unsigned short family) in match_policy_in() argument 71 if (match_xfrm_state(sp->xvec[i], e, family)) { in match_policy_in() 83 unsigned short family) in match_policy_out() argument 100 if (match_xfrm_state(dst->xfrm, e, family)) { in match_policy_out() 160 .family = NFPROTO_IPV4, 168 .family = NFPROTO_IPV6,
|
D | xt_connmark.c | 106 ret = nf_ct_netns_get(par->net, par->family); in connmark_tg_check() 109 par->family); in connmark_tg_check() 115 nf_ct_netns_put(par->net, par->family); in connmark_tg_destroy() 136 ret = nf_ct_netns_get(par->net, par->family); in connmark_mt_check() 139 par->family); in connmark_mt_check() 145 nf_ct_netns_put(par->net, par->family); in connmark_mt_destroy() 152 .family = NFPROTO_UNSPEC, 162 .family = NFPROTO_UNSPEC, 174 .family = NFPROTO_UNSPEC,
|
D | xt_ipvs.c | 54 const u_int8_t family = xt_family(par); in ipvs_mt() local 72 ip_vs_fill_iph_skb(family, skb, true, &iph); in ipvs_mt() 90 cp = pp->conn_out_get(ipvs, family, skb, &iph); in ipvs_mt() 141 &data->vmask, family) ^ in ipvs_mt() 157 if (par->family != NFPROTO_IPV4 in ipvs_mt_check() 159 && par->family != NFPROTO_IPV6 in ipvs_mt_check() 163 par->family); in ipvs_mt_check() 173 .family = NFPROTO_UNSPEC,
|
D | xt_LOG.c | 48 if (par->family != NFPROTO_IPV4 && par->family != NFPROTO_IPV6) in log_tg_check() 61 return nf_logger_find_get(par->family, NF_LOG_TYPE_LOG); in log_tg_check() 66 nf_logger_put(par->family, NF_LOG_TYPE_LOG); in log_tg_destroy() 72 .family = NFPROTO_IPV4, 82 .family = NFPROTO_IPV6,
|
D | xt_CT.c | 56 if (par->family == NFPROTO_IPV4) { in xt_ct_find_proto() 62 } else if (par->family == NFPROTO_IPV6) { in xt_ct_find_proto() 86 helper = nf_conntrack_helper_try_module_get(helper_name, par->family, in xt_ct_set_helper() 118 return nf_ct_set_timeout(par->net, ct, par->family, l4proto->l4proto, in xt_ct_set_timeout() 159 ret = nf_ct_netns_get(par->net, par->family); in xt_ct_tg_check() 217 nf_ct_netns_put(par->net, par->family); in xt_ct_tg_check() 278 nf_ct_netns_put(par->net, par->family); in xt_ct_tg_destroy() 308 .family = NFPROTO_UNSPEC, 319 .family = NFPROTO_UNSPEC, 331 .family = NFPROTO_UNSPEC, [all …]
|
D | nf_tables_api.c | 90 u8 family, in nft_ctx_init() argument 96 ctx->family = family; in nft_ctx_init() 452 u8 family, u8 genmask) in nft_table_lookup() argument 461 table->family == family && in nft_table_lookup() 492 __nft_chain_type_get(u8 family, enum nft_chain_types type) in __nft_chain_type_get() argument 494 if (family >= NFPROTO_NUMPROTO || in __nft_chain_type_get() 498 return chain_type[family][type]; in __nft_chain_type_get() 502 __nf_tables_chain_type_lookup(const struct nlattr *nla, u8 family) in __nf_tables_chain_type_lookup() argument 508 type = __nft_chain_type_get(family, i); in __nf_tables_chain_type_lookup() 568 u8 family, bool autoload) in nf_tables_chain_type_lookup() argument [all …]
|
D | nft_tproxy.c | 18 u8 family; member 158 switch (priv->family) { in nft_tproxy_eval() 167 switch (priv->family) { in nft_tproxy_eval() 196 priv->family = ntohl(nla_get_be32(tb[NFTA_TPROXY_FAMILY])); in nft_tproxy_init() 198 switch (ctx->family) { in nft_tproxy_init() 200 if (priv->family != NFPROTO_IPV4) in nft_tproxy_init() 205 if (priv->family != NFPROTO_IPV6) in nft_tproxy_init() 216 if (priv->family == NFPROTO_UNSPEC && tb[NFTA_TPROXY_REG_ADDR]) in nft_tproxy_init() 219 switch (priv->family) { in nft_tproxy_init() 271 if (nla_put_be32(skb, NFTA_TPROXY_FAMILY, htonl(priv->family))) in nft_tproxy_dump()
|
D | nft_chain_filter.c | 29 .family = NFPROTO_IPV4, 73 .family = NFPROTO_ARP, 113 .family = NFPROTO_IPV6, 167 .family = NFPROTO_INET, 224 .family = NFPROTO_BRIDGE, 279 .family = NFPROTO_NETDEV, 330 if (table->family != NFPROTO_NETDEV) in nf_tables_netdev_event() 333 ctx.family = table->family; in nf_tables_netdev_event()
|
D | nft_compat.c | 43 if (ctx->family != NFPROTO_BRIDGE) in nft_compat_chain_validate_dependency() 142 switch (ctx->family) { in nft_target_set_tgchk_param() 173 par->family = ctx->family; in nft_target_set_tgchk_param() 261 par.family = ctx->family; in nft_target_destroy() 386 switch (ctx->family) { in nft_match_set_mtchk_param() 417 par->family = ctx->family; in nft_match_set_mtchk_param() 493 par.family = ctx->family; in __nft_match_destroy() 571 int event, u16 family, const char *name, in nfnl_compat_fill_info() argument 584 nfmsg->nfgen_family = family; in nfnl_compat_fill_info() 711 u32 rev, family; in nft_match_select_ops() local [all …]
|
D | xt_recent.c | 70 u_int16_t family; member 125 const union nf_inet_addr *addrp, u_int16_t family, in recent_entry_lookup() argument 131 if (family == NFPROTO_IPV4) in recent_entry_lookup() 137 if (e->family == family && in recent_entry_lookup() 173 u_int16_t family, u_int8_t ttl) in recent_entry_init() argument 192 e->family = family; in recent_entry_init() 193 if (family == NFPROTO_IPV4) in recent_entry_init() 519 if (e->family == NFPROTO_IPV4) in recent_seq_show() 559 u_int16_t family; in recent_mt_proc_write() local 592 family = NFPROTO_IPV6; in recent_mt_proc_write() [all …]
|
D | xt_hashlimit.c | 118 u_int8_t family; member 275 const char *name, u_int8_t family, in htable_create() argument 320 hinfo->family = family; in htable_create() 341 (family == NFPROTO_IPV4) ? in htable_create() 409 if (hinfo->family == NFPROTO_IPV4) in htable_remove_proc_entry() 429 u_int8_t family) in htable_find_get() argument 436 hinfo->family == family) { in htable_find_get() 665 switch (hinfo->family) { in hashlimit_init_dst() 864 if (par->family == NFPROTO_IPV4) { in hashlimit_mt_check_common() 904 *hinfo = htable_find_get(net, name, par->family); in hashlimit_mt_check_common() [all …]
|
D | xt_cluster.c | 60 xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family) in xt_cluster_is_multicast_addr() argument 64 switch(family) { in xt_cluster_is_multicast_addr() 137 ret = nf_ct_netns_get(par->net, par->family); in xt_cluster_mt_checkentry() 140 par->family); in xt_cluster_mt_checkentry() 146 nf_ct_netns_put(par->net, par->family); in xt_cluster_mt_destroy() 151 .family = NFPROTO_UNSPEC,
|
D | xt_REDIRECT.c | 41 return nf_ct_netns_get(par->net, par->family); in redirect_tg6_checkentry() 46 nf_ct_netns_put(par->net, par->family); in redirect_tg_destroy() 62 return nf_ct_netns_get(par->net, par->family); in redirect_tg4_check() 74 .family = NFPROTO_IPV6, 87 .family = NFPROTO_IPV4,
|
/net/netfilter/ipset/ |
D | ip_set_core.c | 85 find_set_type(const char *name, u8 family, u8 revision) in find_set_type() argument 91 (type->family == family || in find_set_type() 92 type->family == NFPROTO_UNSPEC) && in find_set_type() 115 #define find_set_type_get(name, family, revision, found) \ argument 116 __find_set_type_get(name, family, revision, found, false) 119 __find_set_type_get(const char *name, u8 family, u8 revision, in __find_set_type_get() argument 129 *found = find_set_type(name, family, revision); in __find_set_type_get() 145 __find_set_type_get(name, family, revision, found, true); in __find_set_type_get() 156 #define find_set_type_minmax(name, family, min, max) \ argument 157 __find_set_type_minmax(name, family, min, max, false) [all …]
|
/net/ipv4/ |
D | tunnel4.c | 24 static inline struct xfrm_tunnel __rcu **fam_handlers(unsigned short family) in fam_handlers() argument 26 return (family == AF_INET) ? &tunnel4_handlers : in fam_handlers() 27 (family == AF_INET6) ? &tunnel64_handlers : in fam_handlers() 31 int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family) in xfrm4_tunnel_register() argument 41 for (pprev = fam_handlers(family); in xfrm4_tunnel_register() 63 int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family) in xfrm4_tunnel_deregister() argument 71 for (pprev = fam_handlers(family); in xfrm4_tunnel_deregister()
|