Lines Matching refs:sadb_msg
281 struct sadb_msg *hdr; in pfkey_do_dump()
292 hdr = (struct sadb_msg *) pfk->dump.skb->data; in pfkey_do_dump()
304 static inline void pfkey_hdr_dup(struct sadb_msg *new, in pfkey_hdr_dup()
305 const struct sadb_msg *orig) in pfkey_hdr_dup()
310 static int pfkey_error(const struct sadb_msg *orig, int err, struct sock *sk) in pfkey_error()
312 struct sk_buff *skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_KERNEL); in pfkey_error()
313 struct sadb_msg *hdr; in pfkey_error()
330 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_error()
333 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / in pfkey_error()
480 static int parse_exthdrs(struct sk_buff *skb, const struct sadb_msg *hdr, void **ext_hdrs) in parse_exthdrs()
613 static struct xfrm_state *pfkey_xfrm_state_lookup(struct net *net, const struct sadb_msg *hdr, voi… in pfkey_xfrm_state_lookup()
725 struct sadb_msg *hdr; in __pfkey_xfrm_state2msg()
748 size = sizeof(struct sadb_msg) +sizeof(struct sadb_sa) + in __pfkey_xfrm_state2msg()
791 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in __pfkey_xfrm_state2msg()
1030 const struct sadb_msg *hdr, in pfkey_msg2xfrm_state()
1262 static int pfkey_reserved(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_reserved()
1267 static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_getspi()
1273 struct sadb_msg *out_hdr; in pfkey_getspi()
1356 out_hdr = (struct sadb_msg *) resp_skb->data; in pfkey_getspi()
1372 static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_acquire()
1377 if (hdr->sadb_msg_len != sizeof(struct sadb_msg)/8) in pfkey_acquire()
1438 struct sadb_msg *hdr; in key_notify_sa()
1445 hdr = (struct sadb_msg *) skb->data; in key_notify_sa()
1459 static int pfkey_add(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_add()
1496 static int pfkey_delete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_delete()
1536 static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_get()
1541 struct sadb_msg *out_hdr; in pfkey_get()
1559 out_hdr = (struct sadb_msg *) out_skb->data; in pfkey_get()
1572 static struct sk_buff *compose_sadb_supported(const struct sadb_msg *orig, in compose_sadb_supported()
1576 struct sadb_msg *hdr; in compose_sadb_supported()
1591 len = enc_len + auth_len + sizeof(struct sadb_msg); in compose_sadb_supported()
1597 hdr = (struct sadb_msg *) skb_put(skb, sizeof(*hdr)); in compose_sadb_supported()
1648 static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_register()
1677 static int unicast_flush_resp(struct sock *sk, const struct sadb_msg *ihdr) in unicast_flush_resp()
1680 struct sadb_msg *hdr; in unicast_flush_resp()
1682 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in unicast_flush_resp()
1686 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in unicast_flush_resp()
1687 memcpy(hdr, ihdr, sizeof(struct sadb_msg)); in unicast_flush_resp()
1689 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in unicast_flush_resp()
1697 struct sadb_msg *hdr; in key_notify_sa_flush()
1699 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_sa_flush()
1702 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in key_notify_sa_flush()
1709 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_sa_flush()
1717 static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * con… in pfkey_flush()
1750 struct sadb_msg *out_hdr; in dump_sa()
1759 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sa()
1789 static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * cons… in pfkey_dump()
1827 static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_promisc()
1845 struct sadb_msg *new_hdr = (struct sadb_msg *) skb->data; in pfkey_promisc()
1980 return sizeof(struct sadb_msg) + in pfkey_xfrm_policy2msg_size()
2006 struct sadb_msg *hdr; in pfkey_xfrm_policy2msg()
2020 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_xfrm_policy2msg()
2162 struct sadb_msg *out_hdr; in key_notify_policy()
2173 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_policy()
2188 static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdadd()
2303 static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void *… in pfkey_spddelete()
2380 static int key_pol_get_resp(struct sock *sk, struct xfrm_policy *xp, const struct sadb_msg *hdr, in… in key_pol_get_resp()
2384 struct sadb_msg *out_hdr; in key_pol_get_resp()
2396 out_hdr = (struct sadb_msg *) out_skb->data; in key_pol_get_resp()
2488 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2580 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2587 static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdget()
2634 struct sadb_msg *out_hdr; in dump_sp()
2648 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sp()
2677 static int pfkey_spddump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_spddump()
2696 struct sadb_msg *hdr; in key_notify_policy_flush()
2698 skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_policy_flush()
2701 hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); in key_notify_policy_flush()
2708 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_policy_flush()
2715 static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_spdflush()
2740 const struct sadb_msg *hdr, void * const *ext_hdrs);
2767 static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr) in pfkey_process()
2785 static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp) in pfkey_get_base_msg()
2787 struct sadb_msg *hdr = NULL; in pfkey_get_base_msg()
2792 hdr = (struct sadb_msg *) skb->data; in pfkey_get_base_msg()
2801 hdr->sadb_msg_len < (sizeof(struct sadb_msg) / in pfkey_get_base_msg()
2971 struct sadb_msg *out_hdr; in key_notify_sa_expire()
2985 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_sa_expire()
3081 struct sadb_msg *hdr; in pfkey_send_acquire()
3094 size = sizeof(struct sadb_msg) + in pfkey_send_acquire()
3113 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_acquire()
3278 struct sadb_msg *hdr; in pfkey_send_new_mapping()
3305 size = sizeof(struct sadb_msg) + in pfkey_send_new_mapping()
3315 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_new_mapping()
3482 struct sadb_msg *hdr; in pfkey_send_migrate()
3517 size += sizeof(struct sadb_msg) + size_pol; in pfkey_send_migrate()
3524 hdr = (struct sadb_msg *)skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_migrate()
3595 struct sadb_msg *hdr = NULL; in pfkey_sendmsg()