Lines Matching refs:cmsgs
1591 struct sctp_cmsgs *cmsgs);
1593 static int sctp_sendmsg_parse(struct sock *sk, struct sctp_cmsgs *cmsgs, in sctp_sendmsg_parse() argument
1606 memset(cmsgs, 0, sizeof(*cmsgs)); in sctp_sendmsg_parse()
1607 err = sctp_msghdr_parse(msg, cmsgs); in sctp_sendmsg_parse()
1614 if (cmsgs->srinfo) { in sctp_sendmsg_parse()
1615 srinfo->sinfo_stream = cmsgs->srinfo->sinfo_stream; in sctp_sendmsg_parse()
1616 srinfo->sinfo_flags = cmsgs->srinfo->sinfo_flags; in sctp_sendmsg_parse()
1617 srinfo->sinfo_ppid = cmsgs->srinfo->sinfo_ppid; in sctp_sendmsg_parse()
1618 srinfo->sinfo_context = cmsgs->srinfo->sinfo_context; in sctp_sendmsg_parse()
1619 srinfo->sinfo_assoc_id = cmsgs->srinfo->sinfo_assoc_id; in sctp_sendmsg_parse()
1620 srinfo->sinfo_timetolive = cmsgs->srinfo->sinfo_timetolive; in sctp_sendmsg_parse()
1623 if (cmsgs->sinfo) { in sctp_sendmsg_parse()
1624 srinfo->sinfo_stream = cmsgs->sinfo->snd_sid; in sctp_sendmsg_parse()
1625 srinfo->sinfo_flags = cmsgs->sinfo->snd_flags; in sctp_sendmsg_parse()
1626 srinfo->sinfo_ppid = cmsgs->sinfo->snd_ppid; in sctp_sendmsg_parse()
1627 srinfo->sinfo_context = cmsgs->sinfo->snd_context; in sctp_sendmsg_parse()
1628 srinfo->sinfo_assoc_id = cmsgs->sinfo->snd_assoc_id; in sctp_sendmsg_parse()
1631 if (cmsgs->prinfo) { in sctp_sendmsg_parse()
1632 srinfo->sinfo_timetolive = cmsgs->prinfo->pr_value; in sctp_sendmsg_parse()
1634 cmsgs->prinfo->pr_policy); in sctp_sendmsg_parse()
1655 struct sctp_cmsgs *cmsgs, in sctp_sendmsg_new_asoc() argument
1690 err = sctp_connect_new_asoc(ep, daddr, cmsgs->init, tp); in sctp_sendmsg_new_asoc()
1695 if (!cmsgs->addrs_msg) in sctp_sendmsg_new_asoc()
1702 for_each_cmsghdr(cmsg, cmsgs->addrs_msg) { in sctp_sendmsg_new_asoc()
1892 struct sctp_cmsgs *cmsgs) in sctp_sendmsg_get_daddr() argument
1915 struct sctp_cmsgs *cmsgs) in sctp_sendmsg_update_sinfo() argument
1917 if (!cmsgs->srinfo && !cmsgs->sinfo) { in sctp_sendmsg_update_sinfo()
1923 if (!cmsgs->prinfo) in sctp_sendmsg_update_sinfo()
1927 if (!cmsgs->srinfo && !cmsgs->prinfo) in sctp_sendmsg_update_sinfo()
1930 if (cmsgs->authinfo) { in sctp_sendmsg_update_sinfo()
1935 sinfo->sinfo_ssn = cmsgs->authinfo->auth_keynumber; in sctp_sendmsg_update_sinfo()
1945 struct sctp_cmsgs cmsgs; in sctp_sendmsg() local
1952 err = sctp_sendmsg_parse(sk, &cmsgs, &_sinfo, msg, msg_len); in sctp_sendmsg()
1960 daddr = sctp_sendmsg_get_daddr(sk, msg, &cmsgs); in sctp_sendmsg()
1978 sctp_sendmsg_update_sinfo(asoc, sinfo, &cmsgs); in sctp_sendmsg()
2000 err = sctp_sendmsg_new_asoc(sk, sflags, &cmsgs, daddr, in sctp_sendmsg()
2024 sctp_sendmsg_update_sinfo(asoc, sinfo, &cmsgs); in sctp_sendmsg()
8777 static int sctp_msghdr_parse(const struct msghdr *msg, struct sctp_cmsgs *cmsgs) in sctp_msghdr_parse() argument
8809 cmsgs->init = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8827 cmsgs->srinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8829 if (cmsgs->srinfo->sinfo_flags & in sctp_msghdr_parse()
8851 cmsgs->sinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8853 if (cmsgs->sinfo->snd_flags & in sctp_msghdr_parse()
8872 cmsgs->prinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8873 if (cmsgs->prinfo->pr_policy & ~SCTP_PR_SCTP_MASK) in sctp_msghdr_parse()
8876 if (cmsgs->prinfo->pr_policy == SCTP_PR_SCTP_NONE) in sctp_msghdr_parse()
8877 cmsgs->prinfo->pr_value = 0; in sctp_msghdr_parse()
8892 cmsgs->authinfo = CMSG_DATA(cmsg); in sctp_msghdr_parse()
8907 cmsgs->addrs_msg = my_msg; in sctp_msghdr_parse()