stun_internal.h File Reference


Detailed Description

STUN client interface.

Author:
Martti Mela <martti.mela@nokia-email.address.hidden>

Tat Chan <Tat.Chan@nokia-email.address.hidden>

Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>

Kai Vehmanen <kai.vehmanen@nokia-email.address.hidden>

#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_tag.h>
#include <sofia-sip/su_debug.h>
#include "sofia-sip/stun.h"

Include dependency graph for stun_internal.h:

Go to the source code of this file.

Defines

#define STUN_LIFETIME_EST
 6 min?
#define STUN_LIFETIME_MAX
 30 min?
#define STUN_LIFETIME_CI
 5 sec confidence interval

Functions

int stun_is_requested (tag_type_t tag, tag_value_t value,...)
 Check if a STUN handle should be created.
int stun_set_uname_pwd (stun_handle_t *se, const char *uname, int len_uname, const char *pwd, int len_pwd)
 other functions
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 sending as well.
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.
int stun_process_binding_response (stun_msg_t *msg)
 process binding response
int stun_process_error_response (stun_msg_t *msg)
 process binding error response Report error and return
int stun_atoaddr (su_home_t *home, int ai_family, su_addrinfo_t *info, char const *in)
 Converts character address format to sockaddr_in.


Function Documentation

int stun_is_requested ( tag_type_t  tag,
tag_value_t  value,
  ... 
)

Check if a STUN handle should be created.

Return true if STUNTAG_SERVER() or STUNTAG_DOMAIN() tags have been specified, or otherwise if STUN_SERVER environment variable is set.

Related Tags:
STUNTAG_DOMAIN() domain to use in DNS-SRV based STUN server
STUNTAG_SERVER() stun server hostname or dotted IPv4 address
Parameters:
tag,value,... tag-value list


Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.