libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws-stun.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LWS_STUN_MAGIC_COOKIE   0x2112A442
 
#define LWS_STUN_FINGERPRINT_XOR   0x5354554e
 

Enumerations

enum  lws_stun_req_type { LWS_STUNREQ_BINDING = 1 }
 
enum  lws_stun_attr_type { LWS_STUN_ATTR_USERNAME = 0x0006 }
 

Functions

LWS_VISIBLE LWS_EXTERN int lws_stun_req_pack (struct lws *wsi, enum lws_stun_req_type type, struct sockaddr_in *sa4, uint8_t *buf, size_t len, void *cookie)
 
LWS_VISIBLE LWS_EXTERN int lws_stun_validate_and_reply (struct lws *wsi, uint8_t *in, size_t in_len, uint8_t *out, size_t out_len, const char *password, const struct sockaddr_in *peer_sin)
 

Macro Definition Documentation

◆ LWS_STUN_MAGIC_COOKIE

#define LWS_STUN_MAGIC_COOKIE   0x2112A442

Definition at line 28 of file lws-stun.h.

◆ LWS_STUN_FINGERPRINT_XOR

#define LWS_STUN_FINGERPRINT_XOR   0x5354554e

Definition at line 29 of file lws-stun.h.

Enumeration Type Documentation

◆ lws_stun_req_type

Enumerator
LWS_STUNREQ_BINDING 

Definition at line 31 of file lws-stun.h.

31 {
33};
@ LWS_STUNREQ_BINDING
Definition lws-stun.h:32

◆ lws_stun_attr_type

Enumerator
LWS_STUN_ATTR_USERNAME 

Definition at line 35 of file lws-stun.h.

35 {
37};
@ LWS_STUN_ATTR_USERNAME
Definition lws-stun.h:36

Function Documentation

◆ lws_stun_req_pack()

LWS_VISIBLE LWS_EXTERN int lws_stun_req_pack ( struct lws * wsi,
enum lws_stun_req_type type,
struct sockaddr_in * sa4,
uint8_t * buf,
size_t len,
void * cookie )

References LWS_EXTERN, and LWS_VISIBLE.

◆ lws_stun_validate_and_reply()

LWS_VISIBLE LWS_EXTERN int lws_stun_validate_and_reply ( struct lws * wsi,
uint8_t * in,
size_t in_len,
uint8_t * out,
size_t out_len,
const char * password,
const struct sockaddr_in * peer_sin )