Ejemplo n.º 1
0
static void __cand_ice_foundation(struct call *call, struct ice_candidate *cand) {
	char buf[64];
	int len;

	len = sprintf(buf, "%x%x%x", endpoint_hash(&cand->endpoint),
			cand->type, g_direct_hash(cand->transport));
	call_str_cpy_len(call, &cand->foundation, buf, len);
}
Ejemplo n.º 2
0
static void create_random_ice_string(struct call *call, str *s, int len) {
	char buf[30];

	assert(len < sizeof(buf));
	if (s->s)
		return;

	random_ice_string(buf, len);
	call_str_cpy_len(call, s, buf, len);
}
Ejemplo n.º 3
0
static void __cand_ice_foundation(struct call *call, struct ice_candidate *cand) {
	char buf[64];
	int len;

	len = sprintf(buf, "%lx%lx%lx%lx%x%x",
			(long unsigned) cand->endpoint.ip46.s6_addr32[0],
			(long unsigned) cand->endpoint.ip46.s6_addr32[1],
			(long unsigned) cand->endpoint.ip46.s6_addr32[2],
			(long unsigned) cand->endpoint.ip46.s6_addr32[3],
			cand->type, cand->transport);
	call_str_cpy_len(call, &cand->foundation, buf, len);
}