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

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

*/

static void

timevalsub(struct timeval *t1,

struct timeval *t2,

struct timeval *t3)

{

t1->tv_sec = t2->tv_sec - t3->tv_sec;

if ((t1->tv_usec = t2->tv_usec - t3->tv_usec) < 0) {

t1->tv_sec--;

t1->tv_usec += 1000000;

}

}

/* put a message into the system log

*/

void

msglog(char *p, ...)

{

va_list args;

trace_flush();

va_start(args, p);

vsyslog(LOG_ERR, p, args);

if (ftrace != 0) {

if (ftrace == stdout)

(void)fputs("routed: ", ftrace);

(void)vfprintf(ftrace, p, args);

(void)fputc('\n', ftrace);

}

}

/* Put a message about a bad system into the system log if

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