Алгоритми маршрутизації в мережах
*/
ifp->int_rip_sock = get_rip_sock(ifp->int_addr, 0);
}
fix_select();
}
/* die if malloc(3) fails
*/
void *
rtmalloc(size_t size,
char *msg)
{
void *p = malloc(size);
if (p == 0)
logbad(1,"malloc() failed in %s", msg);
return p;
}
/* get a random instant in an interval
*/
void
intvl_random(struct timeval *tp,/* put value here */
u_long lo,/* value is after this second */
u_long hi)/* and before this */
{
tp->tv_sec = (time_t)(hi == lo
? lo