Алгоритми маршрутизації в мережах, Детальна інформація

Алгоритми маршрутизації в мережах
Тип документу: Курсова
Сторінок: 30
Предмет: Комп`ютерні науки
Автор:
Розмір: 26.2
Скачувань: 3080
*/

gwkludge();

ifinit();

flush_kern();

/* Ask for routes */

rip_query();

rdisc_sol();

/* Loop forever, listening and broadcasting.

*/

for (;;) {

prev_clk = clk;

gettimeofday(&clk, 0);

timevalsub(&t2, &clk, &prev_clk);

if (t2.tv_sec < 0

|| t2.tv_sec > wtime.tv_sec + 5) {

/* Deal with time changes before other housekeeping to

* keep everything straight.

*/

dt = t2.tv_sec;

if (dt > 0)

dt -= wtime.tv_sec;

trace_act("time changed by %d sec", dt);

epoch.tv_sec += dt;

}

timevalsub(&now, &clk, &epoch);

now_stale = now.tv_sec - STALE_TIME;

now_expire = now.tv_sec - EXPIRE_TIME;

now_garbage = now.tv_sec - GARBAGE_TIME;

/* deal with signals that should affect tracing */

set_tracelevel();

The online video editor trusted by teams to make professional video in minutes