static int ff_sctp_send(int s, const void *msg, size_t len,

                        const struct sctp_sndrcvinfo *sinfo, int flags)

{

    struct msghdr outmsg;

    struct iovec iov;



    outmsg.msg_name       = NULL;

    outmsg.msg_namelen    = 0;

    outmsg.msg_iov        = &iov;

    iov.iov_base          = msg;

    iov.iov_len           = len;

    outmsg.msg_iovlen     = 1;

    outmsg.msg_controllen = 0;



    if (sinfo) {

        char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];

        struct cmsghdr *cmsg;



        outmsg.msg_control    = outcmsg;

        outmsg.msg_controllen = sizeof(outcmsg);

        outmsg.msg_flags      = 0;



        cmsg             = CMSG_FIRSTHDR(&outmsg);

        cmsg->cmsg_level = IPPROTO_SCTP;

        cmsg->cmsg_type  = SCTP_SNDRCV;

        cmsg->cmsg_len   = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));



        outmsg.msg_controllen = cmsg->cmsg_len;

        memcpy(CMSG_DATA(cmsg), sinfo, sizeof(struct sctp_sndrcvinfo));

    }



    return sendmsg(s, &outmsg, flags | MSG_NOSIGNAL);

}

static int ff_sctp_send(int s, const void *msg, size_t len,

                        const struct sctp_sndrcvinfo *sinfo, int flags)

{

    struct msghdr outmsg;

    struct iovec iov;



    outmsg.msg_name       = NULL;

    outmsg.msg_namelen    = 0;

    outmsg.msg_iov        = &iov;

    iov.iov_base          = msg;

    iov.iov_len           = len;

    outmsg.msg_iovlen     = 1;

    outmsg.msg_controllen = 0;



    if (sinfo) {

        char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];

        struct cmsghdr *cmsg;



        outmsg.msg_control    = outcmsg;

        outmsg.msg_controllen = sizeof(outcmsg);

        outmsg.msg_flags      = 0;



        cmsg             = CMSG_FIRSTHDR(&outmsg);

        cmsg->cmsg_level = IPPROTO_SCTP;

        cmsg->cmsg_type  = SCTP_SNDRCV;

        cmsg->cmsg_len   = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));



        outmsg.msg_controllen = cmsg->cmsg_len;

        memcpy(CMSG_DATA(cmsg), sinfo, sizeof(struct sctp_sndrcvinfo));

    }



    return sendmsg(s, &outmsg, flags | MSG_NOSIGNAL);

}

static int FUNC_0(int VAR_0, const void *VAR_1, size_t VAR_2,

                        const struct sctp_sndrcvinfo *VAR_3, int VAR_4)

{

    struct msghdr VAR_5;

    struct iovec VAR_6;



    VAR_5.msg_name       = NULL;

    VAR_5.msg_namelen    = 0;

    VAR_5.msg_iov        = &VAR_6;

    VAR_6.iov_base          = VAR_1;

    VAR_6.iov_len           = VAR_2;

    VAR_5.msg_iovlen     = 1;

    VAR_5.msg_controllen = 0;



    if (VAR_3) {

        char VAR_7[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];

        struct cmsghdr *VAR_8;



        VAR_5.msg_control    = VAR_7;

        VAR_5.msg_controllen = sizeof(VAR_7);

        VAR_5.msg_flags      = 0;



        VAR_8             = CMSG_FIRSTHDR(&VAR_5);

        VAR_8->cmsg_level = IPPROTO_SCTP;

        VAR_8->cmsg_type  = SCTP_SNDRCV;

        VAR_8->cmsg_len   = CMSG_LEN(sizeof(struct sctp_sndrcvinfo));



        VAR_5.msg_controllen = VAR_8->cmsg_len;

        memcpy(CMSG_DATA(VAR_8), VAR_3, sizeof(struct sctp_sndrcvinfo));

    }



    return sendmsg(VAR_0, &VAR_5, VAR_4 | MSG_NOSIGNAL);

}

static int FUNC_0(int VAR_0, const void *VAR_1, size_t VAR_2,
const struct sctp_sndrcvinfo *VAR_3, int VAR_4)
{ struct msghdr VAR_5; struct iovec VAR_6; VAR_5.msg_name       = NULL; VAR_5.msg_namelen    = 0; VAR_5.msg_iov        = &VAR_6; VAR_6.iov_base          = VAR_1; VAR_6.iov_len           = VAR_2; VAR_5.msg_iovlen     = 1; VAR_5.msg_controllen = 0; if (VAR_3) { char VAR_7[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; struct cmsghdr *VAR_8; VAR_5.msg_control    = VAR_7; VAR_5.msg_controllen = sizeof(VAR_7); VAR_5.msg_flags      = 0; VAR_8             = CMSG_FIRSTHDR(&VAR_5); VAR_8->cmsg_level = IPPROTO_SCTP; VAR_8->cmsg_type  = SCTP_SNDRCV; VAR_8->cmsg_len   = CMSG_LEN(sizeof(struct sctp_sndrcvinfo)); VAR_5.msg_controllen = VAR_8->cmsg_len; memcpy(CMSG_DATA(VAR_8), VAR_3, sizeof(struct sctp_sndrcvinfo)); } return sendmsg(VAR_0, &VAR_5, VAR_4 | MSG_NOSIGNAL); }