diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-10-04 17:39:22 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:31 -0400 |
commit | 7c559a9e44ee61faf2f339604ce708decb345a93 (patch) | |
tree | 8e0e89521445a42cf801747af20be172b6e9e582 /Documentation/networking/dccp.txt | |
parent | bc8498721dfe3f7d537f4f75302be7dbe9c7b939 (diff) |
[DCCP]: Add socket option to query the current MPS
This enables applications to query the current value of the Maximum
Packet Size via a socket option, suggested as a SHOULD in (RFC 4340,
p. 102).
This socket option is useful to avoid the annoying bail-out via
`-EMSGSIZE'. In particular, as fragmentation is not currently
supported (and its use is partly discouraged in RFC 4340).
With this option, it is possible to size buffers accordingly, e.g.
int buflen = dccp_get_cur_mps(sockfd);
/* or */
if (msgsize > dccp_get_cur_mps(sockfd))
die("message is too large for this path");
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/dccp.txt')
-rw-r--r-- | Documentation/networking/dccp.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 477026ae0ffb..f9157180f7d8 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -41,6 +41,9 @@ the socket will fall back to 0 (which means that no meaningful service code | |||
41 | is present). Connecting sockets set at most one service option; for | 41 | is present). Connecting sockets set at most one service option; for |
42 | listening sockets, multiple service codes can be specified. | 42 | listening sockets, multiple service codes can be specified. |
43 | 43 | ||
44 | DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet | ||
45 | size (application payload size) in bytes, see RFC 4340, section 14. | ||
46 | |||
44 | DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the | 47 | DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the |
45 | partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums | 48 | partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums |
46 | always cover the entire packet and that only fully covered application data is | 49 | always cover the entire packet and that only fully covered application data is |