#include <sofia-sip/su_localinfo.h>
Go to the source code of this file.
Defines | |
| #define | STUN_COMMON_H |
| Defined when <sofia-sip/stun_common.h> has been included. | |
| #define | STUN_A_LAST_MANDATORY |
| largest attribute in the current spec (see above for exceptions for buggy servers) | |
| #define | STUN_A_ALTERNATE_SERVER_DEP |
| historic from early fc3489bis drafts | |
| #define | STUN_A_BUGGYSERVER_XORONLY |
| workaround for stund-0.94 and older | |
| #define | STUN_A_BUGGYSERVER_SERVER |
| workaround for stund-0.94 and older | |
| #define | LARGEST_ATTRIBUTE |
| deprecated API | |
| #define | OPTIONAL_ATTRIBUTE |
| deprecated API | |
| #define | STUN_MAX_RETRX_INT |
| max retrx interval in millisec | |
| #define | STUN_DEFAULT_PORT |
| from RFC3489 | |
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. | |
| #define STUN_COMMON_H |
Defined when <sofia-sip/stun_common.h> has been included.
| 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.