/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 …]
|
/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 | 89 (((tuple->dst.protonum ^ tuple->src.l3num) << 16) | in nf_ct_expect_dst_hash() 232 intersect_mask.src.u.all = a->mask.src.u.all & b->mask.src.u.all; in expect_clash() 235 intersect_mask.src.u3.all[count] = in expect_clash() 236 a->mask.src.u3.all[count] & b->mask.src.u3.all[count]; in expect_clash() 287 u_int8_t proto, const __be16 *src, const __be16 *dst) in nf_ct_expect_init() argument 300 exp->tuple.src.l3num = family; in nf_ct_expect_init() 304 memcpy(&exp->tuple.src.u3, saddr, len); in nf_ct_expect_init() 305 if (sizeof(exp->tuple.src.u3) > len) in nf_ct_expect_init() 307 memset((void *)&exp->tuple.src.u3 + len, 0x00, in nf_ct_expect_init() 308 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_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()
|
D | xt_nat.c | 30 const struct nf_nat_ipv4_range *src) in xt_nat_convert_range() argument 35 dst->flags = src->flags; in xt_nat_convert_range() 36 dst->min_addr.ip = src->min_ip; in xt_nat_convert_range() 37 dst->max_addr.ip = src->max_ip; in xt_nat_convert_range() 38 dst->min_proto = src->min; in xt_nat_convert_range() 39 dst->max_proto = src->max; in xt_nat_convert_range()
|
D | nf_conntrack_l3proto_generic.c | 37 memset(&tuple->src.u3, 0, sizeof(tuple->src.u3)); in generic_pkt_to_tuple() 46 memset(&tuple->src.u3, 0, sizeof(tuple->src.u3)); in generic_invert_tuple()
|
/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/sched/ |
D | cls_flower.c | 154 skb_key.enc_ipv4.src = key->u.ipv4.src; in fl_classify() 160 skb_key.enc_ipv6.src = key->u.ipv6.src; in fl_classify() 418 fl_set_key_val(tb, key->eth.src, TCA_FLOWER_KEY_ETH_SRC, in fl_set_key() 419 mask->eth.src, TCA_FLOWER_KEY_ETH_SRC_MASK, in fl_set_key() 420 sizeof(key->eth.src)); in fl_set_key() 446 fl_set_key_val(tb, &key->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC, in fl_set_key() 447 &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK, in fl_set_key() 448 sizeof(key->ipv4.src)); in fl_set_key() 454 fl_set_key_val(tb, &key->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC, in fl_set_key() 455 &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK, 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), \ 120 new_tuple.src.u3 = cp->daddr; in ip_vs_update_conntrack() 123 new_tuple.src.u.tcp.port = cp->dport; in ip_vs_update_conntrack() 155 if (exp->tuple.src.l3num != PF_INET) in ip_vs_nfct_expect_callback() 168 ip_vs_conn_fill_param(net_ipvs(net), exp->tuple.src.l3num, orig->dst.protonum, in ip_vs_nfct_expect_callback() 169 &orig->src.u3, orig->src.u.tcp.port, in ip_vs_nfct_expect_callback() 200 new_reply.src.u3 = cp->daddr; in ip_vs_nfct_expect_callback() 201 new_reply.src.u.tcp.port = cp->dport; in ip_vs_nfct_expect_callback() 271 tuple.src.u3 = cp->caddr; in ip_vs_conn_drop_conntrack() 272 tuple.src.u.all = cp->cport; in ip_vs_conn_drop_conntrack() [all …]
|
/net/ipv6/ |
D | fib6_rules.c | 27 struct rt6key src; member 98 r->src.plen && !(flags & RT6_LOOKUP_F_HAS_SADDR)) { in fib6_rule_action() 107 if (!ipv6_prefix_equal(&saddr, &r->src.addr, in fib6_rule_action() 108 r->src.plen)) in fib6_rule_action() 170 if (r->src.plen) { in fib6_rule_match() 172 if (!ipv6_prefix_equal(&fl6->saddr, &r->src.addr, in fib6_rule_match() 173 r->src.plen)) in fib6_rule_match() 208 rule6->src.addr = nla_get_in6_addr(tb[FRA_SRC]); in fib6_rule_configure() 213 rule6->src.plen = frh->src_len; in fib6_rule_configure() 227 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/ipv4/ |
D | ip_tunnel_core.c | 60 __be32 src, __be32 dst, __u8 proto, in iptunnel_xmit() argument 87 iph->saddr = src; in iptunnel_xmit() 135 struct ip_tunnel_info *dst, *src; in iptunnel_metadata_reply() local 145 src = &md->u.tun_info; in iptunnel_metadata_reply() 146 dst->key.tun_id = src->key.tun_id; in iptunnel_metadata_reply() 147 if (src->mode & IP_TUNNEL_INFO_IPV6) in iptunnel_metadata_reply() 148 memcpy(&dst->key.u.ipv6.dst, &src->key.u.ipv6.src, in iptunnel_metadata_reply() 151 dst->key.u.ipv4.dst = src->key.u.ipv4.src; in iptunnel_metadata_reply() 152 dst->mode = src->mode | IP_TUNNEL_INFO_TX; in iptunnel_metadata_reply() 259 tun_info->key.u.ipv4.src = nla_get_in_addr(tb[LWTUNNEL_IP_SRC]); in ip_tun_build_state() [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() 205 expect_orig->tuple.src.u.gre.key = nat_pptp_info->pns_call_id; in pptp_exp_gre() 211 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()
|
D | nf_conntrack_l3proto_ipv4.c | 44 tuple->src.u3.ip = ap[0]; in ipv4_pkt_to_tuple() 53 tuple->src.u3.ip = orig->dst.u3.ip; in ipv4_invert_tuple() 54 tuple->dst.u3.ip = orig->src.u3.ip; in ipv4_invert_tuple() 63 &tuple->src.u3.ip, &tuple->dst.u3.ip); in ipv4_print_tuple() 223 tuple.src.u3.ip = inet->inet_rcv_saddr; in getorigdst() 224 tuple.src.u.tcp.port = inet->inet_sport; in getorigdst() 227 tuple.src.l3num = PF_INET; in getorigdst() 265 &tuple.src.u3.ip, ntohs(tuple.src.u.tcp.port), in getorigdst() 278 if (nla_put_in_addr(skb, CTA_IP_V4_SRC, tuple->src.u3.ip) || in ipv4_tuple_to_nlattr() 298 t->src.u3.ip = nla_get_in_addr(tb[CTA_IP_V4_SRC]); in ipv4_nlattr_to_tuple()
|
/net/tipc/ |
D | udp_media.c | 158 struct udp_bearer *ub, struct udp_media_addr *src, in tipc_udp_xmit() argument 167 .saddr = src->ipv4.s_addr, in tipc_udp_xmit() 179 udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr, in tipc_udp_xmit() 180 dst->ipv4.s_addr, 0, ttl, 0, src->port, in tipc_udp_xmit() 188 .saddr = src->ipv6, in tipc_udp_xmit() 197 ndst->dev, &src->ipv6, in tipc_udp_xmit() 198 &dst->ipv6, 0, ttl, 0, src->port, in tipc_udp_xmit() 213 struct udp_media_addr *src = (struct udp_media_addr *)&b->addr.value; in tipc_udp_send_msg() local 233 return tipc_udp_xmit(net, skb, ub, src, dst); in tipc_udp_send_msg() 245 err = tipc_udp_xmit(net, _skb, ub, src, &rcast->addr); in tipc_udp_send_msg() [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/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/core/ |
D | flow_dissector.c | 611 return flow->addrs.v4addrs.src; in flow_get_u32_src() 614 &flow->addrs.v6addrs.src); in flow_get_u32_src() 644 (__force u32)keys->addrs.v4addrs.src; in __flow_hash_consistentify() 648 (__force u16)keys->ports.src))) { in __flow_hash_consistentify() 649 swap(keys->addrs.v4addrs.src, keys->addrs.v4addrs.dst); in __flow_hash_consistentify() 650 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify() 655 &keys->addrs.v6addrs.src, in __flow_hash_consistentify() 660 (__force u16)keys->ports.src))) { in __flow_hash_consistentify() 662 swap(keys->addrs.v6addrs.src.s6_addr32[i], in __flow_hash_consistentify() 664 swap(keys->ports.src, keys->ports.dst); in __flow_hash_consistentify() [all …]
|
/net/rds/ |
D | tcp_connect.c | 79 struct sockaddr_in src, dest; in rds_tcp_conn_path_connect() local 103 src.sin_family = AF_INET; in rds_tcp_conn_path_connect() 104 src.sin_addr.s_addr = (__force u32)conn->c_laddr; in rds_tcp_conn_path_connect() 105 src.sin_port = (__force u16)htons(0); in rds_tcp_conn_path_connect() 107 ret = sock->ops->bind(sock, (struct sockaddr *)&src, sizeof(src)); in rds_tcp_conn_path_connect()
|