/net/ceph/ |
D | armor.c | 4 int ceph_armor(char *dst, const char *src, const char *end); 5 int ceph_unarmor(char *dst, const char *src, const char *end); 36 int ceph_armor(char *dst, const char *src, const char *end) in ceph_armor() argument 41 while (src < end) { in ceph_armor() 44 a = *src++; in ceph_armor() 46 if (src < end) { in ceph_armor() 47 b = *src++; in ceph_armor() 49 if (src < end) { in ceph_armor() 50 c = *src++; in ceph_armor() 74 int ceph_unarmor(char *dst, const char *src, const char *end) in ceph_unarmor() argument [all …]
|
D | crypto.c | 16 const struct ceph_crypto_key *src) in ceph_crypto_key_clone() argument 18 memcpy(dst, src, sizeof(struct ceph_crypto_key)); in ceph_crypto_key_clone() 19 dst->key = kmemdup(src->key, src->len, GFP_NOFS); in ceph_crypto_key_clone() 161 const void *src, size_t src_len) in ceph_aes_encrypt() argument 181 sg_set_buf(&sg_in[0], src, src_len); in ceph_aes_encrypt() 283 const void *src, size_t src_len) in ceph_aes_decrypt() argument 301 ret = setup_sgtable(&sg_in, &prealloc_sg, src, src_len); in ceph_aes_decrypt() 348 const void *src, size_t src_len) in ceph_aes_decrypt2() argument 367 ret = setup_sgtable(&sg_in, &prealloc_sg, src, src_len); in ceph_aes_decrypt2() 424 const void *src, size_t src_len) in ceph_decrypt() argument [all …]
|
D | crypto.h | 26 const struct ceph_crypto_key *src); 34 const void *src, size_t src_len); 37 const void *src, size_t src_len); 41 const void *src, size_t src_len); 50 int ceph_armor(char *dst, const char *src, const char *end); 51 int ceph_unarmor(char *dst, const char *src, const char *end);
|
/net/netfilter/ |
D | xt_HMARK.c | 35 __be32 src; member 65 u16 src, dst; in hmark_swap_ports() local 68 src = ntohs(hp.b16.src); in hmark_swap_ports() 71 if (dst > src) in hmark_swap_ports() 72 uports->v32 = (dst << 16) | src; in hmark_swap_ports() 74 uports->v32 = (src << 16) | dst; in hmark_swap_ports() 93 t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.ip6, in hmark_ct_set_htuple() 95 t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.ip6, in hmark_ct_set_htuple() 103 t->uports.b16.src = otuple->src.u.all; in hmark_ct_set_htuple() 104 t->uports.b16.dst = rtuple->src.u.all; in hmark_ct_set_htuple() [all …]
|
D | nf_conntrack_expect.c | 84 (((tuple->dst.protonum ^ tuple->src.l3num) << 16) | in nf_ct_expect_dst_hash() 218 intersect_mask.src.u.all = a->mask.src.u.all & b->mask.src.u.all; in expect_clash() 221 intersect_mask.src.u3.all[count] = in expect_clash() 222 a->mask.src.u3.all[count] & b->mask.src.u3.all[count]; in expect_clash() 271 u_int8_t proto, const __be16 *src, const __be16 *dst) in nf_ct_expect_init() argument 284 exp->tuple.src.l3num = family; in nf_ct_expect_init() 288 memcpy(&exp->tuple.src.u3, saddr, len); in nf_ct_expect_init() 289 if (sizeof(exp->tuple.src.u3) > len) in nf_ct_expect_init() 291 memset((void *)&exp->tuple.src.u3 + len, 0x00, in nf_ct_expect_init() 292 sizeof(exp->tuple.src.u3) - len); in nf_ct_expect_init() [all …]
|
D | xt_multiport.c | 32 u_int16_t src, u_int16_t dst) in ports_match_v1() argument 46 && src >= s && src <= e) in ports_match_v1() 53 || (src >= s && src <= e))) in ports_match_v1() 60 && src == s) in ports_match_v1() 66 && (src == s || dst == s)) in ports_match_v1()
|
D | nf_conntrack_h323_main.c | 275 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_rtp_rtcp() 287 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp() 297 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp() 301 if (memcmp(&ct->tuplehash[dir].tuple.src.u3, in expect_rtp_rtcp() 303 sizeof(ct->tuplehash[dir].tuple.src.u3)) && in expect_rtp_rtcp() 348 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_t120() 356 &ct->tuplehash[!dir].tuple.src.u3, in expect_t120() 361 if (memcmp(&ct->tuplehash[dir].tuple.src.u3, in expect_t120() 363 sizeof(ct->tuplehash[dir].tuple.src.u3)) && in expect_t120() 641 .tuple.src.l3num = AF_UNSPEC, [all …]
|
D | nf_conntrack_sane.c | 148 &tuple->src.u3, &tuple->dst.u3, in help() 183 sane[i][j].tuple.src.l3num, ports[i]); in nf_conntrack_sane_fini() 205 sane[i][0].tuple.src.l3num = PF_INET; in nf_conntrack_sane_init() 206 sane[i][1].tuple.src.l3num = PF_INET6; in nf_conntrack_sane_init() 209 sane[i][j].tuple.src.u.tcp.port = htons(ports[i]); in nf_conntrack_sane_init() 221 sane[i][j].tuple.src.l3num, ports[i]); in nf_conntrack_sane_init() 226 sane[i][j].tuple.src.l3num, ports[i]); in nf_conntrack_sane_init()
|
D | nf_conntrack_proto_gre.c | 85 return km->tuple.src.l3num == t->src.l3num && in gre_key_cmpfn() 86 !memcmp(&km->tuple.src.u3, &t->src.u3, sizeof(t->src.u3)) && in gre_key_cmpfn() 102 key = km->tuple.src.u.gre.key; in gre_keymap_lookup() 186 tuple->dst.u.gre.key = orig->src.u.gre.key; in gre_invert_tuple() 187 tuple->src.u.gre.key = orig->dst.u.gre.key; in gre_invert_tuple() 205 tuple->src.u.all = 0; in gre_pkt_to_tuple() 222 tuple->src.u.gre.key = srckey; in gre_pkt_to_tuple() 232 ntohs(tuple->src.u.gre.key), in gre_print_tuple()
|
/net/xfrm/ |
D | xfrm_compat.c | 294 static int xfrm_nla_cpy(struct sk_buff *dst, const struct nlattr *src, int len) in xfrm_nla_cpy() argument 296 return nla_put(dst, src->nla_type, len, nla_data(src)); in xfrm_nla_cpy() 299 static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src) in xfrm_xlate64_attr() argument 301 switch (src->nla_type) { in xfrm_xlate64_attr() 311 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 313 return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_usersa_info)); in xfrm_xlate64_attr() 315 return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_userpolicy_info)); in xfrm_xlate64_attr() 317 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 319 return nla_put_64bit(dst, src->nla_type, nla_len(src), in xfrm_xlate64_attr() 320 nla_data(src), XFRMA_PAD); in xfrm_xlate64_attr() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_getport.c | 25 bool src, __be16 *port, u8 *proto) in get_port() argument 37 *port = src ? th->source : th->dest; in get_port() 49 *port = src ? sh->source : sh->dest; in get_port() 62 *port = src ? uh->source : uh->dest; in get_port() 97 ip_set_get_ip4_port(const struct sk_buff *skb, bool src, in ip_set_get_ip4_port() argument 125 return get_port(skb, protocol, protooff, src, port, proto); in ip_set_get_ip4_port() 131 ip_set_get_ip6_port(const struct sk_buff *skb, bool src, in ip_set_get_ip6_port() argument 146 return get_port(skb, nexthdr, protoff, src, port, proto); in ip_set_get_ip6_port() 152 ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port) in ip_set_get_ip_port() argument 159 ret = ip_set_get_ip4_port(skb, src, port, &proto); in ip_set_get_ip_port() [all …]
|
/net/ipv6/ |
D | fib6_rules.c | 27 struct rt6key src; member 93 r->src.plen && !(flags & RT6_LOOKUP_F_HAS_SADDR)) { in fib6_rule_action() 102 if (!ipv6_prefix_equal(&saddr, &r->src.addr, in fib6_rule_action() 103 r->src.plen)) in fib6_rule_action() 165 if (r->src.plen) { in fib6_rule_match() 167 if (!ipv6_prefix_equal(&fl6->saddr, &r->src.addr, in fib6_rule_match() 168 r->src.plen)) in fib6_rule_match() 203 rule6->src.addr = nla_get_in6_addr(tb[FRA_SRC]); in fib6_rule_configure() 208 rule6->src.plen = frh->src_len; in fib6_rule_configure() 222 if (frh->src_len && (rule6->src.plen != frh->src_len)) in fib6_rule_compare() [all …]
|
D | xfrm6_state.c | 60 __xfrm6_sort(void **dst, void **src, int n, int (*cmp)(void *p), int maxclass) in __xfrm6_sort() argument 70 class[i] = c = cmp(src[i]); in __xfrm6_sort() 78 dst[count[class[i] - 1]++] = src[i]; in __xfrm6_sort() 79 src[i] = NULL; in __xfrm6_sort() 117 __xfrm6_state_sort(struct xfrm_state **dst, struct xfrm_state **src, int n) in __xfrm6_state_sort() argument 119 return __xfrm6_sort((void **)dst, (void **)src, n, in __xfrm6_state_sort() 150 __xfrm6_tmpl_sort(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n) in __xfrm6_tmpl_sort() argument 152 return __xfrm6_sort((void **)dst, (void **)src, n, in __xfrm6_tmpl_sort()
|
/net/sched/ |
D | cls_flower.c | 274 fl_set_key_val(tb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC, in fl_set_key() 275 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_set_key() 276 sizeof(key->eth.src)); in fl_set_key() 291 fl_set_key_val(tb, &key->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC, in fl_set_key() 292 &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK, in fl_set_key() 293 sizeof(key->ipv4.src)); in fl_set_key() 299 fl_set_key_val(tb, &key->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC, in fl_set_key() 300 &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK, in fl_set_key() 301 sizeof(key->ipv6.src)); in fl_set_key() 308 fl_set_key_val(tb, &key->tp.src, TCA_FLOWER_KEY_TCP_SRC, in fl_set_key() [all …]
|
D | cls_rsvp.h | 91 __be32 src[RSVP_DST_LEN]; member 112 static inline unsigned int hash_src(__be32 *src) in hash_src() argument 114 unsigned int h = (__force __u32)src[RSVP_DST_LEN-1]; in hash_src() 138 __be32 *dst, *src; in rsvp_classify() local 160 src = &nhptr->saddr.s6_addr32[0]; in rsvp_classify() 165 src = &nhptr->saddr; in rsvp_classify() 174 h2 = hash_src(src); in rsvp_classify() 191 if (src[RSVP_DST_LEN-1] == f->src[RSVP_DST_LEN - 1] && in rsvp_classify() 195 src[0] == f->src[0] && in rsvp_classify() 196 src[1] == f->src[1] && in rsvp_classify() [all …]
|
/net/netfilter/ipvs/ |
D | ip_vs_nfct.c | 71 #define ARG_TUPLE(T) &(T)->src.u3.ip, ntohs((T)->src.u.all), \ 116 new_tuple.src.u3 = cp->daddr; in ip_vs_update_conntrack() 119 new_tuple.src.u.tcp.port = cp->dport; in ip_vs_update_conntrack() 151 if (exp->tuple.src.l3num != PF_INET) in ip_vs_nfct_expect_callback() 164 ip_vs_conn_fill_param(net_ipvs(net), exp->tuple.src.l3num, orig->dst.protonum, in ip_vs_nfct_expect_callback() 165 &orig->src.u3, orig->src.u.tcp.port, in ip_vs_nfct_expect_callback() 196 new_reply.src.u3 = cp->daddr; in ip_vs_nfct_expect_callback() 197 new_reply.src.u.tcp.port = cp->dport; in ip_vs_nfct_expect_callback() 267 tuple.src.u3 = cp->caddr; in ip_vs_conn_drop_conntrack() 268 tuple.src.u.all = cp->cport; in ip_vs_conn_drop_conntrack() [all …]
|
/net/ipv4/ |
D | ip_tunnel_core.c | 52 __be32 src, __be32 dst, __u8 proto, in iptunnel_xmit() argument 78 iph->saddr = src; in iptunnel_xmit() 128 struct ip_tunnel_info *dst, *src; in iptunnel_metadata_reply() local 138 src = &md->u.tun_info; in iptunnel_metadata_reply() 139 dst->key.tun_id = src->key.tun_id; in iptunnel_metadata_reply() 140 if (src->mode & IP_TUNNEL_INFO_IPV6) in iptunnel_metadata_reply() 141 memcpy(&dst->key.u.ipv6.dst, &src->key.u.ipv6.src, in iptunnel_metadata_reply() 144 dst->key.u.ipv4.dst = src->key.u.ipv4.src; in iptunnel_metadata_reply() 145 dst->mode = src->mode | IP_TUNNEL_INFO_TX; in iptunnel_metadata_reply() 261 tun_info->key.u.ipv4.src = nla_get_be32(tb[LWTUNNEL_IP_SRC]); in ip_tun_build_state() [all …]
|
/net/vmw_vsock/ |
D | vmci_transport.c | 136 struct sockaddr_vm *src, in vmci_transport_packet_init() argument 148 pkt->dg.src = vmci_make_handle(VMADDR_CID_ANY, in vmci_transport_packet_init() 155 pkt->src_port = src->svm_port; in vmci_transport_packet_init() 204 vsock_addr_init(remote, pkt->dg.src.context, pkt->src_port); in vmci_transport_packet_get_addresses() 209 struct sockaddr_vm *src, in __vmci_transport_send_control_pkt() argument 221 vmci_transport_packet_init(pkt, src, dst, type, size, mode, wait, in __vmci_transport_send_control_pkt() 239 struct sockaddr_vm src, dst; in vmci_transport_reply_control_pkt_fast() local 244 vmci_transport_packet_get_addresses(pkt, &src, &dst); in vmci_transport_reply_control_pkt_fast() 245 return __vmci_transport_send_control_pkt(&reply, &src, &dst, in vmci_transport_reply_control_pkt_fast() 254 vmci_transport_send_control_pkt_bh(struct sockaddr_vm *src, in vmci_transport_send_control_pkt_bh() argument [all …]
|
/net/ipv4/netfilter/ |
D | nf_nat_h323.c | 106 if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_sig_addr() 131 &ct->tuplehash[!dir].tuple.src.u3.ip, in set_sig_addr() 136 tuple.src.u3, in set_sig_addr() 158 addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_ras_addr() 159 port == ct->tuplehash[dir].tuple.src.u.udp.port) { in set_ras_addr() 267 &rtp_exp->tuple.src.u3.ip, in nat_rtp_rtcp() 268 ntohs(rtp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp() 272 &rtcp_exp->tuple.src.u3.ip, in nat_rtp_rtcp() 273 ntohs(rtcp_exp->tuple.src.u.udp.port), in nat_rtp_rtcp() 323 &exp->tuple.src.u3.ip, in nat_t120() [all …]
|
D | nf_nat_pptp.c | 60 t.src.l3num = AF_INET; in pptp_nat_expected() 61 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected() 62 t.src.u.gre.key = ct_pptp_info->pac_call_id; in pptp_nat_expected() 69 t.src.l3num = AF_INET; in pptp_nat_expected() 70 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected() 71 t.src.u.gre.key = nat_pptp_info->pns_call_id; in pptp_nat_expected() 104 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in pptp_nat_expected() 204 expect_orig->tuple.src.u.gre.key = nat_pptp_info->pns_call_id; in pptp_exp_gre() 210 expect_reply->tuple.src.u.gre.key = nat_pptp_info->pac_call_id; in pptp_exp_gre()
|
D | nf_nat_proto_icmp.c | 26 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in icmp_in_range() 27 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in icmp_in_range() 48 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmp_unique_tuple() 70 hdr->un.echo.id, tuple->src.u.icmp.id, false); in icmp_manip_pkt() 71 hdr->un.echo.id = tuple->src.u.icmp.id; in icmp_manip_pkt()
|
/net/core/ |
D | flow_dissector.c | 543 return flow->addrs.v4addrs.src; in flow_get_u32_src() 546 &flow->addrs.v6addrs.src); in flow_get_u32_src() 576 (__force u32)keys->addrs.v4addrs.src; in __flow_hash_consistentify() 580 (__force u16)keys->ports.src))) { in __flow_hash_consistentify() 581 swap(keys->addrs.v4addrs.src, keys->addrs.v4addrs.dst); in __flow_hash_consistentify() 582 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify() 587 &keys->addrs.v6addrs.src, in __flow_hash_consistentify() 592 (__force u16)keys->ports.src))) { in __flow_hash_consistentify() 594 swap(keys->addrs.v6addrs.src.s6_addr32[i], in __flow_hash_consistentify() 596 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify() [all …]
|
/net/ipv6/netfilter/ |
D | nf_conntrack_l3proto_ipv6.c | 48 memcpy(tuple->src.u3.ip6, ap, sizeof(tuple->src.u3.ip6)); in ipv6_pkt_to_tuple() 57 memcpy(tuple->src.u3.ip6, orig->dst.u3.ip6, sizeof(tuple->src.u3.ip6)); in ipv6_invert_tuple() 58 memcpy(tuple->dst.u3.ip6, orig->src.u3.ip6, sizeof(tuple->dst.u3.ip6)); in ipv6_invert_tuple() 67 tuple->src.u3.ip6, tuple->dst.u3.ip6); in ipv6_print_tuple() 229 struct nf_conntrack_tuple tuple = { .src.l3num = NFPROTO_IPV6 }; in ipv6_getorigdst() 239 tuple.src.u3.in6 = sk->sk_v6_rcv_saddr; in ipv6_getorigdst() 240 tuple.src.u.tcp.port = inet->inet_sport; in ipv6_getorigdst() 258 &tuple.src.u3.ip6, ntohs(tuple.src.u.tcp.port), in ipv6_getorigdst() 285 if (nla_put_in6_addr(skb, CTA_IP_V6_SRC, &tuple->src.u3.in6) || in ipv6_tuple_to_nlattr() 305 t->src.u3.in6 = nla_get_in6_addr(tb[CTA_IP_V6_SRC]); in ipv6_nlattr_to_tuple()
|
D | nf_nat_proto_icmpv6.c | 28 return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) && in icmpv6_in_range() 29 ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id); in icmpv6_in_range() 50 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmpv6_unique_tuple() 76 tuple->src.u.icmp.id, false); in icmpv6_manip_pkt() 77 hdr->icmp6_identifier = tuple->src.u.icmp.id; in icmpv6_manip_pkt()
|
/net/rds/ |
D | tcp_connect.c | 79 struct sockaddr_in src, dest; in rds_tcp_conn_connect() local 89 src.sin_family = AF_INET; in rds_tcp_conn_connect() 90 src.sin_addr.s_addr = (__force u32)conn->c_laddr; in rds_tcp_conn_connect() 91 src.sin_port = (__force u16)htons(0); in rds_tcp_conn_connect() 93 ret = sock->ops->bind(sock, (struct sockaddr *)&src, sizeof(src)); in rds_tcp_conn_connect()
|