+/* Check whether the host supports the requested 'ccid' arguments. */
+static int dccp_recv_ccid_support_check(const struct lls_parse_result *lpr)
+{
+ uint8_t *ccids;
+ int i, j, ret, nccids;
+ unsigned given = RECV_CMD_OPT_GIVEN(DCCP, CCID, lpr);
+
+ ret = dccp_available_ccids(&ccids);
+ if (ret < 0)
+ return ret;
+ nccids = ret;
+ for (i = 0; i < given; i++) {
+ uint32_t val = lls_uint32_val(i,
+ RECV_CMD_OPT_RESULT(DCCP, CCID, lpr));
+ for (j = 0; j < nccids && ccids[j] != val; j++)
+ ;
+ if (j == nccids) {
+ PARA_ERROR_LOG("'CCID-%u' not supported on this host\n",
+ val);
+ return -ERRNO_TO_PARA_ERROR(EINVAL);
+ }
+ }
+ return 1;
+}
+
+/** Flowopt shortcut */
+#define OPT_ADD(fo, lev, opt, val, len) flowopt_add(fo, lev, opt, #opt, val, len)
+