Sockets Library Functions sctpoptinfo(3SOCKET)
NAME
sctpoptinfo - examine SCTP level options for an SCTP end-
point
SYNOPSIS
cc [ flag... ] file... -lsocket -lnsl -lsctp [ library... ]
#include
#include
#include
int sctpoptinfo(int sock, sctpassoct id, int opt, void *arg,
socklent *len);
DESCRIPTION
The sctpoptinfo() returns SCTP level options associated
with the SCTP socket sock. If sock is a one-to-many style
socket, id refers to the association of interest. If sock is
a one-to-one socket or if sock is a branched-off one-to-many
style socket, id is ignored. The opt parameter specifies the
SCTP option to get. The arg structure is an option-specific
structure buffer allocated by the caller. The len parameter
is the length of the option specified.
Following are the currently supported values for the opt
parameter. When one of the options below specifies an asso-
ciation id, the id is relevant for only one-to-many style
SCTP sockets. The associatation id can be ignored for one-
to-one style or branched-off one-to-many style SCTP sockets.
SCTPRTOINFO Returns the protocol parameters
used to initialize and bind
retransmission timeout (RTO) tun-
able. The following structure is
used to access these parameters:
struct sctprtoinfo {
sctpassoct srtoassocid;
uint32t srtoinitial;
uint32t srtomax;
uint32t srtomin;
};
where:
srtoassocid Association ID specified by the caller
srtoinitial Initial RTO value
srtomax Maximum value for the RTO
srtomin Minimum value for the RTO
SunOS 5.11 Last change: 25 Feb 2005 1
Sockets Library Functions sctpoptinfo(3SOCKET)
SCTPASOCINFO Returns association-specific
parameters. The following struc-
ture is used to access the param-
eters:
struct sctpassocparams {
sctpassoct sasocassocid;
uint16t sasocasocmaxrxt;
uint16t sasocnumberpeerdestinations;
uint32t sasocpeerrwnd;
uint32t sasoclocalrwnd;
uint32t sasoccookielife;
};
where:
srtoassocid Association ID specified by the caller
sasocasocmaxrxt Maximum retransmission count for
the association
sasocnumberpeerdestinations
Number of addresses the peer has
sasocpeerrwnd Current value of the peer's
receive window
sasoclocalrwnd Last reported receive window sent
to the peer
sasoccookielife Association cookie lifetime used
when issuing cookies
All parameters with time values
are in milliseconds.
SCTPDEFAULTSENDPARAM Returns the default set of param-
eters used by the sendto() func-
tion on this association. The
following structure is used to
access the parameters:
struct sctpsndrcvinfo {
uint16t sinfostream;
uint16t sinfossn;
uint16t sinfoflags;
uint32t sinfoppid;
uint32t sinfocontext;
uint32t sinfotimetolive;
uint32t sinfotsn;
uint32t sinfocumtsn;
sctpassoct sinfoassocid;
};
where:
sinfostream Default stream for sendmsg()
sinfossn Always returned as 0
sinfoflags Default flags for sendmsg()
that include the following:
SunOS 5.11 Last change: 25 Feb 2005 2
Sockets Library Functions sctpoptinfo(3SOCKET)
MSGUNORDERED
MSGADROVER
MSGABORT
MSGEOF
MSGPRSCTP
sinfoppid Default payload protocol identifier
for sendmsg()
sinfocontext Default context for sendmsg()
sinfotimetolive 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 MSGPRSCTP is set in
sinfoflags, the message expires if
it is not acknowledged within the
time period.
sinfotsn Always returned as 0
sinfocumtsn Always returned as 0
sinfoassocid Association ID specified by the caller
SCTPERADRPARAMS Returns the parameters for a
specified peer address of the
association. The following struc-
ture is used to access the param-
eters:
struct sctppaddrparams {
sctpassoct sppassocid;
struct sockaddrstorage sppaddress;
uint32t spphbinterval;
uint16t spppathmaxrxt;
};
where:
sppassocid Association ID specified by the caller
sppaddress Peer's address
spphbinterval Heartbeat interval in milliseconds
spppathmaxrxt Maximum number of retransmissions
to an address before it is
considered unreachable
SunOS 5.11 Last change: 25 Feb 2005 3
Sockets Library Functions sctpoptinfo(3SOCKET)
SCTPSTATUS Returns the current status infor-
mation about the association. The
following structure is used to
access the parameters:
struct sctpstatus {
sctpassoct sstatassocid;
int32t sstatstate;
uint32t sstatrwnd;
uint16t sstatunackdata;
uint16t sstatpenddata;
uint16t sstatinstrms;
uint16t sstatoutstrms;
uint16t sstatfragmentationpoint;
struct sctppaddrinfo sstatprimary;
};
where:
sstatassocid Association ID specifed by the caller
sstatstate Current state of the association
which might be one of the following:
SCTPCLOSED
SCTPBOUND
SCTPLISTEN
SCTPCOKIEWAIT
SCTPCOKIECHOED
SCTPESTABLISHED
SCTPSHUTDOWNPENDING
SCTPSHUTDOWNSENT
SCTPSHUTDOWNRECEIVED
SCTPSHUTDOWNACKSENT
sstatrwnd Current receive window of the
association peer
sstatunackdata Number of unacked DATA chunks
sstatpenddata Number of DATA chunks pending
receipt
sstatinstrms Number of inbound streams
sstatoutstrms Number of outbound streams
sstatfragmentationpoint
Size at which SCTP fragmentation occurs
sstatprimary Information about the primary
peer address
sstatprimary has the following structure
struct sctppaddrinfo {
sctpassoct spinfoassocid;
struct sockaddrstorage spinfoaddress;
int32t spinfostate;
uint32t spinfo cwnd;
uint32t spinfosrtt;
uint32t spinforto;
SunOS 5.11 Last change: 25 Feb 2005 4
Sockets Library Functions sctpoptinfo(3SOCKET)
uint32t spinfomtu;
};
where:
spinfoassocid Association ID
specified by
the caller
spinfoaddress Primary peer
address
spinfostate State of the peer
address:
SCTPACTIVE or
SCTPINACTIVE
spinfocwnd Congestion window
of the peer
address
spinfosrtt Smoothed round-trip
time calculation of
the peer address
spinforto Current retransmission
timeout value of the
peer address in
milliseconds
spinfomtu P-MTU of the address
RETURN VALUES
Upon successful completion, the sctpoptinfo() function
returns 0. Otherwise, the function returns -1 and sets errno
to indicate the error.
ERORS
The sctpoptinfo() call fails under the following condi-
tions.
EBADF The sock argument is an invalid file
descriptor.
ENOTSOCK The sock argument is not a socket.
EINVAL The association id is invalid for a one-to-
many style SCTP socket.
EINVAL The input buffer length is insufficient for
the option specified.
EINVAL The peer address is invalid or does not
belong to the association.
SunOS 5.11 Last change: 25 Feb 2005 5
Sockets Library Functions sctpoptinfo(3SOCKET)
EAFNOSUPORT The address family for the peer's address is
other than AFINET or AFINET6.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level Safe
SEE ALSO
in.h(3HEAD), libsctp(3LIB), getsockopt(3SOCKET),
setsockopt(3SOCKET), socket(3SOCKET), inet(7P), inet6(7P),
ip(7P), ip6(7P), sctp(7P)
SunOS 5.11 Last change: 25 Feb 2005 6
|