Lines Matching refs:cmsgs
1586 struct sctp_cmsgs *cmsgs);
1588 static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs, in sctp_sendmsg_parse() argument
1601 memset(cmsgs, 0, sizeof(*cmsgs)); in sctp_sendmsg_parse()
1602 err = sctp_msghdr_parse(msg, cmsgs); in sctp_sendmsg_parse()
1609 if (cmsgs->srinfo) { in sctp_sendmsg_parse()
1610 srinfo->sinfo_stream = cmsgs->srinfo->sinfo_stream; in sctp_sendmsg_parse()
1611 srinfo->sinfo_flags = cmsgs->srinfo->sinfo_flags; in sctp_sendmsg_parse()
1612 srinfo->sinfo_ppid = cmsgs->srinfo->sinfo_ppid; in sctp_sendmsg_parse()
1613 srinfo->sinfo_context = cmsgs->srinfo->sinfo_context; in sctp_sendmsg_parse()
1614 srinfo->sinfo_assoc_id = cmsgs->srinfo->sinfo_assoc_id; in sctp_sendmsg_parse()
1615 srinfo->sinfo_timetolive = cmsgs->srinfo->sinfo_timetolive; in sctp_sendmsg_parse()
1618 if (cmsgs->sinfo) { in sctp_sendmsg_parse()
1619 srinfo->sinfo_stream = cmsgs->sinfo->snd_sid; in sctp_sendmsg_parse()
1620 srinfo->sinfo_flags = cmsgs->sinfo->snd_flags; in sctp_sendmsg_parse()
1621 srinfo->sinfo_ppid = cmsgs->sinfo->snd_ppid; in sctp_sendmsg_parse()
1622 srinfo->sinfo_context = cmsgs->sinfo->snd_context; in sctp_sendmsg_parse()
1623 srinfo->sinfo_assoc_id = cmsgs->sinfo->snd_assoc_id; in sctp_sendmsg_parse()
1626 if (cmsgs->prinfo) { in sctp_sendmsg_parse()
1627 srinfo->sinfo_timetolive = cmsgs->prinfo->pr_value; in sctp_sendmsg_parse()
1629 cmsgs->prinfo->pr_policy); in sctp_sendmsg_parse()
1650 struct sctp_cmsgs *cmsgs, in sctp_sendmsg_new_asoc() argument
1685 err = sctp_connect_new_asoc(ep, daddr, cmsgs->init, tp); in sctp_sendmsg_new_asoc()
1690 if (!cmsgs->addrs_msg) in sctp_sendmsg_new_asoc()
1697 for_each_cmsghdr(cmsg, cmsgs->addrs_msg) { in sctp_sendmsg_new_asoc()
1887 struct sctp_cmsgs *cmsgs) in sctp_sendmsg_get_daddr() argument
1910 struct sctp_cmsgs *cmsgs) in sctp_sendmsg_update_sinfo() argument
1912 if (!cmsgs->srinfo && !cmsgs->sinfo) { in sctp_sendmsg_update_sinfo()
1918 if (!cmsgs->prinfo) in sctp_sendmsg_update_sinfo()
1922 if (!cmsgs->srinfo && !cmsgs->prinfo) in sctp_sendmsg_update_sinfo()
1925 if (cmsgs->authinfo) { in sctp_sendmsg_update_sinfo()
1930 sinfo->sinfo_ssn = cmsgs->authinfo->auth_keynumber; in sctp_sendmsg_update_sinfo()
1940 struct sctp_cmsgs cmsgs; in sctp_sendmsg() local
1947 err = sctp_sendmsg_parse(sk, &cmsgs, &_sinfo, msg, msg_len); in sctp_sendmsg()
1955 daddr = sctp_sendmsg_get_daddr(sk, msg, &cmsgs); in sctp_sendmsg()
1973 sctp_sendmsg_update_sinfo(asoc, sinfo, &cmsgs); in sctp_sendmsg()
1995 err = sctp_sendmsg_new_asoc(sk, sflags, &cmsgs, daddr, in sctp_sendmsg()
2019 sctp_sendmsg_update_sinfo(asoc, sinfo, &cmsgs); in sctp_sendmsg()
8634 static int sctp_msghdr_parse(const struct msghdr *msg, struct sctp_cmsgs *cmsgs) in sctp_msghdr_parse() argument
8666 cmsgs->init = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8684 cmsgs->srinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8686 if (cmsgs->srinfo->sinfo_flags & in sctp_msghdr_parse()
8708 cmsgs->sinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8710 if (cmsgs->sinfo->snd_flags & in sctp_msghdr_parse()
8729 cmsgs->prinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8730 if (cmsgs->prinfo->pr_policy & ~SCTP_PR_SCTP_MASK) in sctp_msghdr_parse()
8733 if (cmsgs->prinfo->pr_policy == SCTP_PR_SCTP_NONE) in sctp_msghdr_parse()
8734 cmsgs->prinfo->pr_value = 0; in sctp_msghdr_parse()
8749 cmsgs->authinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8764 cmsgs->addrs_msg = my_msg; in sctp_msghdr_parse()