|
cwist
Modern C web framework with libttak runtime
|
Minimal SDP (RFC 4566) parse/generate for DataChannel offers/answers. More...

Go to the source code of this file.
Functions | |
| int | cwist_sdp_parse (const char *sdp, size_t len, cwist_sdp_info *info) |
| Parse an SDP blob into a cwist_sdp_info structure. | |
| int | cwist_sdp_write_answer (char *out, size_t cap, const char *fingerprint, const char *ufrag, const char *pwd, const char *mid, const char *host, uint16_t port) |
| Generate an SDP answer for an ICE-lite DataChannel endpoint. | |
| int | cwist_sdp_write_offer (char *out, size_t cap, const char *fingerprint, const char *ufrag, const char *pwd, const char *mid) |
| Generate an SDP offer for a full (non-lite) DataChannel endpoint. | |
Minimal SDP (RFC 4566) parse/generate for DataChannel offers/answers.
Supports only the subset of SDP needed for a single SCTP DataChannel m-section: ICE credentials, DTLS fingerprint/setup, mid, and ice-lite. Parsing extracts fields into a cwist_sdp_info struct; generation produces offer or answer strings with CRLF line endings.
Definition in file sdp.c.
| int cwist_sdp_parse | ( | const char * | sdp, |
| size_t | len, | ||
| cwist_sdp_info * | info | ||
| ) |
Parse an SDP blob into a cwist_sdp_info structure.
Parse the fields the ICE-lite agent needs from an SDP description.
| sdp | SDP text (not required to be NUL-terminated). |
| len | Length of sdp in bytes. |
| info | Output structure; zeroed first, then filled from recognized lines. |
Definition at line 43 of file sdp.c.
References cap.
Referenced by cwist_webrtc_handle_offer().
| int cwist_sdp_write_answer | ( | char * | out, |
| size_t | cap, | ||
| const char * | fingerprint, | ||
| const char * | ufrag, | ||
| const char * | pwd, | ||
| const char * | mid, | ||
| const char * | host, | ||
| uint16_t | port | ||
| ) |
Generate an SDP answer for an ICE-lite DataChannel endpoint.
Write an ICE-lite, DTLS-passive DataChannel answer.
| out | Output buffer, receives CRLF-terminated SDP answer. |
| cap | Capacity of out in bytes. |
| fingerprint | DTLS certificate fingerprint (hex, colon-separated). |
| ufrag | ICE username fragment. |
| pwd | ICE password. |
| mid | Media section ID (also used in the BUNDLE group). |
| host | Local host address for the a=candidate line. |
| port | Local UDP port for the a=candidate line. |
Definition at line 129 of file sdp.c.
References cap.
Referenced by cwist_webrtc_handle_offer().
| int cwist_sdp_write_offer | ( | char * | out, |
| size_t | cap, | ||
| const char * | fingerprint, | ||
| const char * | ufrag, | ||
| const char * | pwd, | ||
| const char * | mid | ||
| ) |
Generate an SDP offer for a full (non-lite) DataChannel endpoint.
Write a DTLS-active DataChannel offer (loopback tests).
| out | Output buffer, receives CRLF-terminated SDP offer. |
| cap | Capacity of out in bytes. |
| fingerprint | DTLS certificate fingerprint (hex, colon-separated). |
| ufrag | ICE username fragment. |
| pwd | ICE password. |
| mid | Media section ID (also used in the BUNDLE group). |
Definition at line 168 of file sdp.c.
References cap.