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()
1263 static int pfkey_reserved(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_reserved()
1268 static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_getspi()
1274 struct sadb_msg *out_hdr; in pfkey_getspi()
1357 out_hdr = (struct sadb_msg *) resp_skb->data; in pfkey_getspi()
1373 static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_acquire()
1378 if (hdr->sadb_msg_len != sizeof(struct sadb_msg)/8) in pfkey_acquire()
1439 struct sadb_msg *hdr; in key_notify_sa()
1446 hdr = (struct sadb_msg *) skb->data; in key_notify_sa()
1460 static int pfkey_add(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_add()
1497 static int pfkey_delete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_delete()
1537 static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const… in pfkey_get()
1542 struct sadb_msg *out_hdr; in pfkey_get()
1560 out_hdr = (struct sadb_msg *) out_skb->data; in pfkey_get()
1573 static struct sk_buff *compose_sadb_supported(const struct sadb_msg *orig, in compose_sadb_supported()
1577 struct sadb_msg *hdr; in compose_sadb_supported()
1592 len = enc_len + auth_len + sizeof(struct sadb_msg); in compose_sadb_supported()
1598 hdr = (struct sadb_msg *) skb_put(skb, sizeof(*hdr)); in compose_sadb_supported()
1649 static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_register()
1678 static int unicast_flush_resp(struct sock *sk, const struct sadb_msg *ihdr) in unicast_flush_resp()
1681 struct sadb_msg *hdr; in unicast_flush_resp()
1683 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in unicast_flush_resp()
1687 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in unicast_flush_resp()
1688 memcpy(hdr, ihdr, sizeof(struct sadb_msg)); in unicast_flush_resp()
1690 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in unicast_flush_resp()
1698 struct sadb_msg *hdr; in key_notify_sa_flush()
1700 skb = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_sa_flush()
1703 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in key_notify_sa_flush()
1710 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_sa_flush()
1718 static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * con… in pfkey_flush()
1751 struct sadb_msg *out_hdr; in dump_sa()
1760 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sa()
1790 static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * cons… in pfkey_dump()
1828 static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_promisc()
1846 struct sadb_msg *new_hdr = (struct sadb_msg *) skb->data; in pfkey_promisc()
1981 return sizeof(struct sadb_msg) + in pfkey_xfrm_policy2msg_size()
2007 struct sadb_msg *hdr; in pfkey_xfrm_policy2msg()
2021 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_xfrm_policy2msg()
2163 struct sadb_msg *out_hdr; in key_notify_policy()
2174 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_policy()
2189 static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdadd()
2304 static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void *… in pfkey_spddelete()
2381 static int key_pol_get_resp(struct sock *sk, struct xfrm_policy *xp, const struct sadb_msg *hdr, in… in key_pol_get_resp()
2385 struct sadb_msg *out_hdr; in key_pol_get_resp()
2397 out_hdr = (struct sadb_msg *) out_skb->data; in key_pol_get_resp()
2489 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2581 const struct sadb_msg *hdr, void * const *ext_hdrs) in pfkey_migrate()
2588 static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * co… in pfkey_spdget()
2635 struct sadb_msg *out_hdr; in dump_sp()
2649 out_hdr = (struct sadb_msg *) out_skb->data; in dump_sp()
2678 static int pfkey_spddump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * c… in pfkey_spddump()
2697 struct sadb_msg *hdr; in key_notify_policy_flush()
2699 skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC); in key_notify_policy_flush()
2702 hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); in key_notify_policy_flush()
2709 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); in key_notify_policy_flush()
2716 static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * … in pfkey_spdflush()
2741 const struct sadb_msg *hdr, void * const *ext_hdrs);
2768 static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr) in pfkey_process()
2786 static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp) in pfkey_get_base_msg()
2788 struct sadb_msg *hdr = NULL; in pfkey_get_base_msg()
2793 hdr = (struct sadb_msg *) skb->data; in pfkey_get_base_msg()
2802 hdr->sadb_msg_len < (sizeof(struct sadb_msg) / in pfkey_get_base_msg()
2972 struct sadb_msg *out_hdr; in key_notify_sa_expire()
2986 out_hdr = (struct sadb_msg *) out_skb->data; in key_notify_sa_expire()
3082 struct sadb_msg *hdr; in pfkey_send_acquire()
3095 size = sizeof(struct sadb_msg) + in pfkey_send_acquire()
3114 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_acquire()
3279 struct sadb_msg *hdr; in pfkey_send_new_mapping()
3306 size = sizeof(struct sadb_msg) + in pfkey_send_new_mapping()
3316 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_new_mapping()
3483 struct sadb_msg *hdr; in pfkey_send_migrate()
3518 size += sizeof(struct sadb_msg) + size_pol; in pfkey_send_migrate()
3525 hdr = (struct sadb_msg *)skb_put(skb, sizeof(struct sadb_msg)); in pfkey_send_migrate()
3596 struct sadb_msg *hdr = NULL; in pfkey_sendmsg()