/net/xfrm/ |
D | xfrm_state.c | 71 struct xfrm_state *x; in xfrm_hash_transfer() local 73 hlist_for_each_entry_safe(x, tmp, list, bydst) { in xfrm_hash_transfer() 76 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer() 77 x->props.reqid, x->props.family, in xfrm_hash_transfer() 79 hlist_add_head(&x->bydst, ndsttable+h); in xfrm_hash_transfer() 81 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer() 82 x->props.family, in xfrm_hash_transfer() 84 hlist_add_head(&x->bysrc, nsrctable+h); in xfrm_hash_transfer() 86 if (x->id.spi) { in xfrm_hash_transfer() 87 h = __xfrm_spi_hash(&x->id.daddr, x->id.spi, in xfrm_hash_transfer() [all …]
|
D | xfrm_replay.c | 24 u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq) in xfrm_replay_seqhi() argument 27 struct xfrm_replay_state_esn *replay_esn = x->replay_esn; in xfrm_replay_seqhi() 29 if (!(x->props.flags & XFRM_STATE_ESN)) in xfrm_replay_seqhi() 49 static void xfrm_replay_notify(struct xfrm_state *x, int event) in xfrm_replay_notify() argument 64 if (!x->replay_maxdiff || in xfrm_replay_notify() 65 ((x->replay.seq - x->preplay.seq < x->replay_maxdiff) && in xfrm_replay_notify() 66 (x->replay.oseq - x->preplay.oseq < x->replay_maxdiff))) { in xfrm_replay_notify() 67 if (x->xflags & XFRM_TIME_DEFER) in xfrm_replay_notify() 76 if (memcmp(&x->replay, &x->preplay, in xfrm_replay_notify() 78 x->xflags |= XFRM_TIME_DEFER; in xfrm_replay_notify() [all …]
|
D | xfrm_input.c | 162 int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb) in xfrm_prepare_input() argument 164 struct xfrm_mode *inner_mode = x->inner_mode; in xfrm_prepare_input() 167 err = x->outer_mode->afinfo->extract_input(x, skb); in xfrm_prepare_input() 171 if (x->sel.family == AF_UNSPEC) { in xfrm_prepare_input() 172 inner_mode = xfrm_ip2inner_mode(x, XFRM_MODE_SKB_CB(skb)->protocol); in xfrm_prepare_input() 178 return inner_mode->input2(x, skb); in xfrm_prepare_input() 188 struct xfrm_state *x = NULL; in xfrm_input() local 199 x = xfrm_input_state(skb); in xfrm_input() 201 family = x->outer_mode->afinfo->family; in xfrm_input() 247 x = xfrm_state_lookup(net, mark, daddr, spi, nexthdr, family); in xfrm_input() [all …]
|
D | xfrm_user.c | 446 static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *p) in copy_from_user_state() argument 448 memcpy(&x->id, &p->id, sizeof(x->id)); in copy_from_user_state() 449 memcpy(&x->sel, &p->sel, sizeof(x->sel)); in copy_from_user_state() 450 memcpy(&x->lft, &p->lft, sizeof(x->lft)); in copy_from_user_state() 451 x->props.mode = p->mode; in copy_from_user_state() 452 x->props.replay_window = min_t(unsigned int, p->replay_window, in copy_from_user_state() 453 sizeof(x->replay.bitmap) * 8); in copy_from_user_state() 454 x->props.reqid = p->reqid; in copy_from_user_state() 455 x->props.family = p->family; in copy_from_user_state() 456 memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); in copy_from_user_state() [all …]
|
D | xfrm_output.c | 44 struct xfrm_state *x = dst->xfrm; in xfrm_output_one() local 45 struct net *net = xs_net(x); in xfrm_output_one() 57 if (x->props.output_mark) in xfrm_output_one() 58 skb->mark = x->props.output_mark; in xfrm_output_one() 60 err = x->outer_mode->output(x, skb); in xfrm_output_one() 66 spin_lock_bh(&x->lock); in xfrm_output_one() 68 if (unlikely(x->km.state != XFRM_STATE_VALID)) { in xfrm_output_one() 74 err = xfrm_state_check_expire(x); in xfrm_output_one() 80 err = x->repl->overflow(x, skb); in xfrm_output_one() 86 x->curlft.bytes += skb->len; in xfrm_output_one() [all …]
|
D | xfrm_ipcomp.c | 42 static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_decompress() argument 44 struct ipcomp_data *ipcd = x->data; in ipcomp_decompress() 110 int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_input() argument 127 err = ipcomp_decompress(x, skb); in ipcomp_input() 138 static int ipcomp_compress(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_compress() argument 140 struct ipcomp_data *ipcd = x->data; in ipcomp_compress() 171 int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_output() argument 175 struct ipcomp_data *ipcd = x->data; in ipcomp_output() 185 err = ipcomp_compress(x, skb); in ipcomp_output() 195 ipch->cpi = htons((u16 )ntohl(x->id.spi)); in ipcomp_output() [all …]
|
/net/ipv4/ |
D | esp4.c | 28 static u32 esp4_get_mtu(struct xfrm_state *x, int mtu); 116 static int esp_output(struct xfrm_state *x, struct sk_buff *skb) in esp_output() argument 141 aead = x->data; in esp_output() 145 if (x->tfcpad) { in esp_output() 149 padto = min(x->tfcpad, esp4_get_mtu(x, dst->child_mtu_cached)); in esp_output() 166 if (x->props.flags & XFRM_STATE_ESN) { in esp_output() 204 if (x->encap) { in esp_output() 205 struct xfrm_encap_tmpl *encap = x->encap; in esp_output() 211 spin_lock_bh(&x->lock); in esp_output() 215 spin_unlock_bh(&x->lock); in esp_output() [all …]
|
D | ipcomp.c | 32 struct xfrm_state *x; in ipcomp4_err() local 45 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ipcomp4_err() 47 if (!x) in ipcomp4_err() 54 xfrm_state_put(x); in ipcomp4_err() 60 static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) in ipcomp_tunnel_create() argument 62 struct net *net = xs_net(x); in ipcomp_tunnel_create() 70 t->id.spi = x->props.saddr.a4; in ipcomp_tunnel_create() 71 t->id.daddr.a4 = x->id.daddr.a4; in ipcomp_tunnel_create() 72 memcpy(&t->sel, &x->sel, sizeof(t->sel)); in ipcomp_tunnel_create() 74 t->props.mode = x->props.mode; in ipcomp_tunnel_create() [all …]
|
D | ah4.c | 123 struct xfrm_state *x = skb_dst(skb)->xfrm; in ah_output_done() local 124 struct ah_data *ahp = x->data; in ah_output_done() 145 static int ah_output(struct xfrm_state *x, struct sk_buff *skb) in ah_output() argument 163 ahp = x->data; in ah_output() 174 if (x->props.flags & XFRM_STATE_ESN) { in ah_output() 213 if (x->props.flags & XFRM_STATE_ALIGN4) in ah_output() 219 ah->spi = x->id.spi; in ah_output() 225 if (x->props.flags & XFRM_STATE_ESN) { in ah_output() 267 struct xfrm_state *x = xfrm_input_state(skb); in ah_input_done() local 268 struct ah_data *ahp = x->data; in ah_input_done() [all …]
|
D | xfrm4_state.c | 17 static int xfrm4_init_flags(struct xfrm_state *x) in xfrm4_init_flags() argument 19 if (xs_net(x)->ipv4.sysctl_ip_no_pmtu_disc) in xfrm4_init_flags() 20 x->props.flags |= XFRM_STATE_NOPMTUDISC; in xfrm4_init_flags() 43 xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, in xfrm4_init_temprop() argument 46 x->id = tmpl->id; in xfrm4_init_temprop() 47 if (x->id.daddr.a4 == 0) in xfrm4_init_temprop() 48 x->id.daddr.a4 = daddr->a4; in xfrm4_init_temprop() 49 x->props.saddr = tmpl->saddr; in xfrm4_init_temprop() 50 if (x->props.saddr.a4 == 0) in xfrm4_init_temprop() 51 x->props.saddr.a4 = saddr->a4; in xfrm4_init_temprop() [all …]
|
/net/ipv6/ |
D | esp6.c | 54 static u32 esp6_get_mtu(struct xfrm_state *x, int mtu); 144 static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) in esp6_output() argument 168 aead = x->data; in esp6_output() 172 if (x->tfcpad) { in esp6_output() 176 padto = min(x->tfcpad, esp6_get_mtu(x, dst->child_mtu_cached)); in esp6_output() 193 if (x->props.flags & XFRM_STATE_ESN) { in esp6_output() 230 esph->spi = x->id.spi; in esp6_output() 238 if ((x->props.flags & XFRM_STATE_ESN)) { in esp6_output() 269 struct xfrm_state *x = xfrm_input_state(skb); in esp_input_done2() local 270 struct crypto_aead *aead = x->data; in esp_input_done2() [all …]
|
D | ipcomp6.c | 64 struct xfrm_state *x; in ipcomp6_err() local 71 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ipcomp6_err() 73 if (!x) in ipcomp6_err() 81 xfrm_state_put(x); in ipcomp6_err() 86 static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x) in ipcomp6_tunnel_create() argument 88 struct net *net = xs_net(x); in ipcomp6_tunnel_create() 96 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_create() 100 memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr)); in ipcomp6_tunnel_create() 101 memcpy(&t->sel, &x->sel, sizeof(t->sel)); in ipcomp6_tunnel_create() 103 t->props.mode = x->props.mode; in ipcomp6_tunnel_create() [all …]
|
D | xfrm6_input.c | 19 int xfrm6_extract_input(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_extract_input() argument 61 struct xfrm_state *x = NULL; in xfrm6_input_addr() local 103 x = xfrm_state_lookup_byaddr(net, skb->mark, dst, src, proto, AF_INET6); in xfrm6_input_addr() 104 if (!x) in xfrm6_input_addr() 107 spin_lock(&x->lock); in xfrm6_input_addr() 109 if ((!i || (x->props.flags & XFRM_STATE_WILDRECV)) && in xfrm6_input_addr() 110 likely(x->km.state == XFRM_STATE_VALID) && in xfrm6_input_addr() 111 !xfrm_state_check_expire(x)) { in xfrm6_input_addr() 112 spin_unlock(&x->lock); in xfrm6_input_addr() 113 if (x->type->input(x, skb) > 0) { in xfrm6_input_addr() [all …]
|
D | mip6.c | 130 static int mip6_destopt_input(struct xfrm_state *x, struct sk_buff *skb) in mip6_destopt_input() argument 136 spin_lock(&x->lock); in mip6_destopt_input() 137 if (!ipv6_addr_equal(&iph->saddr, (struct in6_addr *)x->coaddr) && in mip6_destopt_input() 138 !ipv6_addr_any((struct in6_addr *)x->coaddr)) in mip6_destopt_input() 140 spin_unlock(&x->lock); in mip6_destopt_input() 149 static int mip6_destopt_output(struct xfrm_state *x, struct sk_buff *skb) in mip6_destopt_output() argument 176 spin_lock_bh(&x->lock); in mip6_destopt_output() 177 memcpy(&iph->saddr, x->coaddr, sizeof(iph->saddr)); in mip6_destopt_output() 178 spin_unlock_bh(&x->lock); in mip6_destopt_output() 180 WARN_ON(len != x->props.header_len); in mip6_destopt_output() [all …]
|
D | ah6.c | 304 struct xfrm_state *x = skb_dst(skb)->xfrm; in ah6_output_done() local 305 struct ah_data *ahp = x->data; in ah6_output_done() 333 static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) in ah6_output() argument 354 ahp = x->data; in ah6_output() 366 if (x->props.flags & XFRM_STATE_ESN) { in ah6_output() 422 ah->spi = x->id.spi; in ah6_output() 428 if (x->props.flags & XFRM_STATE_ESN) { in ah6_output() 471 struct xfrm_state *x = xfrm_input_state(skb); in ah6_input_done() local 472 struct ah_data *ahp = x->data; in ah6_input_done() 490 if (x->props.mode == XFRM_MODE_TUNNEL) in ah6_input_done() [all …]
|
D | xfrm6_state.c | 44 xfrm6_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, in xfrm6_init_temprop() argument 47 x->id = tmpl->id; in xfrm6_init_temprop() 48 if (ipv6_addr_any((struct in6_addr *)&x->id.daddr)) in xfrm6_init_temprop() 49 memcpy(&x->id.daddr, daddr, sizeof(x->sel.daddr)); in xfrm6_init_temprop() 50 memcpy(&x->props.saddr, &tmpl->saddr, sizeof(x->props.saddr)); in xfrm6_init_temprop() 51 if (ipv6_addr_any((struct in6_addr *)&x->props.saddr)) in xfrm6_init_temprop() 52 memcpy(&x->props.saddr, saddr, sizeof(x->props.saddr)); in xfrm6_init_temprop() 53 x->props.mode = tmpl->mode; in xfrm6_init_temprop() 54 x->props.reqid = tmpl->reqid; in xfrm6_init_temprop() 55 x->props.family = AF_INET6; in xfrm6_init_temprop()
|
/net/ceph/crush/ |
D | mapper.c | 15 # define BUG_ON(x) assert(!(x)) argument 17 # define kmalloc(x, f) malloc(x) argument 18 # define kfree(x) free(x) argument 70 int x, int r) in bucket_perm_choose() argument 76 if (bucket->perm_x != (__u32)x || bucket->perm_n == 0) { in bucket_perm_choose() 77 dprintk("bucket %d new x=%d\n", bucket->id, x); in bucket_perm_choose() 78 bucket->perm_x = x; in bucket_perm_choose() 82 s = crush_hash32_3(bucket->hash, x, bucket->id, 0) % in bucket_perm_choose() 107 i = crush_hash32_3(bucket->hash, x, bucket->id, p) % in bucket_perm_choose() 124 bucket->size, x, r, pr, s); in bucket_perm_choose() [all …]
|
/net/bridge/netfilter/ |
D | ebt_limit.c | 25 #define _POW2_BELOW2(x) ((x)|((x)>>1)) argument 26 #define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) argument 27 #define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) argument 28 #define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) argument 29 #define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) argument 30 #define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) argument
|
/net/netfilter/ |
D | xt_limit.c | 59 #define _POW2_BELOW2(x) ((x)|((x)>>1)) argument 60 #define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) argument 61 #define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) argument 62 #define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) argument 63 #define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) argument 64 #define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) argument
|
D | xt_policy.c | 38 match_xfrm_state(const struct xfrm_state *x, const struct xt_policy_elem *e, in match_xfrm_state() argument 41 #define MATCH_ADDR(x,y,z) (!e->match.x || \ in match_xfrm_state() argument 42 (xt_addr_cmp(&e->x, &e->y, (const union nf_inet_addr *)(z), family) \ in match_xfrm_state() 43 ^ e->invert.x)) in match_xfrm_state() 44 #define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x)) in match_xfrm_state() argument 46 return MATCH_ADDR(saddr, smask, &x->props.saddr) && in match_xfrm_state() 47 MATCH_ADDR(daddr, dmask, &x->id.daddr) && in match_xfrm_state() 48 MATCH(proto, x->id.proto) && in match_xfrm_state() 49 MATCH(mode, x->props.mode) && in match_xfrm_state() 50 MATCH(spi, x->id.spi) && in match_xfrm_state() [all …]
|
/net/key/ |
D | af_key.c | 36 #define _X2KEY(x) ((x) == XFRM_INF ? 0 : (x)) argument 37 #define _KEY2X(x) ((x) == 0 ? XFRM_INF : (x)) argument 751 static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x, in __pfkey_xfrm_state2msg() argument 772 sockaddr_size = pfkey_sockaddr_size(x->props.family); in __pfkey_xfrm_state2msg() 786 if ((xfrm_ctx = x->security)) { in __pfkey_xfrm_state2msg() 792 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr, x->props.family)) in __pfkey_xfrm_state2msg() 796 if (x->aalg && x->aalg->alg_key_len) { in __pfkey_xfrm_state2msg() 798 PFKEY_ALIGN8((x->aalg->alg_key_len + 7) / 8); in __pfkey_xfrm_state2msg() 801 if (x->ealg && x->ealg->alg_key_len) { in __pfkey_xfrm_state2msg() 803 PFKEY_ALIGN8((x->ealg->alg_key_len+7) / 8); in __pfkey_xfrm_state2msg() [all …]
|
/net/mac80211/ |
D | mesh_hwmp.c | 49 #define AE_F_SET(x) (*x & AE_F) argument 50 #define PREQ_IE_FLAGS(x) (*(x)) argument 51 #define PREQ_IE_HOPCOUNT(x) (*(x + 1)) argument 52 #define PREQ_IE_TTL(x) (*(x + 2)) argument 53 #define PREQ_IE_PREQ_ID(x) u32_field_get(x, 3, 0) argument 54 #define PREQ_IE_ORIG_ADDR(x) (x + 7) argument 55 #define PREQ_IE_ORIG_SN(x) u32_field_get(x, 13, 0) argument 56 #define PREQ_IE_LIFETIME(x) u32_field_get(x, 17, AE_F_SET(x)) argument 57 #define PREQ_IE_METRIC(x) u32_field_get(x, 21, AE_F_SET(x)) argument 58 #define PREQ_IE_TARGET_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26)) argument [all …]
|
/net/netfilter/ipset/ |
D | ip_set_bitmap_gen.h | 121 void *x = get_ext(set, map, e->id); in mtype_test() local 127 ip_set_timeout_expired(ext_timeout(x, set))) in mtype_test() 130 ip_set_update_counter(ext_counter(x, set), ext, mext, flags); in mtype_test() 132 ip_set_get_skbinfo(ext_skbinfo(x, set), ext, mext, flags); in mtype_test() 142 void *x = get_ext(set, map, e->id); in mtype_add() local 147 ip_set_timeout_expired(ext_timeout(x, set))) in mtype_add() 152 ip_set_ext_destroy(set, x); in mtype_add() 157 mtype_add_timeout(ext_timeout(x, set), e, ext, set, map, ret); in mtype_add() 159 ip_set_timeout_set(ext_timeout(x, set), ext->timeout); in mtype_add() 163 ip_set_init_counter(ext_counter(x, set), ext); in mtype_add() [all …]
|
/net/sched/ |
D | sch_sfq.c | 225 static inline void sfq_link(struct sfq_sched_data *q, sfq_index x) in sfq_link() argument 228 struct sfq_slot *slot = &q->slots[x]; in sfq_link() 237 q->dep[qlen].next = x; /* sfq_dep_head(q, p)->next = x */ in sfq_link() 238 sfq_dep_head(q, n)->prev = x; in sfq_link() 241 #define sfq_unlink(q, x, n, p) \ argument 243 n = q->slots[x].dep.next; \ 244 p = q->slots[x].dep.prev; \ 250 static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x) in sfq_dec() argument 255 sfq_unlink(q, x, n, p); in sfq_dec() 257 d = q->slots[x].qlen--; in sfq_dec() [all …]
|
/net/decnet/ |
D | sysctl_net_decnet.c | 62 #define ISNUM(x) (((x) >= '0') && ((x) <= '9')) argument 63 #define ISLOWER(x) (((x) >= 'a') && ((x) <= 'z')) argument 64 #define ISUPPER(x) (((x) >= 'A') && ((x) <= 'Z')) argument 65 #define ISALPHA(x) (ISLOWER(x) || ISUPPER(x)) argument 66 #define INVALID_END_CHAR(x) (ISNUM(x) || ISALPHA(x)) argument
|