Changeset 486:65efe8ff2c30 in freeDiameter
- Timestamp:
- Aug 11, 2010, 4:13:51 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/sctp.c
r403 r486 1001 1001 struct msghdr mhdr; 1002 1002 struct iovec iov; 1003 struct { 1004 struct cmsghdr hdr; 1005 struct sctp_sndrcvinfo sndrcv; 1006 } anci; 1003 struct cmsghdr *hdr; 1004 struct sctp_sndrcvinfo *sndrcv; 1005 uint8_t anci[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; 1007 1006 ssize_t ret; 1008 1007 int timedout = 0; … … 1020 1019 1021 1020 /* Anciliary data: specify SCTP stream */ 1022 anci.hdr.cmsg_len = sizeof(anci); 1023 anci.hdr.cmsg_level = IPPROTO_SCTP; 1024 anci.hdr.cmsg_type = SCTP_SNDRCV; 1025 anci.sndrcv.sinfo_stream = strid; 1021 hdr = (struct cmsghdr *)anci; 1022 sndrcv = (struct sctp_sndrcvinfo *)CMSG_DATA(hdr); 1023 hdr->cmsg_len = sizeof(anci); 1024 hdr->cmsg_level = IPPROTO_SCTP; 1025 hdr->cmsg_type = SCTP_SNDRCV; 1026 sndrcv->sinfo_stream = strid; 1026 1027 /* note : we could store other data also, for example in .sinfo_ppid for remote peer or in .sinfo_context for errors. */ 1027 1028 … … 1031 1032 mhdr.msg_iovlen = 1; 1032 1033 1033 mhdr.msg_control = &anci;1034 mhdr.msg_control = anci; 1034 1035 mhdr.msg_controllen = sizeof(anci); 1035 1036
Note: See TracChangeset
for help on using the changeset viewer.