+
+static char *dccp_status(void)
+{
+ char *status = generic_sender_status(dss, "dccp");
+ char *result = make_message("%ssupported ccids: %s\n", status,
+ dccp_list_available_ccids());
+ free(status);
+ return result;
+}
+
+/*
+ * Initialize the client list and the access control list and listen on the
+ * dccp port.
+ */
+static void dccp_send_init(void)
+{
+ init_sender_status(dss, OPT_RESULT(DCCP_ACCESS),
+ OPT_RESULT(DCCP_LISTEN_ADDRESS),
+ OPT_UINT32_VAL(DCCP_PORT), OPT_UINT32_VAL(DCCP_MAX_CLIENTS),
+ OPT_GIVEN(DCCP_DEFAULT_DENY));
+ generic_com_on(dss, IPPROTO_DCCP);
+}
+
+/**
+ * The DCCP sender.
+ *
+ * This sender offers congestion control not available in plain TCP. Most
+ * methods of the sender structure are implemented as simple wrappers for the
+ * generic functions defined in \ref send_common.c. Like UDP streams, DCCP
+ * streams are sent FEC-encoded.
+ */
+const struct sender dccp_sender = {
+ .name = "dccp",
+ .init = dccp_send_init,
+ .shutdown = dccp_shutdown,
+ .pre_select = dccp_pre_select,
+ .post_select = dccp_post_select,
+ .shutdown_clients = dccp_shutdown_clients,
+ .client_cmds = {
+ [SENDER_on] = dccp_com_on,
+ [SENDER_off] = dccp_com_off,
+ [SENDER_deny] = dccp_com_deny,
+ [SENDER_allow] = dccp_com_allow,
+ },
+ .help = generic_sender_help,
+ .status = dccp_status,
+};