From c6f772a04eafccf03d20b0bbda08c399b4640f38 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 28 Jun 2011 14:00:10 +0200 Subject: Improve types and specifications of the inet modules --- lib/kernel/doc/src/gen_sctp.xml | 144 +++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 75 deletions(-) (limited to 'lib/kernel/doc/src/gen_sctp.xml') diff --git a/lib/kernel/doc/src/gen_sctp.xml b/lib/kernel/doc/src/gen_sctp.xml index b761b6bd83..c0126ed8c1 100644 --- a/lib/kernel/doc/src/gen_sctp.xml +++ b/lib/kernel/doc/src/gen_sctp.xml @@ -63,7 +63,6 @@ SCTP SOCKET OPTIONS SCTP EXAMPLES SEE ALSO - AUTHORS @@ -80,36 +79,18 @@ - - - - - -

Represents an address of an SCTP socket. - It is a tuple as explained in - inet(3).

-
-
- - - - - - -

See - inet(3); POSIX Error Codes.

-
-
- - +

One of the SCTP Socket Options.

-
- + + + + + sctp_socket()

Socket identifier returned from open/*.

@@ -175,8 +156,8 @@ #sctp_assoc_change{ state = atom(), error = atom(), - outbound_streams = int(), - inbound_streams = int(), + outbound_streams = integer(), + inbound_streams = integer(), assoc_id = assoc_id() }

The number of outbound and inbound streams can be set by @@ -300,6 +281,19 @@ The default IP and Port are any and 0, meaning bind to all local addresses on any one free port.

+ +

Other options are:

+ + inet6 + +

Set up the socket for IPv6.

+
+ inet + +

Set up the socket for IPv4. This is the default.

+
+
+

A default set of socket options is used. In particular, the socket is opened in binary and @@ -350,7 +344,7 @@ #sctp_paddr_change{ addr = {ip_address(),port()}, state = atom(), - error = int(), + error = integer(), assoc_id = assoc_id() }

Indicates change of the status of the peer's IP address given by @@ -387,7 +381,7 @@

   #sctp_send_failed{
         flags     = true | false,
-        error     = int(),
+        error     = integer(),
         info      = #sctp_sndrcvinfo{},
         assoc_id  = assoc_id()
         data      = binary()
@@ -407,7 +401,7 @@
           
             
   #sctp_adaptation_event{
-        adaptation_ind = int(),
+        adaptation_ind = integer(),
         assoc_id       = assoc_id()
   }            

Delivered when a peer sends an Adaptation Layer Indication @@ -505,7 +499,7 @@ - {buffer, int()} + {buffer, integer()}

Determines the size of the user-level software buffer used by the SCTP driver. Not to be confused with sndbuf @@ -515,7 +509,7 @@ In fact, the val(buffer) is automatically set to the above maximum when sndbuf or recbuf values are set.

- {tos, int()} + {tos, integer()}

Sets the Type-Of-Service field on the IP datagrams being sent, to the given value, which effectively determines a prioritization @@ -523,7 +517,7 @@ are system-dependent. TODO: we do not provide symbolic names for these values yet.

- {priority, int()} + {priority, integer()}

A protocol-independent equivalent of tos above. Setting priority implies setting tos as well.

@@ -542,7 +536,7 @@ required for high-throughput servers).

- {linger, {true|false, int()} + {linger, {true|false, integer()}

Determines the timeout in seconds for flushing unsent data in the gen_sctp:close/1 socket call. If the 1st component of the value @@ -552,14 +546,14 @@ the flushing time-out in seconds.

- {sndbuf, int()} + {sndbuf, integer()}

The size, in bytes, of the *kernel* send buffer for this socket. Sending errors would occur for datagrams larger than val(sndbuf). Setting this option also adjusts the size of the driver buffer (see buffer above).

- {recbuf, int()} + {recbuf, integer()}

The size, in bytes, of the *kernel* recv buffer for this socket. Sending errors would occur for datagrams larger than @@ -571,9 +565,9 @@

   #sctp_rtoinfo{
         assoc_id = assoc_id(),
-        initial  = int(),
-        max      = int(),
-        min      = int()
+        initial  = integer(),
+        max      = integer(),
+        min      = integer()
   }        

Determines re-transmission time-out parameters, in milliseconds, for the association(s) given by assoc_id. @@ -586,11 +580,11 @@

   #sctp_assocparams{
         assoc_id                 = assoc_id(),
-        asocmaxrxt               = int(),
-        number_peer_destinations = int(),
-        peer_rwnd                = int(),
-        local_rwnd               = int(),
-        cookie_life              = int()
+        asocmaxrxt               = integer(),
+        number_peer_destinations = integer(),
+        peer_rwnd                = integer(),
+        local_rwnd               = integer(),
+        cookie_life              = integer()
   }        

Determines association parameters for the association(s) given by assoc_id. assoc_id = 0 (default) indicates @@ -601,10 +595,10 @@

   #sctp_initmsg{
-       num_ostreams   = int(),
-       max_instreams  = int(),
-       max_attempts   = int(),
-       max_init_timeo = int()
+       num_ostreams   = integer(),
+       max_instreams  = integer(),
+       max_attempts   = integer(),
+       max_init_timeo = integer()
   }        

Determines the default parameters which this socket attempts to negotiate with its peer while establishing an association with it. @@ -630,10 +624,11 @@

- {sctp_autoclose, int()|infinity} + {sctp_autoclose, integer() >= 0}

Determines the time (in seconds) after which an idle association is - automatically closed.

+ automatically closed. 0 means that the association is + never automatically closed.

{sctp_nodelay, true|false} @@ -655,7 +650,7 @@

Turns on|off automatic mapping of IPv4 addresses into IPv6 ones (if the socket address family is AF_INET6).

- {sctp_maxseg, int()} + {sctp_maxseg, integer()}

Determines the maximum chunk size if message fragmentation is used. If 0, the chunk size is limited by the Path MTU only.

@@ -693,7 +688,7 @@
   #sctp_setadaptation{
-        adaptation_ind = int()
+        adaptation_ind = integer()
   }        

When set, requests that the local endpoint uses the value given by adaptation_ind as the Adaptation Indication parameter for @@ -707,10 +702,10 @@ #sctp_paddrparams{ assoc_id = assoc_id(), address = {IP, Port}, - hbinterval = int(), - pathmaxrxt = int(), - pathmtu = int(), - sackdelay = int(), + hbinterval = integer(), + pathmaxrxt = integer(), + pathmtu = integer(), + sackdelay = integer(), flags = list() } IP = ip_address() @@ -771,14 +766,14 @@

   #sctp_sndrcvinfo{
-        stream     = int(),
-        ssn        = int(),
+        stream     = integer(),
+        ssn        = integer(),
         flags      = list(),
-        ppid       = int(),
-        context    = int(),
-        timetolive = int(),
-        tsn        = int(),
-        cumtsn     = int(),
+        ppid       = integer(),
+        context    = integer(),
+        timetolive = integer(),
+        tsn        = integer(),
+        cumtsn     = integer(),
         assoc_id   = assoc_id()
   }        

#sctp_sndrcvinfo{} is used both in this socket option, and as @@ -853,7 +848,7 @@

   #sctp_assoc_value{
         assoc_id    = assoc_id(),
-        assoc_value = int()
+        assoc_value = integer()
   }        

Rarely used. Determines the ACK time (given by assoc_value in milliseconds) for @@ -866,12 +861,12 @@ #sctp_status{ assoc_id = assoc_id(), state = atom(), - rwnd = int(), - unackdata = int(), - penddata = int(), - instrms = int(), - outstrms = int(), - fragmentation_point = int(), + rwnd = integer(), + unackdata = integer(), + penddata = integer(), + instrms = integer(), + outstrms = integer(), + fragmentation_point = integer(), primary = #sctp_paddrinfo{} }

This option is read-only. It determines the status of @@ -946,10 +941,10 @@ assoc_id = assoc_id(), address = {IP, Port}, state = inactive | active, - cwnd = int(), - srtt = int(), - rto = int(), - mtu = int() + cwnd = integer(), + srtt = integer(), + rto = integer(), + mtu = integer() } IP = ip_address() Port = port_number() @@ -1119,7 +1114,6 @@ client_loop(S, Peer1, Port1, AssocId1, Peer2, Port2, AssocId2) -> gen_udp(3), RFC2960 (Stream Control Transmission Protocol), Sockets API Extensions for SCTP.

- -- cgit v1.2.3