Squashed 'third_party/rawrtc/rawrtc/' content from commit aa3ae4b24

Change-Id: I38a655a4259b62f591334e90a1315bd4e7e4d8ec
git-subtree-dir: third_party/rawrtc/rawrtc
git-subtree-split: aa3ae4b247275cc6e69c30613b3a4ba7fdc82d1b
diff --git a/tools/helper/parameters.h b/tools/helper/parameters.h
new file mode 100644
index 0000000..bc6a5aa
--- /dev/null
+++ b/tools/helper/parameters.h
@@ -0,0 +1,67 @@
+#pragma once
+#include "common.h"
+#include <rawrtc.h>
+#include <rawrtcc.h>
+#include <rawrtcdc.h>
+#include <re.h>
+
+/*
+ * Set ICE parameters in dictionary.
+ */
+void set_ice_parameters(struct rawrtc_ice_parameters* const parameters, struct odict* const dict);
+
+/*
+ * Set ICE candidates in dictionary.
+ */
+void set_ice_candidates(struct rawrtc_ice_candidates* const parameters, struct odict* const array);
+
+/*
+ * Set DTLS parameters in dictionary.
+ */
+void set_dtls_parameters(struct rawrtc_dtls_parameters* const parameters, struct odict* const dict);
+
+/*
+ * Set SCTP parameters in dictionary.
+ */
+void set_sctp_parameters(
+    struct rawrtc_sctp_transport* const transport,
+    struct sctp_parameters* const parameters,
+    struct odict* const dict);
+
+#if RAWRTC_HAVE_SCTP_REDIRECT_TRANSPORT
+/*
+ * Set SCTP redirect parameters in dictionary.
+ */
+void set_sctp_redirect_parameters(
+    struct rawrtc_sctp_redirect_transport* const transport,
+    struct sctp_parameters* const parameters,
+    struct odict* const dict);
+#endif
+
+/*
+ * Get ICE parameters from dictionary.
+ */
+enum rawrtc_code get_ice_parameters(
+    struct rawrtc_ice_parameters** const parametersp, struct odict* const dict);
+
+/*
+ * Get ICE candidates from dictionary.
+ * Filter by enabled ICE candidate types if `client` argument is set to
+ * non-NULL.
+ */
+enum rawrtc_code get_ice_candidates(
+    struct rawrtc_ice_candidates** const candidatesp,
+    struct odict* const dict,
+    struct client* const client);
+
+/*
+ * Get DTLS parameters from dictionary.
+ */
+enum rawrtc_code get_dtls_parameters(
+    struct rawrtc_dtls_parameters** const parametersp, struct odict* const dict);
+
+/*
+ * Get SCTP parameters from dictionary.
+ */
+enum rawrtc_code get_sctp_parameters(
+    struct sctp_parameters* const parameters, struct odict* const dict);