blob: f84ff7039cfb0342e314dfbfd9a2903f0263eeaf [file] [log] [blame]
James Kuszmaul64391362021-01-17 11:32:00 -08001#include "capabilities.h"
2#include <rawrtcdc/sctp_capabilities.h>
3#include <rawrtcc/code.h>
4#include <re.h>
5
6/*
7 * Get the SCTP parameter's maximum message size value.
8 *
9 * Note: A value of `0` indicates that the implementation supports
10 * receiving messages of arbitrary size.
11 */
12enum rawrtc_code rawrtc_sctp_capabilities_get_max_message_size(
13 uint64_t* const max_message_sizep, // de-referenced
14 struct rawrtc_sctp_capabilities* const capabilities) {
15 // Check arguments
16 if (!capabilities) {
17 return RAWRTC_CODE_INVALID_ARGUMENT;
18 }
19
20 // Set value
21 *max_message_sizep = capabilities->max_message_size;
22 return RAWRTC_CODE_SUCCESS;
23}