25#ifndef STUN_INTERNAL_H
27#define STUN_INTERNAL_H
52#if defined(HAVE_OPENSSL)
54#define OPENSSL_NO_KRB5
55#include <openssl/sha.h>
56#include <openssl/hmac.h>
57#include <openssl/ssl.h>
58#include <openssl/x509.h>
67#define SU_LOG (stun_log)
70#define enter (void)SU_DEBUG_9(("%s: entering.\n", __func__))
75extern char const STUN_DEBUG[];
80#define STUN_LIFETIME_EST 3500
81#define STUN_LIFETIME_MAX 18000
82#define STUN_LIFETIME_CI 50
84#define STUN_LIFETIME_EST 350
85#define STUN_LIFETIME_MAX 1800
86#define STUN_LIFETIME_CI 5
89#define STUN_ERROR(err, what) \
90 SU_DEBUG_5(("%s: %s: %s\n", __func__, #what, su_strerror(err))), \
98int stun_send_message(
su_socket_t s, su_sockaddr_t *srvr,
99 stun_msg_t *msg, stun_buffer_t *pwd);
101void stun_free_message_data(stun_msg_t *msg);
106int stun_process_response(stun_msg_t *msg);
112int stun_add_response_address(stun_msg_t *req,
struct sockaddr_in *mapped_addr);
STUN module public interface.
int stun_atoaddr(su_home_t *home, int ai_family, su_addrinfo_t *info, char const *in)
Converts character address format to sockaddr_in.
Definition stun.c:2593
int stun_process_error_response(stun_msg_t *msg)
process binding error response Report error and return
Definition stun.c:2535
int stun_make_binding_req(stun_handle_t *se, stun_request_t *req, stun_msg_t *msg, tag_type_t, tag_value_t,...)
Compose a STUN message of the format defined by stun_msg_t.
Definition stun.c:2403
int stun_process_binding_response(stun_msg_t *msg)
process binding response
Definition stun.c:2526
int stun_make_sharedsecret_req(stun_msg_t *msg)
Compose a STUN message of the format defined by stun_msg_t result encoded in enc_buf ready for sendin...
Definition stun.c:1577
int stun_is_requested(tag_type_t tag, tag_value_t value,...)
Check if a STUN handle should be created.
Definition stun.c:400
struct addrinfo su_addrinfo_t
struct tag_type_s const * tag_type_t