/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 | 118 u16 family; member 176 xfrm_policy_inexact_lookup(struct net *net, u8 type, u16 family, u8 dir, 181 u8 type, u16 family, u8 dir, u32 if_id); 226 unsigned short family) in xfrm_selector_match() argument 228 switch (family) { in xfrm_selector_match() 237 static const struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) in xfrm_policy_get_afinfo() argument 241 if (unlikely(family >= ARRAY_SIZE(xfrm_policy_afinfo))) in xfrm_policy_get_afinfo() 244 afinfo = rcu_dereference(xfrm_policy_afinfo[family]); in xfrm_policy_get_afinfo() 259 int family, u32 mark) in __xfrm_dst_lookup() argument 264 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/netfilter/ |
D | nft_nat.c | 29 u8 family; member 44 if (priv->family == AF_INET) { in nft_nat_eval() 91 if (ctx->family != NFPROTO_IPV4 && in nft_nat_validate() 92 ctx->family != NFPROTO_IPV6 && in nft_nat_validate() 93 ctx->family != NFPROTO_INET) in nft_nat_validate() 121 u32 family; in nft_nat_init() local 143 family = ntohl(nla_get_be32(tb[NFTA_NAT_FAMILY])); in nft_nat_init() 144 if (ctx->family != NFPROTO_INET && ctx->family != family) in nft_nat_init() 147 switch (family) { in nft_nat_init() 159 priv->family = family; in nft_nat_init() [all …]
|
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 | 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 | 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() 287 par.family = ctx->family; in nft_target_destroy() 337 if (ctx->family != NFPROTO_IPV4 && in nft_target_validate() 338 ctx->family != NFPROTO_IPV6 && in nft_target_validate() 339 ctx->family != NFPROTO_INET && in nft_target_validate() 340 ctx->family != NFPROTO_BRIDGE && in nft_target_validate() 341 ctx->family != NFPROTO_ARP) in nft_target_validate() 427 switch (ctx->family) { in nft_match_set_mtchk_param() [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 | nft_tproxy.c | 18 u8 family; member 165 switch (priv->family) { in nft_tproxy_eval() 174 switch (priv->family) { in nft_tproxy_eval() 203 priv->family = ntohl(nla_get_be32(tb[NFTA_TPROXY_FAMILY])); in nft_tproxy_init() 205 switch (ctx->family) { in nft_tproxy_init() 207 if (priv->family != NFPROTO_IPV4) in nft_tproxy_init() 212 if (priv->family != NFPROTO_IPV6) in nft_tproxy_init() 223 if (priv->family == NFPROTO_UNSPEC && tb[NFTA_TPROXY_REG_ADDR]) in nft_tproxy_init() 226 switch (priv->family) { in nft_tproxy_init() 278 if (nla_put_be32(skb, NFTA_TPROXY_FAMILY, htonl(priv->family))) in nft_tproxy_dump() [all …]
|
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 | nft_chain_filter.c | 32 .family = NFPROTO_IPV4, 76 .family = NFPROTO_ARP, 116 .family = NFPROTO_IPV6, 170 .family = NFPROTO_INET, 227 .family = NFPROTO_BRIDGE, 282 .family = NFPROTO_NETDEV, 338 if (table->family != NFPROTO_NETDEV) in nf_tables_netdev_event() 341 ctx.family = table->family; in nf_tables_netdev_event()
|
D | nft_ct.c | 439 switch (ctx->family) { in nft_ct_get_init() 509 err = nf_ct_netns_get(ctx->net, ctx->family); in nft_ct_get_init() 609 err = nf_ct_netns_get(ctx->net, ctx->family); in nft_ct_set_init() 623 nf_ct_netns_put(ctx->net, ctx->family); in nft_ct_get_destroy() 632 nf_ct_netns_put(ctx->net, ctx->family); in nft_ct_set_destroy() 866 int l3num = ctx->family; in nft_ct_timeout_obj_init() 902 ret = nf_ct_netns_get(ctx->net, ctx->family); in nft_ct_timeout_obj_init() 922 nf_ct_netns_put(ctx->net, ctx->family); in nft_ct_timeout_obj_destroy() 982 int family = ctx->family; in nft_ct_helper_obj_init() local 995 family = ntohs(nla_get_be16(tb[NFTA_CT_HELPER_L3PROTO])); in nft_ct_helper_obj_init() [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() 180 u_int16_t family, u_int8_t ttl) in recent_entry_init() argument 199 e->family = family; in recent_entry_init() 200 if (family == NFPROTO_IPV4) in recent_entry_init() 527 if (e->family == NFPROTO_IPV4) in recent_seq_show() 567 u_int16_t family; in recent_mt_proc_write() local 600 family = NFPROTO_IPV6; in recent_mt_proc_write() [all …]
|
D | nf_tables_api.c | 102 u8 family, in nft_ctx_init() argument 108 ctx->family = family; in nft_ctx_init() 242 table->family == NFPROTO_NETDEV) in __nf_tables_unregister_hook() 534 u8 family, u8 genmask) in nft_table_lookup() argument 546 table->family == family && in nft_table_lookup() 579 __nft_chain_type_get(u8 family, enum nft_chain_types type) in __nft_chain_type_get() argument 581 if (family >= NFPROTO_NUMPROTO || in __nft_chain_type_get() 585 return chain_type[family][type]; in __nft_chain_type_get() 589 __nf_tables_chain_type_lookup(const struct nlattr *nla, u8 family) in __nf_tables_chain_type_lookup() argument 595 type = __nft_chain_type_get(family, i); in __nf_tables_chain_type_lookup() [all …]
|
D | xt_hashlimit.c | 119 u_int8_t family; member 276 const char *name, u_int8_t family, in htable_create() argument 321 hinfo->family = family; in htable_create() 342 (family == NFPROTO_IPV4) ? in htable_create() 396 if (hinfo->family == NFPROTO_IPV4) in htable_remove_proc_entry() 407 u_int8_t family) in htable_find_get() argument 414 hinfo->family == family) { in htable_find_get() 647 switch (hinfo->family) { in hashlimit_init_dst() 856 if (par->family == NFPROTO_IPV4) { in hashlimit_mt_check_common() 896 *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,
|
/net/netlabel/ |
D | netlabel_domainhash.c | 138 u16 family) in netlbl_domhsh_search() argument 149 netlbl_family_match(iter->family, family) && in netlbl_domhsh_search() 172 u16 family) in netlbl_domhsh_search_def() argument 176 entry = netlbl_domhsh_search(domain, family); in netlbl_domhsh_search_def() 179 if (family == AF_INET || family == AF_UNSPEC) { in netlbl_domhsh_search_def() 184 if (family == AF_INET6 || family == AF_UNSPEC) { in netlbl_domhsh_search_def() 285 if (entry->family != AF_INET && entry->family != AF_INET6 && in netlbl_domhsh_validate() 286 (entry->family != AF_UNSPEC || in netlbl_domhsh_validate() 297 if (entry->family != AF_INET || in netlbl_domhsh_validate() 302 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/ipset/ |
D | ip_set_core.c | 87 find_set_type(const char *name, u8 family, u8 revision) in find_set_type() argument 93 (type->family == family || in find_set_type() 94 type->family == NFPROTO_UNSPEC) && in find_set_type() 117 #define find_set_type_get(name, family, revision, found) \ argument 118 __find_set_type_get(name, family, revision, found, false) 121 __find_set_type_get(const char *name, u8 family, u8 revision, in __find_set_type_get() argument 131 *found = find_set_type(name, family, revision); in __find_set_type_get() 147 __find_set_type_get(name, family, revision, found, true); in __find_set_type_get() 158 #define find_set_type_minmax(name, family, min, max) \ argument 159 __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()
|