9.11 sctp_opt_info Function
The sctp_opt_info function is provided for implementations that cannot use the getsockopt functions for SCTP. This inability to use the getsockopt function is because some of the SCTP socket options, for example, SCTP_STATUS, need an in-out variable to pass the association identification. For systems that cannot provide an in-out variable to the getsockopt function, the user will need to use sctp_opt_info. For systems like FreeBSD that do allow in-out variables in the socket option call, the sctp_opt_info call is a library call that repackages the arguments into the appropriate getsockopt call. For portability's sake, applications should use sctp_opt_info for all the options that require in-out variables (Section 7.10).The call has the following format:
int sctp_opt_info(int sockfd , sctp_assoc_t assoc_id , int opt void *arg , socklen_t *siz ); |
Returns: 0 for success, 1 on error |