Commit 6cda30b2 authored by Martti Mela's avatar Martti Mela
Browse files

added stun_internal.h

parent 997d3d30
* This file is part of the Sofia-SIP package
* Copyright (C) 2005 Nokia Corporation.
* Contact: Pekka Pessi <>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
#ifndef STUN_INTERNAL_H /** Defined when stun_internal.h has been included. */
/**@file stun_internal.h STUN client interface
* @author Tat Chan <>
* @author Pekka Pessi <>
* @author Kai Vehmanen <>
#ifndef SU_WAIT_H
#include <su_wait.h>
#ifndef SU_TAG_H
#include <su_tag.h>
#include "stun_common.h"
#ifndef STUN_H
#include "stun.h"
#define STUN_LIFETIME_EST 350 /**< 6 min? */
#define STUN_LIFETIME_MAX 1800 /**< 30 min? */
#define STUN_LIFETIME_CI 5 /**< 5 sec confidence interval */
int stun_is_requested(tag_type_t tag, tag_value_t value, ...);
int stun_poll(stun_socket_t *ss);
int stun_get_lifetime(stun_socket_t *ss,
struct sockaddr *my_addr, int *addrlen,
int *lifetime);
/** other functions */
int stun_set_uname_pwd(stun_engine_t *se, const char *uname, int len_uname,
const char *pwd, int len_pwd);
/* internal functions declaration */
int stun_get_sharedsecret(stun_engine_t *se);
int stun_make_sharedsecret_req(stun_msg_t *msg);
int stun_bind_test(stun_socket_t *ss, struct sockaddr_in *srvr, struct sockaddr_in *cli,
int chg_ip, int chg_port);
int stun_send_message2(stun_socket_t *ss, struct sockaddr_in *srvr, stun_msg_t *msg); /* client version */
int stun_make_binding_req(stun_socket_t *ss, stun_msg_t *msg, int chg_ip, int chg_port);
int stun_process_response(stun_msg_t *msg);
int stun_process_binding_response(stun_msg_t *msg);
int stun_process_error_response(stun_msg_t *msg);
int stun_atoaddr(struct sockaddr_in *addr, char const *in);
int stun_add_response_address(stun_msg_t *req, struct sockaddr_in *mapped_addr);
#endif /* !defined(STUN_INTERNAL_H) */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment