summaryrefslogtreecommitdiffstats
path: root/net/dccp/feat.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/feat.h')
-rw-r--r--net/dccp/feat.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/dccp/feat.h b/net/dccp/feat.h
index 093af16..a8ab9e1 100644
--- a/net/dccp/feat.h
+++ b/net/dccp/feat.h
@@ -125,4 +125,18 @@ extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk);
extern int dccp_feat_clone_list(struct list_head const *, struct list_head *);
extern int dccp_feat_init(struct sock *sk);
+/*
+ * Encoding variable-length options and their maximum length.
+ *
+ * This affects NN options (SP options are all u8) and other variable-length
+ * options (see table 3 in RFC 4340). The limit is currently given the Sequence
+ * Window NN value (sec. 7.5.2) and the NDP count (sec. 7.7) option, all other
+ * options consume less than 6 bytes (timestamps are 4 bytes).
+ * When updating this constant (e.g. due to new internet drafts / RFCs), make
+ * sure that you also update all code which refers to it.
+ */
+#define DCCP_OPTVAL_MAXLEN 6
+
+extern void dccp_encode_value_var(const u64 value, u8 *to, const u8 len);
+extern u64 dccp_decode_value_var(const u8 *bf, const u8 len);
#endif /* _DCCP_FEAT_H */
OpenPOWER on IntegriCloud