Lines Matching refs:src
228 static int xfrm_nla_cpy(struct sk_buff *dst, const struct nlattr *src, int len)
230 return nla_put(dst, src->nla_type, len, nla_data(src));
233 static int xfrm_xlate64_attr(struct sk_buff *dst, const struct nlattr *src)
235 switch (src->nla_type) {
245 return xfrm_nla_cpy(dst, src, nla_len(src));
247 return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_usersa_info));
249 return xfrm_nla_cpy(dst, src, XMSGSIZE(compat_xfrm_userpolicy_info));
251 return xfrm_nla_cpy(dst, src, nla_len(src));
253 return nla_put_64bit(dst, src->nla_type, nla_len(src),
254 nla_data(src), XFRMA_PAD);
260 return xfrm_nla_cpy(dst, src, nla_len(src));
262 return nla_put_64bit(dst, src->nla_type, nla_len(src),
263 nla_data(src), XFRMA_PAD);
280 return xfrm_nla_cpy(dst, src, nla_len(src));
283 pr_warn_once("unsupported nla_type %d\n", src->nla_type);
354 static size_t xfrm_user_rcv_calculate_len64(const struct nlmsghdr *src,
358 size_t len = nlmsg_len(src);
360 switch (src->nlmsg_type) {
399 static int xfrm_attr_cpy32(void *dst, size_t *pos, const struct nlattr *src,
417 memcpy(nla, src, nla_attr_size(copy_len));
464 static int xfrm_xlate32(struct nlmsghdr *dst, const struct nlmsghdr *src,
472 memcpy(dst, src, NLMSG_HDRLEN);
476 switch (src->nlmsg_type) {
493 memcpy(nlmsg_data(dst), nlmsg_data(src), compat_msg_min[type]);
500 memcpy(nlmsg_data(dst), nlmsg_data(src), compat_msg_min[type]);
503 const struct compat_xfrm_user_expire *src_ue = nlmsg_data(src);
512 const struct compat_xfrm_user_acquire *src_ua = nlmsg_data(src);
523 const struct compat_xfrm_user_polexpire *src_upe = nlmsg_data(src);
532 const struct compat_xfrm_userspi_info *src_usi = nlmsg_data(src);
549 WARN_ON_ONCE(src->nlmsg_type != XFRM_MSG_NEWSPDINFO);