26 #ifndef _ASTERISK_STUN_H 27 #define _ASTERISK_STUN_H 32 #if defined(__cplusplus) || defined(c_plusplus) 37 #define AST_LOG_CATEGORY_STUN "stun" 39 #define AST_LOG_CATEGORY_STUN_PACKET "stun_packet" 44 #define AST_DEBUG_CATEGORY_STUN ast_debug_category_stun_id() 45 #define AST_DEBUG_CATEGORY_STUN_PACKET ast_debug_category_stun_packet_id() 53 #define ast_debug_stun(sublevel, ...) \ 54 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_STUN, __VA_ARGS__) 57 #define ast_debug_stun_packet_is_allowed \ 58 ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_STUN_PACKET) 119 #if defined(__cplusplus) || defined(c_plusplus) uintmax_t ast_debug_category_stun_id(void)
int ast_stun_handle_packet(int s, struct sockaddr_in *src, unsigned char *data, size_t len, stun_cb_f *stun_cb, void *arg)
handle an incoming STUN message.
static const int STANDARD_STUN_PORT
int ast_stun_request(int s, struct sockaddr_in *dst, const char *username, struct sockaddr_in *answer)
Generic STUN request.
static int answer(void *data)
Wrapper for network related headers, masking differences between various operating systems...
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
int() stun_cb_f(struct stun_attr *attr, void *arg)
callback type to be invoked on stun responses.
uintmax_t ast_debug_category_stun_packet_id(void)