Commit 5aed3243 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[DCCP]: Tidy up unused structures

This removes and cleans up unused variables and structures which have become
unnecessary following the introduction of the EWMA patch to automatically track
the CCID 3 receiver/sender packet sizes `s'.

It deprecates the PACKET_SIZE socket option by returning an error code and
printing a deprecation warning if an application tries to read or write this
socket option.
Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 78ad713d
...@@ -200,7 +200,7 @@ struct dccp_so_feat { ...@@ -200,7 +200,7 @@ struct dccp_so_feat {
}; };
/* DCCP socket options */ /* DCCP socket options */
#define DCCP_SOCKOPT_PACKET_SIZE 1 #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
#define DCCP_SOCKOPT_SERVICE 2 #define DCCP_SOCKOPT_SERVICE 2
#define DCCP_SOCKOPT_CHANGE_L 3 #define DCCP_SOCKOPT_CHANGE_L 3
#define DCCP_SOCKOPT_CHANGE_R 4 #define DCCP_SOCKOPT_CHANGE_R 4
...@@ -460,7 +460,6 @@ struct dccp_ackvec; ...@@ -460,7 +460,6 @@ struct dccp_ackvec;
* @dccps_service_list - second .. last service code on passive socket * @dccps_service_list - second .. last service code on passive socket
* @dccps_timestamp_time - time of latest TIMESTAMP option * @dccps_timestamp_time - time of latest TIMESTAMP option
* @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
* @dccps_packet_size - Set thru setsockopt
* @dccps_l_ack_ratio - * @dccps_l_ack_ratio -
* @dccps_r_ack_ratio - * @dccps_r_ack_ratio -
* @dccps_pcslen - sender partial checksum coverage (via sockopt) * @dccps_pcslen - sender partial checksum coverage (via sockopt)
...@@ -495,7 +494,6 @@ struct dccp_sock { ...@@ -495,7 +494,6 @@ struct dccp_sock {
struct dccp_service_list *dccps_service_list; struct dccp_service_list *dccps_service_list;
struct timeval dccps_timestamp_time; struct timeval dccps_timestamp_time;
__u32 dccps_timestamp_echo; __u32 dccps_timestamp_echo;
__u32 dccps_packet_size;
__u16 dccps_l_ack_ratio; __u16 dccps_l_ack_ratio;
__u16 dccps_r_ack_ratio; __u16 dccps_r_ack_ratio;
__u16 dccps_pcslen; __u16 dccps_pcslen;
......
...@@ -42,10 +42,6 @@ ...@@ -42,10 +42,6 @@
#include <linux/tfrc.h> #include <linux/tfrc.h>
#include "../ccid.h" #include "../ccid.h"
#define TFRC_MIN_PACKET_SIZE 16
#define TFRC_STD_PACKET_SIZE 256
#define TFRC_MAX_PACKET_SIZE 65535
/* Two seconds as per RFC 3448 4.2 */ /* Two seconds as per RFC 3448 4.2 */
#define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC) #define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC)
......
...@@ -470,7 +470,8 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, ...@@ -470,7 +470,8 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
lock_sock(sk); lock_sock(sk);
switch (optname) { switch (optname) {
case DCCP_SOCKOPT_PACKET_SIZE: case DCCP_SOCKOPT_PACKET_SIZE:
dp->dccps_packet_size = val; DCCP_WARN("sockopt(PACKET_SIZE) is deprecated: fix your app\n");
err = -EINVAL;
break; break;
case DCCP_SOCKOPT_CHANGE_L: case DCCP_SOCKOPT_CHANGE_L:
if (optlen != sizeof(struct dccp_so_feat)) if (optlen != sizeof(struct dccp_so_feat))
...@@ -581,9 +582,8 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname, ...@@ -581,9 +582,8 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
switch (optname) { switch (optname) {
case DCCP_SOCKOPT_PACKET_SIZE: case DCCP_SOCKOPT_PACKET_SIZE:
val = dp->dccps_packet_size; DCCP_WARN("sockopt(PACKET_SIZE) is deprecated: fix your app\n");
len = sizeof(dp->dccps_packet_size); return -EINVAL;
break;
case DCCP_SOCKOPT_SERVICE: case DCCP_SOCKOPT_SERVICE:
return dccp_getsockopt_service(sk, len, return dccp_getsockopt_service(sk, len,
(__be32 __user *)optval, optlen); (__be32 __user *)optval, optlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment