ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
stun.h
Go to the documentation of this file.
33
34#pragma once
35
36#include <stdint.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42// Pack network protocol structures tightly for wire format
43#ifdef _WIN32
44#pragma pack(push, 1)
45#define ASCIICHAT_STUN_PACKED
46#else
47#define ASCIICHAT_STUN_PACKED __attribute__((packed))
48#endif
49
76#define STUN_URL_BUFFER_SIZE 64
77
78typedef struct ASCIICHAT_STUN_PACKED {
79 uint8_t host_len;
80 char host[STUN_URL_BUFFER_SIZE];
82
88
90#define STUN_DEFAULT_PORT 3478
91
93#define STUN_TLS_DEFAULT_PORT 5349
94
96
120int stun_servers_parse(const char *csv_servers, const char *default_csv, stun_server_t *out_servers, int max_count);
121
122#ifdef _WIN32
123#pragma pack(pop)
124#endif
125#undef ASCIICHAT_STUN_PACKED
126
127#ifdef __cplusplus
128}
129#endif
130 /* stun */
unsigned char uint8_t
#define ASCIICHAT_STUN_PACKED
Definition stun.h:47
stun_server_t
Definition stun.h:81
int stun_servers_parse(const char *csv_servers, const char *default_csv, stun_server_t *out_servers, int max_count)
Parse comma-separated STUN server URLs into stun_server_t array.
Definition stun.c:45
#define STUN_URL_BUFFER_SIZE
STUN server configuration.
Definition stun.h:76