From: Leandro <leandroal@gmail.com>
To: dccp@vger.kernel.org
Subject: [PATCH 23/25] Include ccid-4 to be visible for the DCCP feature negotiation mechanism
Date: Thu, 01 Nov 2007 00:32:06 +0000 [thread overview]
Message-ID: <200710312132.06341.leandroal@gmail.com> (raw)
[CCID-4] Include ccid-4 to be visible for the DCCP feature negotiation mechanism
This patch follow instructions announced by Gerrit and explained in http://www.mail-archive.com/dccp@vger.kernel.org/msg02613.html
Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Index: leandro.new/include/linux/dccp.h
=================================--- leandro.new.orig/include/linux/dccp.h
+++ leandro.new/include/linux/dccp.h
@@ -173,6 +173,7 @@ enum {
enum {
DCCPC_CCID2 = 2,
DCCPC_CCID3 = 3,
+ DCCPC_CCID4 = 4,
};
/* DCCP features (RFC 4340 section 6.4) */
Index: leandro.new/net/dccp/ccid.c
=================================--- leandro.new.orig/net/dccp/ccid.c
+++ leandro.new/net/dccp/ccid.c
@@ -18,6 +18,9 @@ static u8 builtin_ccids[] = {
#if defined(CONFIG_IP_DCCP_CCID3) || defined(CONFIG_IP_DCCP_CCID3_MODULE)
DCCPC_CCID3,
#endif
+#if defined(CONFIG_IP_DCCP_CCID4) || defined(CONFIG_IP_DCCP_CCID4_MODULE)
+ DCCPC_CCID4,
+#endif
};
static struct ccid_operations *ccids[CCID_MAX];
Index: leandro.new/net/dccp/feat.c
=================================--- leandro.new.orig/net/dccp/feat.c
+++ leandro.new/net/dccp/feat.c
@@ -483,7 +483,8 @@ static u8 dccp_feat_is_valid_sp_val(u8 f
{
switch (feat_num) {
case DCCPF_CCID:
- return (val = DCCPC_CCID2 || val = DCCPC_CCID3);
+ return (val = DCCPC_CCID2 || val = DCCPC_CCID3 ||
+ val = DCCPC_CCID4);
/* Type-check Boolean feature values: */
case DCCPF_SHORT_SEQNOS:
case DCCPF_ECN_INCAPABLE:
@@ -787,9 +788,65 @@ static const struct ccid_dependency *dcc
{ 0, 0, 0, 0 }
}
};
+ static const struct ccid_dependency ccid4_dependencies[2][5] = {
+ { /*
+ * Dependencies of the receiver-side CCID4
+ */
+ { /* locally disable Ack Vectors */
+ .dependent_feat = DCCPF_SEND_ACK_VECTOR,
+ .is_local = true,
+ .is_mandatory = false,
+ .val = 0
+ },
+ { /* see below why Send Loss Event Rate is on */
+ .dependent_feat = DCCPF_SEND_LEV_RATE,
+ .is_local = true,
+ .is_mandatory = true,
+ .val = 1
+ },
+ { /* NDP Count is needed as per RFC 4342, 6.1.1 */
+ .dependent_feat = DCCPF_SEND_NDP_COUNT,
+ .is_local = false,
+ .is_mandatory = true,
+ .val = 1
+ },
+ { 0, 0, 0, 0 },
+ },
+ {
+ /*
+ * Dependencies of the transmiter-side CCID4
+ */
+ {
+ .dependent_feat = DCCPF_SEND_ACK_VECTOR,
+ .is_local = false,
+ .is_mandatory = false,
+ .val = 0
+ },
+ {
+ .dependent_feat = DCCPF_SEND_LEV_RATE,
+ .is_local = false,
+ .is_mandatory = true,
+ .val = 1
+ },
+ { /* this CCID does not support Ack Ratio */
+ .dependent_feat = DCCPF_ACK_RATIO,
+ .is_local = true,
+ .is_mandatory = false,
+ .val = 0
+ },
+ { /* tell receiver we are sending NDP counts */
+ .dependent_feat = DCCPF_SEND_NDP_COUNT,
+ .is_local = true,
+ .is_mandatory = false,
+ .val = 1
+ },
+ { 0, 0, 0, 0 }
+ }
+ };
switch (ccid) {
case DCCPC_CCID2: return ccid2_dependencies[is_local];
case DCCPC_CCID3: return ccid3_dependencies[is_local];
+ case DCCPC_CCID4: return ccid4_dependencies[is_local];
default: return NULL; /* other CCIDs: no specifics yet */
}
}
next reply other threads:[~2007-11-01 0:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 0:32 Leandro [this message]
2007-11-06 17:20 ` [PATCH 23/25] Include ccid-4 to be visible for the DCCP feature negotiation mechanism Ian McDonald
2007-11-08 10:35 ` Gerrit Renker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710312132.06341.leandroal@gmail.com \
--to=leandroal@gmail.com \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox