diff options
Diffstat (limited to 'Documentation/networking/dccp.txt')
-rw-r--r-- | Documentation/networking/dccp.txt | 52 |
1 files changed, 45 insertions, 7 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index a62fdf7a6bff..d718bc2ff1cf 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -1,18 +1,20 @@ | |||
1 | DCCP protocol | 1 | DCCP protocol |
2 | ============ | 2 | ============= |
3 | 3 | ||
4 | 4 | ||
5 | Contents | 5 | Contents |
6 | ======== | 6 | ======== |
7 | |||
8 | - Introduction | 7 | - Introduction |
9 | - Missing features | 8 | - Missing features |
10 | - Socket options | 9 | - Socket options |
10 | - Sysctl variables | ||
11 | - IOCTLs | ||
12 | - Other tunables | ||
11 | - Notes | 13 | - Notes |
12 | 14 | ||
15 | |||
13 | Introduction | 16 | Introduction |
14 | ============ | 17 | ============ |
15 | |||
16 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection | 18 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection |
17 | oriented protocol designed to solve issues present in UDP and TCP, particularly | 19 | oriented protocol designed to solve issues present in UDP and TCP, particularly |
18 | for real-time and multimedia (streaming) traffic. | 20 | for real-time and multimedia (streaming) traffic. |
@@ -29,22 +31,41 @@ It has a base protocol and pluggable congestion control IDs (CCIDs). | |||
29 | DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol | 31 | DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol |
30 | is at http://www.ietf.org/html.charters/dccp-charter.html | 32 | is at http://www.ietf.org/html.charters/dccp-charter.html |
31 | 33 | ||
34 | |||
32 | Missing features | 35 | Missing features |
33 | ================ | 36 | ================ |
34 | |||
35 | The Linux DCCP implementation does not currently support all the features that are | 37 | The Linux DCCP implementation does not currently support all the features that are |
36 | specified in RFCs 4340...42. | 38 | specified in RFCs 4340...42. |
37 | 39 | ||
38 | The known bugs are at: | 40 | The known bugs are at: |
39 | http://linux-net.osdl.org/index.php/TODO#DCCP | 41 | http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP |
40 | 42 | ||
41 | For more up-to-date versions of the DCCP implementation, please consider using | 43 | For more up-to-date versions of the DCCP implementation, please consider using |
42 | the experimental DCCP test tree; instructions for checking this out are on: | 44 | the experimental DCCP test tree; instructions for checking this out are on: |
43 | http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree | 45 | http://www.linuxfoundation.org/collaborate/workgroups/networking/dccp_testing#Experimental_DCCP_source_tree |
44 | 46 | ||
45 | 47 | ||
46 | Socket options | 48 | Socket options |
47 | ============== | 49 | ============== |
50 | DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes | ||
51 | a policy ID as argument and can only be set before the connection (i.e. changes | ||
52 | during an established connection are not supported). Currently, two policies are | ||
53 | defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special, | ||
54 | and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an | ||
55 | u32 priority value as ancillary data to sendmsg(), where higher numbers indicate | ||
56 | a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to | ||
57 | be formatted using a cmsg(3) message header filled in as follows: | ||
58 | cmsg->cmsg_level = SOL_DCCP; | ||
59 | cmsg->cmsg_type = DCCP_SCM_PRIORITY; | ||
60 | cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */ | ||
61 | |||
62 | DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero | ||
63 | value is always interpreted as unbounded queue length. If different from zero, | ||
64 | the interpretation of this parameter depends on the current dequeuing policy | ||
65 | (see above): the "simple" policy will enforce a fixed queue size by returning | ||
66 | EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the | ||
67 | lowest-priority packet first. The default value for this parameter is | ||
68 | initialised from /proc/sys/net/dccp/default/tx_qlen. | ||
48 | 69 | ||
49 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of | 70 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of |
50 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, | 71 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, |
@@ -112,6 +133,7 @@ DCCP_SOCKOPT_CCID_TX_INFO | |||
112 | On unidirectional connections it is useful to close the unused half-connection | 133 | On unidirectional connections it is useful to close the unused half-connection |
113 | via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. | 134 | via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. |
114 | 135 | ||
136 | |||
115 | Sysctl variables | 137 | Sysctl variables |
116 | ================ | 138 | ================ |
117 | Several DCCP default parameters can be managed by the following sysctls | 139 | Several DCCP default parameters can be managed by the following sysctls |
@@ -145,6 +167,7 @@ rx_ccid = 2 | |||
145 | seq_window = 100 | 167 | seq_window = 100 |
146 | The initial sequence window (sec. 7.5.2) of the sender. This influences | 168 | The initial sequence window (sec. 7.5.2) of the sender. This influences |
147 | the local ackno validity and the remote seqno validity windows (7.5.1). | 169 | the local ackno validity and the remote seqno validity windows (7.5.1). |
170 | Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set. | ||
148 | 171 | ||
149 | tx_qlen = 5 | 172 | tx_qlen = 5 |
150 | The size of the transmit buffer in packets. A value of 0 corresponds | 173 | The size of the transmit buffer in packets. A value of 0 corresponds |
@@ -155,15 +178,30 @@ sync_ratelimit = 125 ms | |||
155 | sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit | 178 | sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit |
156 | of this parameter is milliseconds; a value of 0 disables rate-limiting. | 179 | of this parameter is milliseconds; a value of 0 disables rate-limiting. |
157 | 180 | ||
181 | |||
158 | IOCTLS | 182 | IOCTLS |
159 | ====== | 183 | ====== |
160 | FIONREAD | 184 | FIONREAD |
161 | Works as in udp(7): returns in the `int' argument pointer the size of | 185 | Works as in udp(7): returns in the `int' argument pointer the size of |
162 | the next pending datagram in bytes, or 0 when no datagram is pending. | 186 | the next pending datagram in bytes, or 0 when no datagram is pending. |
163 | 187 | ||
188 | |||
189 | Other tunables | ||
190 | ============== | ||
191 | Per-route rto_min support | ||
192 | CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value | ||
193 | of the RTO timer. This setting can be modified via the 'rto_min' option | ||
194 | of iproute2; for example: | ||
195 | > ip route change 10.0.0.0/24 rto_min 250j dev wlan0 | ||
196 | > ip route add 10.0.0.254/32 rto_min 800j dev wlan0 | ||
197 | > ip route show dev wlan0 | ||
198 | CCID-3 also supports the rto_min setting: it is used to define the lower | ||
199 | bound for the expiry of the nofeedback timer. This can be useful on LANs | ||
200 | with very low RTTs (e.g., loopback, Gbit ethernet). | ||
201 | |||
202 | |||
164 | Notes | 203 | Notes |
165 | ===== | 204 | ===== |
166 | |||
167 | DCCP does not travel through NAT successfully at present on many boxes. This is | 205 | DCCP does not travel through NAT successfully at present on many boxes. This is |
168 | because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT | 206 | because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT |
169 | support for DCCP has been added. | 207 | support for DCCP has been added. |