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); }
void ice_foundation(struct interface_address *ifa) { random_ice_string(ifa->foundation_buf, sizeof(ifa->foundation_buf)); str_init_len(&ifa->ice_foundation, ifa->foundation_buf, sizeof(ifa->foundation_buf)); }
void ice_foundation(str *s) { str_init_len(s, malloc(ICE_FOUNDATION_LENGTH), ICE_FOUNDATION_LENGTH); random_ice_string(s->s, ICE_FOUNDATION_LENGTH); }