Lines Matching refs:sadb_msg
272 struct sadb_msg *hdr; in pfkey_do_dump()
293 hdr = (struct sadb_msg *) pfk->dump.skb->data; in pfkey_do_dump()
308 static inline void pfkey_hdr_dup(struct sadb_msg *new, in pfkey_hdr_dup()
309 const struct sadb_msg *orig) in pfkey_hdr_dup()
314 static int pfkey_error(const struct sadb_msg *orig, int err, struct sock *sk) in pfkey_error()
316 struct sk_buff *skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_KERNEL); in pfkey_error()
317 struct sadb_msg *hdr; in pfkey_error()
334 hdr = skb_put(skb, sizeof(struct sadb_msg)); in pfkey_error()
337 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / in pfkey_error()
507 static int parse_exthdrs(struct sk_buff *skb, const struct sadb_msg *hdr, void **ext_hdrs) in parse_exthdrs()
652 static struct xfrm_state *pfkey_xfrm_state_lookup(struct net *net, const struct sadb_msg *hdr, voi… in pfkey_xfrm_state_lookup()
764 struct sadb_msg *hdr; in __pfkey_xfrm_state2msg()
787 size = sizeof(struct sadb_msg) +sizeof(struct sadb_sa) + in __pfkey_xfrm_state2msg()
830 hdr = skb_put(skb, sizeof(struct sadb_msg)); in __pfkey_xfrm_state2msg()
1060 const struct sadb_msg *hdr, in pfkey_msg2xfrm_state()
1299 static int pfkey_reserved(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_reserved()
1304 static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_getspi()
1310 struct sadb_msg *out_hdr; in pfkey_getspi()
1393 out_hdr = (struct sadb_msg *) resp_skb->data; in pfkey_getspi()
1409 static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_acquire()
1414 if (hdr->sadb_msg_len != sizeof(struct sadb_msg)/8) in pfkey_acquire()
1475 struct sadb_msg *hdr; in key_notify_sa()
1482 hdr = (struct sadb_msg *) skb->data; in key_notify_sa()
1496 static int pfkey_add(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_add()
1533 static int pfkey_delete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_delete()
1573 static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_get()
1578 struct sadb_msg *out_hdr; in pfkey_get()
1596 out_hdr = (struct sadb_msg *) out_skb->data; in pfkey_get()
1609 static struct sk_buff *compose_sadb_supported(const struct sadb_msg *orig, in compose_sadb_supported()
1613 struct sadb_msg *hdr; in compose_sadb_supported()
1628 len = enc_len + auth_len + sizeof(struct sadb_msg); in compose_sadb_supported()
1685 static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_register()
1717 static int unicast_flush_resp(struct sock *sk, const struct sadb_msg *ihdr) in unicast_flush_resp()
1720 struct sadb_msg *hdr; in unicast_flush_resp()
1722 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in unicast_flush_resp()
1726 hdr = skb_put_data(skb, ihdr, sizeof(struct sadb_msg)); in unicast_flush_resp()
1728 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in unicast_flush_resp()
1737 struct sadb_msg *hdr; in key_notify_sa_flush()
1739 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_sa_flush()
1742 hdr = skb_put(skb, sizeof(struct sadb_msg)); in key_notify_sa_flush()
1749 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_sa_flush()
1757 static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * con… in pfkey_flush()
1790 struct sadb_msg *out_hdr; in dump_sa()
1799 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sa()
1829 static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * cons… in pfkey_dump()
1882 static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_promisc()
1900 struct sadb_msg *new_hdr = (struct sadb_msg *) skb->data; in pfkey_promisc()
2040 return sizeof(struct sadb_msg) + in pfkey_xfrm_policy2msg_size()
2066 struct sadb_msg *hdr; in pfkey_xfrm_policy2msg()
2080 hdr = skb_put(skb, sizeof(struct sadb_msg)); in pfkey_xfrm_policy2msg()
2217 struct sadb_msg *out_hdr; in key_notify_policy()
2230 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_policy()
2245 static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdadd()
2360 static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void *… in pfkey_spddelete()
2435 static int key_pol_get_resp(struct sock *sk, struct xfrm_policy *xp, const struct sadb_msg *hdr, in… in key_pol_get_resp()
2439 struct sadb_msg *out_hdr; in key_pol_get_resp()
2453 out_hdr = (struct sadb_msg *) out_skb->data; in key_pol_get_resp()
2547 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2639 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2646 static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdget()
2691 struct sadb_msg *out_hdr; in dump_sp()
2707 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sp()
2736 static int pfkey_spddump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_spddump()
2759 struct sadb_msg *hdr; in key_notify_policy_flush()
2761 skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_policy_flush()
2764 hdr = skb_put(skb_out, sizeof(struct sadb_msg)); in key_notify_policy_flush()
2771 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_policy_flush()
2778 static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_spdflush()
2803 const struct sadb_msg *hdr, void * const *ext_hdrs);
2830 static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr) in pfkey_process()
2852 static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp) in pfkey_get_base_msg()
2854 struct sadb_msg *hdr = NULL; in pfkey_get_base_msg()
2859 hdr = (struct sadb_msg *) skb->data; in pfkey_get_base_msg()
2868 hdr->sadb_msg_len < (sizeof(struct sadb_msg) / in pfkey_get_base_msg()
3045 struct sadb_msg *out_hdr; in key_notify_sa_expire()
3059 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_sa_expire()
3156 struct sadb_msg *hdr; in pfkey_send_acquire()
3170 size = sizeof(struct sadb_msg) + in pfkey_send_acquire()
3189 hdr = skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_acquire()
3356 struct sadb_msg *hdr; in pfkey_send_new_mapping()
3383 size = sizeof(struct sadb_msg) + in pfkey_send_new_mapping()
3393 hdr = skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_new_mapping()
3558 struct sadb_msg *hdr; in pfkey_send_migrate()
3593 size += sizeof(struct sadb_msg) + size_pol; in pfkey_send_migrate()
3600 hdr = skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_migrate()
3672 struct sadb_msg *hdr = NULL; in pfkey_sendmsg()