James Kuszmaul | 6439136 | 2021-01-17 11:32:00 -0800 | [diff] [blame^] | 1 | #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 | */ |
| 12 | enum 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 | } |