sctp_getnostrm.c 364 B

12345678910111213141516
  1. #include "unp.h"
  2. int
  3. sctp_get_no_strms(int sock_fd,struct sockaddr *to, socklen_t tolen)
  4. {
  5. int retsz;
  6. struct sctp_status status;
  7. retsz = sizeof(status);
  8. bzero(&status,sizeof(status));
  9. status.sstat_assoc_id = sctp_address_to_associd(sock_fd,to,tolen);
  10. Getsockopt(sock_fd,IPPROTO_SCTP, SCTP_STATUS,
  11. &status, &retsz);
  12. return(status.sstat_outstrms);
  13. }