amsip network interface
[General purpose API.]


Functions

int am_network_guess_ip (int family, char *address, int size)
int am_network_masquerade (const char *ip, int port)
int am_network_start (const char *transport, int port)
int am_network_connection_tests (struct stun_test *stuntest, char *stun_server, int srcport)
int am_network_add_local_candidates (struct SdpCandidate *_candidates, int srcport)
int am_network_add_stun_candidates (struct SdpCandidate *candidates, struct SdpCandidate *localcandidates, char *stun_server, int srcport)
int am_network_add_turn_candidates (struct SdpCandidate *candidates, char *turn_server, int srcport)
int am_network_add_relay_candidates (struct SdpCandidate *candidates, char *relay_server, int srcport)
char * am_network_test_nat (const char *stun_server, int port, const char *proxy)
char * am_network_get_nat_info (const char *stun_server, int srcport)
int am_network_get_nat (char *stun_server, int srcport)

Function Documentation

int am_network_guess_ip ( int  family,
char *  address,
int  size 
)

Find default address of interface to reach the defined gateway.

Parameters:
family AF_INET or AF_INET6
address a string containing the local IP address.
size The size of the string

int am_network_masquerade ( const char *  ip,
int  port 
)

Configure amsip to do masquerading on SIP Contact address. at run time.

PLEASE DO NOT USE UNLESS YOU REALLY UNDERSTAND THIS OPTION! THIS OPTIONS CANNOT BE USED IF YOU CONFIGURED THE STACK WITH STUN or ICE SUPPORT.

Parameters:
IP IP to appear in Contact.
port port to appear in Contact.

int am_network_start ( const char *  transport,
int  port 
)

Configure amsip to listen on a specific transport layer.

Parameters:
transport Transport Protocol to use ("UDP", "TCP", "TLS")
port Local port to use for socket. (0 for random port)

int am_network_connection_tests ( struct stun_test *  stuntest,
char *  stun_server,
int  srcport 
)

Test NAT type.

Parameters:
stuntest element to receive all stun test.
stun_server Stun server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)

int am_network_add_local_candidates ( struct SdpCandidate *  _candidates,
int  srcport 
)

Add local candidates.

Parameters:
_candidates Table for 10 local candidates.
srcport Local port to use for socket. (0 for random port)

int am_network_add_stun_candidates ( struct SdpCandidate *  candidates,
struct SdpCandidate *  localcandidates,
char *  stun_server,
int  srcport 
)

Add Stun candidate.

Parameters:
candidates candidates to receive all stun candidates.
stun_server Stun server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)

int am_network_add_turn_candidates ( struct SdpCandidate *  candidates,
char *  turn_server,
int  srcport 
)

Add TURN candidate.

Parameters:
candidates candidates to receive all turn candidates.
turn_server TURN server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)

int am_network_add_relay_candidates ( struct SdpCandidate *  candidates,
char *  relay_server,
int  srcport 
)

Add RELAY candidate.

Parameters:
candidates candidates to receive all turn candidates.
relay_server STUN server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)

char* am_network_test_nat ( const char *  stun_server,
int  port,
const char *  proxy 
)

Test NAT type.

Parameters:
stun_server Stun server to use for NAT traversal solution.
port Local port to use for socket. (0 for random port)
proxy SIP Proxy Address (used to determine which interface to test)

char* am_network_get_nat_info ( const char *  stun_server,
int  srcport 
)

Return text information on NAT type.

Parameters:
stun_server Stun server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)

int am_network_get_nat ( char *  stun_server,
int  srcport 
)

Return binary information on NAT type.

Parameters:
stun_server Stun server to use for NAT traversal solution.
srcport Local port to use for socket. (0 for random port)


Generated on Tue Jun 16 19:18:37 2009 for libamsip by  doxygen 1.5.9