Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/sctp_opt_info.3c
Real path: /usr/share/man/man3c/sctp_opt_info.3c
Zurück
'\" te .\" Copyright (c) 2005, 2020, Oracle and/or its affiliates. .TH sctp_opt_info 3C "27 Nov 2017" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME sctp_opt_info \- examine SCTP level options for an SCTP endpoint .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lsctp\fR [ \fIlibrary\fR... ] #include <sys/types.h> #include <sys/socket.h> #include <netinet/sctp.h> \fBint\fR \fBsctp_opt_info\fR(\fBint\fR \fIsock\fR, \fBsctp_assoc_t\fR \fIid\fR, \fBint\fR \fIopt\fR, \fBvoid *\fR\fIarg\fR, \fBsocklen_t *\fR\fIlen\fR); .fi .SH DESCRIPTION .sp .LP The \fBsctp_opt_info()\fR returns SCTP level options associated with the SCTP socket \fIsock\fR. If \fIsock\fR is a one-to-many style socket, \fIid\fR refers to the association of interest. If \fIsock\fR is a one-to-one socket or if \fIsock\fR is a branched-off one-to-many style socket, \fIid\fR is ignored. The \fIopt\fR parameter specifies the SCTP option to get. The \fIarg\fR structure is an option-specific structure buffer allocated by the caller. The \fIlen\fR parameter is the length of the option specified. .sp .LP Following are the currently supported values for the \fIopt\fR parameter. When one of the options below specifies an association \fIid\fR, the \fIid\fR is relevant for only one-to-many style SCTP sockets. The association \fIid\fR can be ignored for one-to-one style or branched-off one-to-many style SCTP sockets. .sp .ne 2 .mk .na \fB\fBSCTP_RTOINFO\fR\fR .ad .br .sp .6 .RS 4n Returns the protocol parameters used to initialize and bind retransmission timeout (RTO) tunable. The following structure is used to access these parameters: .sp .sp .in +2 .nf struct sctp_rtoinfo { sctp_assoc_t srto_assoc_id; uint32_t srto_initial; uint32_t srto_max; uint32_t srto_min; }; .fi .in -2 .sp where: .sp .ne 2 .mk .na \fB\fBsrto_assoc_id\fR\fR .ad .RS 17n .rt Association ID specified by the caller .RE .sp .ne 2 .mk .na \fB\fBsrto_initial\fR\fR .ad .RS 17n .rt Initial RTO value .RE .sp .ne 2 .mk .na \fB\fBsrto_max\fR\fR .ad .RS 17n .rt Maximum value for the RTO .RE .sp .ne 2 .mk .na \fB\fBsrto_min\fR\fR .ad .RS 17n .rt Minimum value for the RTO .RE .RE .sp .ne 2 .mk .na \fB\fBSSCTP_ASSOCINFO\fR\fR .ad .br .sp .6 .RS 4n Returns association-specific parameters. The following structure is used to access the parameters: .sp .sp .in +2 .nf struct sctp_assocparams { sctp_assoc_t sasoc_assoc_id; uint16_t sasoc_asocmaxrxt; uint16_t sasoc_number_peer_destinations; uint32_t sasoc_peer_rwnd; uint32_t sasoc_local_rwnd; uint32_t sasoc_cookie_life; }; .fi .in -2 .sp where: .sp .sp .ne 2 .mk .na \fB\fBsrto_assoc_id\fR\fR .ad .br .sp .6 .RS 4n Association ID specified by the caller .RE .sp .ne 2 .mk .na \fB\fBsasoc_asocmaxrxt\fR\fR .ad .br .sp .6 .RS 4n Maximum retransmission count for the association .RE .sp .ne 2 .mk .na \fB\fBsasoc_number_peer_destinations\fR\fR .ad .br .sp .6 .RS 4n Number of addresses the peer has .RE .sp .ne 2 .mk .na \fB\fBsasoc_peer_rwnd\fR\fR .ad .br .sp .6 .RS 4n Current value of the peer's receive window .RE .sp .ne 2 .mk .na \fB\fBsasoc_local_rwnd\fR\fR .ad .br .sp .6 .RS 4n Last reported receive window sent to the peer .RE .sp .ne 2 .mk .na \fB\fBsasoc_cookie_life\fR\fR .ad .br .sp .6 .RS 4n Association cookie lifetime used when issuing cookies .RE All parameters with time values are in milliseconds. .RE .sp .ne 2 .mk .na \fB\fBSCTP_DEFAULT_SEND_PARAM\fR\fR .ad .br .sp .6 .RS 4n Returns the default set of parameters used by the \fBsendto()\fR function on this association. The following structure is used to access the parameters: .sp .sp .in +2 .nf struct sctp_sndrcvinfo { uint16_t sinfo_stream; uint16_t sinfo_ssn; uint16_t sinfo_flags; uint32_t sinfo_ppid; uint32_t sinfo_context; uint32_t sinfo_timetolive; uint32_t sinfo_tsn; uint32_t sinfo_cumtsn; sctp_assoc_t sinfo_assoc_id; }; .fi .in -2 .sp where: .sp .ne 2 .mk .na \fB\fBsinfo_stream\fR\fR .ad .br .sp .6 .RS 4n Default stream for \fBsendmsg()\fR .RE .sp .ne 2 .mk .na \fB\fBsinfo_ssn\fR\fR .ad .br .sp .6 .RS 4n Always returned as 0 .RE .sp .ne 2 .mk .na \fB\fBsinfo_flags\fR\fR .ad .br .sp .6 .RS 4n Default flags for \fBsendmsg()\fR that include the following: .br .in +2 MSG_UNORDERED .in -2 .br .in +2 MSG_ADDR_OVER .in -2 .br .in +2 MSG_ABORT .in -2 .br .in +2 MSG_EOF .in -2 .br .in +2 MSG_PR_SCTP .in -2 .RE .sp .ne 2 .mk .na \fB\fBsinfo_ppid\fR\fR .ad .br .sp .6 .RS 4n Default payload protocol identifier for \fBsendmsg()\fR .RE .sp .ne 2 .mk .na \fB\fBsinfo_context\fR\fR .ad .br .sp .6 .RS 4n Default context for \fBsendmsg()\fR .RE .sp .ne 2 .mk .na \fB\fBsinfo_timetolive\fR\fR .ad .br .sp .6 .RS 4n Time to live in milliseconds for a message on the sending side. The message expires if the sending side does not start the first transmission for the message within the specified time period. If the sending side starts the first transmission before the time period expires, the message is sent as a normal reliable message. A value of 0 indicates that the message does not expire. When \fBMSG_PR_SCTP\fR is set in \fBsinfo_flags\fR, the message expires if it is not acknowledged within the time period. .RE .sp .ne 2 .mk .na \fB\fBsinfo_tsn\fR\fR .ad .br .sp .6 .RS 4n Always returned as 0 .RE .sp .ne 2 .mk .na \fB\fBsinfo_cumtsn\fR\fR .ad .br .sp .6 .RS 4n Always returned as 0 .RE .sp .ne 2 .mk .na \fB\fBsinfo_assoc_id\fR\fR .ad .br .sp .6 .RS 4n Association ID specified by the caller .RE .RE .sp .ne 2 .mk .na \fB\fBSCTP_PEER_ADDR_PARAMS\fR\fR .ad .br .sp .6 .RS 4n Returns the parameters for a specified peer address of the association. The following structure is used to access the parameters: .sp .sp .in +2 .nf struct sctp_paddrparams { sctp_assoc_t spp_assoc_id; struct sockaddr_storage spp_address; uint32_t spp_hbinterval; uint16_t spp_pathmaxrxt; uint32_t spp_pathmtu; uint32_t spp_flags; uint32_t spp_ipv6_flowlabel; uint8_t spp_ipv4_tos; }; .fi .in -2 .sp where: .sp .ne 2 .mk .na \fB\fBspp_assoc_id\fR\fR .ad .br .sp .6 .RS 4n Association ID specified by the caller. .RE .sp .ne 2 .mk .na \fB\fBspp_address\fR\fR .ad .br .sp .6 .RS 4n Peer's address. .RE .sp .ne 2 .mk .na \fB\fBspp_hbinterval\fR\fR .ad .br .sp .6 .RS 4n Heartbeat interval in milliseconds. .RE .sp .ne 2 .mk .na \fB\fBspp_pathmaxrxt\fR\fR .ad .br .sp .6 .RS 4n Maximum number of retransmissions to an address before it is considered unreachable. .RE .sp .ne 2 .mk .na \fB\fBspp_pathmtu\fR\fR .ad .br .sp .6 .RS 4n The current path MTU of the peer address. It is the number of bytes available in an SCTP packet for chunks. Providing a value of 0 does not change the current setting. If a positive value is provided and \fBSPP_PMTUD_DISABLE\fR is set in \fBspp_flags\fR, the given value is used as the path MTU. If \fBSPP_PMTUD_ENABLE\fR is set in \fBspp_flags\fR, the \fBspp_pathmtu\fR field is ignored. .RE .sp .ne 2 .mk .na \fB\fBspp_ipv6_flowlabel\fR\fR .ad .br .sp .6 .RS 4n This field is used in conjunction with the \fBSPP_IPV6_FLOWLABEL\fR flag. This setting has precedence over any IPv6 layer setting. .RE .sp .ne 2 .mk .na \fB\fBspp_ipv4_tos\fR\fR .ad .br .sp .6 .RS 4n This field is used in conjunction with the \fBSPP_IPV4_TOS\fR flag. This setting has precedence over any IPv4 layer setting. .RE .sp .ne 2 .mk .na \fB\fBspp_flags\fR\fR .ad .br .sp .6 .RS 4n These flags are used to control various features on an association. The flag field is a bit mask which may contain zero or more of the following options: .sp .ne 2 .mk .na \fB\fBSPP_HB_ENABLE\fR\fR .ad .br .sp .6 .RS 4n Enable heartbeats on the specified address. .RE .sp .ne 2 .mk .na \fB\fBSPP_HB_DISABLE\fR\fR .ad .br .sp .6 .RS 4n Disable heartbeats on the specified address. Note that \fBSPP_HB_ENABLE\fR and \fBSPP_HB_DISABLE\fR are mutually exclusive, only one of these two should be specified. Enabling both fields will have undetermined results. .RE .sp .ne 2 .mk .na \fB\fBSPP_HB_DEMAND\fR\fR .ad .br .sp .6 .RS 4n Request a user initiated heartbeat to be made immediately. This must not be used in conjunction with a wildcard address. .RE .sp .ne 2 .mk .na \fB\fBSPP_HB_TIME_IS_ZERO\fR\fR .ad .br .sp .6 .RS 4n Specifies that the time for heartbeat delay is to be set to the value of 0 milliseconds. .RE .sp .ne 2 .mk .na \fB\fBSPP_PMTUD_ENABLE\fR\fR .ad .br .sp .6 .RS 4n This field will enable PMTU discovery upon the specified address. .RE .sp .ne 2 .mk .na \fB\fBSPP_PMTUD_DISABLE\fR\fR .ad .br .sp .6 .RS 4n This field will disable PMTU discovery upon the specified address. Note that if the address field is empty then all addresses on the association are affected. Note also that \fBSPP_PMTUD_ENABLE\fR and \fBSPP_PMTUD_DISABLE\fR are mutually exclusive. Enabling both will have undetermined results. .RE .sp .ne 2 .mk .na \fB\fBSPP_IPV6_FLOWLABEL\fR\fR .ad .br .sp .6 .RS 4n Setting this flag enables the setting of the IPV6 flowlabel value. The value is obtained in the \fBspp_ipv6_flowlabel\fR field. .sp Upon retrieval, this flag will be set to indicate that the \fBspp_ipv6_flowlabel\fR field has a valid value returned. If a specific destination address is set (in the \fBspp_address\fR field), the value returned is that of the address. If just an association is specified (and no address), then the association's default flowlabel is returned. If neither an association nor a destination is specified, then the socket's default flowlabel is returned. For non IPv6 sockets, this flag will be left cleared. .RE .sp .ne 2 .mk .na \fB\fBSPP_IPV4_TOS\fR\fR .ad .br .sp .6 .RS 4n Setting this flag enables the setting of the IPV4 TOS value associated with either the association or a specific address. The value is obtained in the \fBspp_ipv4_tos\fR field. .sp Upon retrieval, this flag will be set to indicate that the \fBspp_ipv4_tos\fR field has a valid value returned. If a specific destination address is set when called (in the \fBspp_address\fR field) then that specific destination address' TOS value is returned. If just an association is specified then the association default TOS is returned. If neither an association nor a destination is specified, then the sockets default TOS is returned. .RE .RE .RE .sp .ne 2 .mk .na \fB\fBSCTP_STATUS\fR\fR .ad .br .sp .6 .RS 4n Returns the current status information about the association. The following structure is used to access the parameters: .sp .sp .in +2 .nf struct sctp_status { sctp_assoc_t sstat_assoc_id; int32_t sstat_state; uint32_t sstat_rwnd; uint16_t sstat_unackdata; uint16_t sstat_penddata; uint16_t sstat_instrms; uint16_t sstat_outstrms; uint16_t sstat_fragmentation_point; struct sctp_paddrinfo sstat_primary; }; .fi .in -2 .sp where: .sp .sp .ne 2 .mk .na \fB\fBsstat_assoc_id\fR\fR .ad .br .sp .6 .RS 4n Association ID specified by the caller .RE .sp .ne 2 .mk .na \fB\fBsstat_state\fR\fR .ad .br .sp .6 .RS 4n Current state of the association which might be one of the following: .br .in +2 SCTP_CLOSED .in -2 .br .in +2 SCTP_BOUND .in -2 .br .in +2 SCTP_LISTEN .in -2 .br .in +2 SCTP_COOKIE_WAIT .in -2 .br .in +2 SCTP_COOKIE_ECHOED .in -2 .br .in +2 SCTP_ESTABLISHED .in -2 .br .in +2 SCTP_SHUTDOWN_PENDING .in -2 .br .in +2 SCTP_SHUTDOWN_SENT .in -2 .br .in +2 SCTP_SHUTDOWN_RECEIVED .in -2 .br .in +2 SCTP_SHUTDOWN_ACK_SENT .in -2 .RE .sp .ne 2 .mk .na \fB\fBsstat_rwnd\fR\fR .ad .br .sp .6 .RS 4n Current receive window of the association peer .RE .sp .ne 2 .mk .na \fB\fBsstat_unackdata\fR\fR .ad .br .sp .6 .RS 4n Number of unacked DATA chunks .RE .sp .ne 2 .mk .na \fB\fBsstat_penddata\fR\fR .ad .br .sp .6 .RS 4n Number of DATA chunks pending receipt .RE .sp .ne 2 .mk .na \fB\fBsstat_instrms\fR\fR .ad .br .sp .6 .RS 4n Number of inbound streams .RE .sp .ne 2 .mk .na \fB\fBsstat_outstrms\fR\fR .ad .br .sp .6 .RS 4n Number of outbound streams .RE .sp .ne 2 .mk .na \fB\fBsstat_fragmentation_point\fR\fR .ad .br .sp .6 .RS 4n Size at which SCTP fragmentation occurs .RE .sp .ne 2 .mk .na \fB\fBsstat_primary \fR\fR .ad .br .sp .6 .RS 4n Information about the primary peer address .RE \fBsstat_primary\fR has the following structure: .sp .sp .in +2 .nf struct sctp_paddrinfo { sctp_assoc_t spinfo_assoc_id; struct sockaddr_storage spinfo_address; int32_t spinfo_state; uint32_t spinfo cwnd; uint32_t spinfo_srtt; uint32_t spinfo_rto; uint32_t spinfo_mtu; }; .fi .in -2 .sp where: .sp .ne 2 .mk .na \fB\fBspinfo_assoc_id\fR\fR .ad .RS 19n .rt Association ID specified by the caller .RE .sp .ne 2 .mk .na \fB\fBspinfo_address\fR\fR .ad .RS 19n .rt Primary peer address .RE .sp .ne 2 .mk .na \fB\fBspinfo_state\fR\fR .ad .RS 19n .rt State of the peer address: \fBSCTP_ACTIVE\fR or \fBSCTP_INACTIVE\fR .RE .sp .ne 2 .mk .na \fB\fBspinfo_cwnd\fR\fR .ad .RS 19n .rt Congestion window of the peer address .RE .sp .ne 2 .mk .na \fB\fBspinfo_srtt\fR\fR .ad .RS 19n .rt Smoothed round-trip time calculation of the peer address .RE .sp .ne 2 .mk .na \fB\fBspinfo_rto\fR\fR .ad .RS 19n .rt Current retransmission timeout value of the peer address in milliseconds .RE .sp .ne 2 .mk .na \fB\fBspinfo_mtu\fR\fR .ad .RS 19n .rt P-MTU of the address .RE .RE .SH RETURN VALUES .sp .LP Upon successful completion, the \fBsctp_opt_info()\fR function returns \fB0\fR. Otherwise, the function returns \fB-1\fR and sets \fBerrno\fR to indicate the error. .SH ERRORS .sp .LP The \fBsctp_opt_info()\fR call fails under the following conditions. .sp .ne 2 .mk .na \fB\fBEBADF\fR\fR .ad .RS 16n .rt The \fIsock\fR argument is an invalid file descriptor. .RE .sp .ne 2 .mk .na \fB\fBENOTSOCK\fR\fR .ad .RS 16n .rt The \fIsock\fR argument is not a socket. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 16n .rt The association \fIid\fR is invalid for a one-to-many style SCTP socket. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 16n .rt The input buffer length is insufficient for the option specified. .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 16n .rt The peer address is invalid or does not belong to the association. .RE .sp .ne 2 .mk .na \fB\fBEAFNOSUPPORT\fR\fR .ad .RS 16n .rt The address family for the peer's address is other than \fBAF_INET\fR or \fBAF_INET6\fR. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level Safe .TE .sp .SH SEE ALSO .sp .LP \fBgetsockopt\fR(3C), \fBsetsockopt\fR(3C), \fBsocket\fR(3C), \fBin.h\fR(3HEAD), \fBlibsctp\fR(3LIB), \fBinet\fR(4P), \fBinet6\fR(4P), \fBip\fR(4P), \fBip6\fR(4P), \fBsctp\fR(4P)