#include "config.h"
#include "stun_internal.h"
#include <assert.h>
#include <sofia-sip/su.h>
#include <sofia-sip/su_debug.h>
#include <sofia-sip/su_localinfo.h>
Include dependency graph for stun_common.c:

Functions | |
| stun_attr_t * | stun_get_attr (stun_attr_t *attr, uint16_t attr_type) |
| scan thru attribute list and return the next requested attr | |
| int | stun_encode_address (stun_attr_t *attr) |
| The set of functions encodes the corresponding attribute to network format, and save the result to the enc_buf. | |
| int | stun_encode_type_len (stun_attr_t *attr, uint16_t len) |
| this function allocates the enc_buf, fills in type, length | |
| int | stun_validate_message_integrity (stun_msg_t *msg, stun_buffer_t *pwd) |
| Validate the message integrity based on given STUN password 'pwd'. | |
| int | stun_encode_message (stun_msg_t *msg, stun_buffer_t *pwd) |
| Send a STUN message. | |
| char * | stun_determine_ip_address (int family) |
| Determines and returns local IP address. | |
| char* stun_determine_ip_address | ( | int | family | ) |
Determines and returns local IP address.
Address is determined using su_getlocalinfo() function.
| family | network address family in use |
| int stun_encode_address | ( | stun_attr_t * | attr | ) |
The set of functions encodes the corresponding attribute to network format, and save the result to the enc_buf.
Return the size of the buffer.
| int stun_encode_message | ( | stun_msg_t * | msg, | |
| stun_buffer_t * | pwd | |||
| ) |
Send a STUN message.
This will convert the stun_msg_t to the binary format based on the spec
| int stun_validate_message_integrity | ( | stun_msg_t * | msg, | |
| stun_buffer_t * | pwd | |||
| ) |
Validate the message integrity based on given STUN password 'pwd'.
The received content should be in msg->enc_buf.