24 #include <sys/socket.h>
25 #include <sys/types.h>
26 #include <arpa/inet.h>
27 #include <netinet/in.h>
31 #include <nice/agent.h>
35 #define ICE_FAILURE -1
40 GMainContext *gcontext;
44 NiceAddress *bind_addr;
45 NiceAddress *remote_addr;
48 gboolean selected_pair_done;
50 gboolean negotiate_done;
72 #define LOCAL_DATA_SIZE (513 + 1 + 80 \
73 + NICE_AGENT_MAX_REMOTE_CANDIDATES * ( \
74 1 + 33 + 11 + INET6_ADDRSTRLEN + 6 + 7) \
79 void ice_lib_shutdown();
82 int ice_init(
struct icedata *icedata,
const char *stun_host,
83 unsigned int stun_port,
int controlling);
84 int ice_get_local_data(
struct icedata *ice_data,
char *out,
size_t outsize);
87 int ice_negotiate(
struct icedata *ice_data,
int argc,
char *rdata[]);
88 int ice_get_negotiated_addrs(
struct icedata *ice_data,
89 struct sockaddr *laddr,
91 struct sockaddr *raddr,
94 int ice_get_negotiated_sock(
struct icedata *ice_data,
int *sock_dup);
97 void ice_destroy(
struct icedata *ice_data);
99 char **ice_parse_args(
char *line,
int *argc);