BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB-UTIL Reference

stun_simple.h File Reference

STUN client. More...

Go to the source code of this file.

Data Structures

struct  pjstun_msg_hdr
 
struct  pjstun_attr_hdr
 
struct  pjstun_mapped_addr_attr
 
struct  pjstun_change_request_attr
 
struct  pjstun_username_attr
 
struct  pjstun_error_code_attr
 
struct  pjstun_msg
 
struct  pjstun_setting
 

Typedefs

typedef pjstun_mapped_addr_attr pjstun_response_addr_attr
 
typedef pjstun_mapped_addr_attr pjstun_changed_addr_attr
 
typedef pjstun_mapped_addr_attr pjstun_src_addr_attr
 
typedef pjstun_mapped_addr_attr pjstun_reflected_form_attr
 
typedef pjstun_username_attr pjstun_password_attr
 

Enumerations

enum  pjstun_msg_type {
  PJSTUN_BINDING_REQUEST = 0x0001 , PJSTUN_BINDING_RESPONSE = 0x0101 , PJSTUN_BINDING_ERROR_RESPONSE = 0x0111 , PJSTUN_SHARED_SECRET_REQUEST = 0x0002 ,
  PJSTUN_SHARED_SECRET_RESPONSE = 0x0102 , PJSTUN_SHARED_SECRET_ERROR_RESPONSE = 0x0112
}
 
enum  pjstun_attr_type {
  PJSTUN_ATTR_MAPPED_ADDR = 1 , PJSTUN_ATTR_RESPONSE_ADDR , PJSTUN_ATTR_CHANGE_REQUEST , PJSTUN_ATTR_SOURCE_ADDR ,
  PJSTUN_ATTR_CHANGED_ADDR , PJSTUN_ATTR_USERNAME , PJSTUN_ATTR_PASSWORD , PJSTUN_ATTR_MESSAGE_INTEGRITY ,
  PJSTUN_ATTR_ERROR_CODE , PJSTUN_ATTR_UNKNOWN_ATTRIBUTES , PJSTUN_ATTR_REFLECTED_FROM , PJSTUN_ATTR_XOR_MAPPED_ADDR = 0x0020
}
 

Functions

pj_status_t pjstun_create_bind_req (pj_pool_t *pool, void **msg, pj_size_t *len, pj_uint32_t id_hi, pj_uint32_t id_lo)
 
pj_status_t pjstun_parse_msg (void *buf, pj_size_t len, pjstun_msg *msg)
 
void * pjstun_msg_find_attr (pjstun_msg *msg, pjstun_attr_type t)
 
pj_status_t pjstun_get_mapped_addr (pj_pool_factory *pf, int sock_cnt, pj_sock_t sock[], const pj_str_t *srv1, int port1, const pj_str_t *srv2, int port2, pj_sockaddr_in mapped_addr[])
 
pj_status_t pjstun_get_mapped_addr2 (pj_pool_factory *pf, const pjstun_setting *opt, int sock_cnt, pj_sock_t sock[], pj_sockaddr_in mapped_addr[])
 

Detailed Description

STUN client.

Enumeration Type Documentation

◆ pjstun_attr_type

This enumeration describes STUN attribute types.

◆ pjstun_msg_type

This enumeration describes STUN message types.

Enumerator
PJSTUN_BINDING_REQUEST 

Binding request

PJSTUN_BINDING_RESPONSE 

Binding response

PJSTUN_BINDING_ERROR_RESPONSE 

Binding error

PJSTUN_SHARED_SECRET_REQUEST 

Secret request

PJSTUN_SHARED_SECRET_RESPONSE 

Secret response

PJSTUN_SHARED_SECRET_ERROR_RESPONSE 

Secret error

 


PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.