+#ifndef SOCK_DCCP
+#define SOCK_DCCP 6 /**< Linux socket type. */
+#endif
+
+#ifndef DCCP_SOCKOPT_RX_CCID
+/** Per-connection CCID support (set/get the RX CCID, since v2.6.30-rc1). */
+#define DCCP_SOCKOPT_RX_CCID 15
+#endif
+
+#ifndef SOL_DCCP
+#define SOL_DCCP 269 /**< Linux socket level. */
+#endif
+
+#ifndef DCCP_SOCKOPT_AVAILABLE_CCIDS
+#define DCCP_SOCKOPT_AVAILABLE_CCIDS 12 /**< List of supported CCIDs. */
+#endif
+
+#ifndef DCCP_SOCKOPT_CCID
+#define DCCP_SOCKOPT_CCID 13 /**< Sets both TX/RX CCID. */
+#endif
+
+#ifndef DCCP_SOCKOPT_TX_CCID
+#define DCCP_SOCKOPT_TX_CCID 14 /**< Set/get the TX CCID. */
+#endif
+
+/**
+ * Flowopts: Transport-layer independent encapsulation of socket options
+ * that need to be registered prior to setting up a connection.
+ */
+struct flowopts;
+
+extern struct flowopts *flowopt_new(void);
+extern void flowopt_add(struct flowopts *fo, int level, int opt,
+ char *name, const void *val, int len);
+extern void flowopt_add_bool(struct flowopts *fo, int lev, int opt,
+ char *optname, bool on_or_off);
+/** Flowopt shortcut macros */
+#define OPT_ADD(fo, lev, opt, val, len) flowopt_add(fo, lev, opt, #opt, val, len)
+#define OPT_ENABLE(fo, lev, opt) flowopt_add_bool(fo, lev, opt, #opt, 1)
+#define OPT_DISABLE(fo, lev, opt) flowopt_add_bool(fo, lev, opt, #opt, 0)