aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid2.c
diff options
context:
space:
mode:
authorGerrit Renker <[email protected]>2007-10-04 21:39:22 +0000
committerDavid S. Miller <[email protected]>2007-10-10 23:54:31 +0000
commit7c559a9e44ee61faf2f339604ce708decb345a93 (patch)
tree8e0e89521445a42cf801747af20be172b6e9e582 /net/dccp/ccids/ccid2.c
parent[DCCP]: Wait for CCID (diff)
downloadkernel-7c559a9e44ee61faf2f339604ce708decb345a93.tar.gz
kernel-7c559a9e44ee61faf2f339604ce708decb345a93.zip
[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 <[email protected]> Signed-off-by: Ian McDonald <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
0 files changed, 0 insertions, 0 deletions