27#ifndef _ASTERISK_STUN_H
28#define _ASTERISK_STUN_H
33#if defined(__cplusplus) || defined(c_plusplus)
38#define AST_LOG_CATEGORY_STUN "stun"
40#define AST_LOG_CATEGORY_STUN_PACKET "stun_packet"
45#define AST_DEBUG_CATEGORY_STUN ast_debug_category_stun_id()
46#define AST_DEBUG_CATEGORY_STUN_PACKET ast_debug_category_stun_packet_id()
54#define ast_debug_stun(sublevel, ...) \
55 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_STUN, __VA_ARGS__)
58#define ast_debug_stun_packet_is_allowed \
59 ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_STUN_PACKET)
120#if defined(__cplusplus) || defined(c_plusplus)
static int answer(void *data)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Wrapper for network related headers, masking differences between various operating systems....
uintmax_t ast_debug_category_stun_id(void)
int ast_stun_request(int s, struct sockaddr_in *dst, const char *username, struct sockaddr_in *answer)
Generic STUN request.
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.
uintmax_t ast_debug_category_stun_packet_id(void)
int() stun_cb_f(struct stun_attr *attr, void *arg)
callback type to be invoked on stun responses.
static const int STANDARD_STUN_PORT