Алгоритми маршрутизації в мережах
intmhome;/* 1=want multi-homed host route */
intadvertise_mhome;/* 1=must continue adverising it */
intauth_ok = 1;/* 1=ignore auth if we do not care */
struct timeval epoch;/* when started */
struct timeval clk, prev_clk;
struct timeval now;/* current idea of time */
time_tnow_stale;
time_tnow_expire;
time_tnow_garbage;
struct timeval next_bcast;/* next general broadcast */
struct timeval no_flash = {EPOCH+SUPPLY_INTERVAL}; /* inhibit flash update */
fd_setfdbits;
intsock_max;
intrip_sock = -1;/* RIP socket */
struct interface *rip_sock_mcast;/* current multicast interface */
intrt_sock;/* routing socket */
intrt_sock_seqno;
static int get_rip_sock(naddr, int);
static void timevalsub(struct timeval *, struct timeval *, struct timeval *);
int
main(int argc,
char *argv[])
{
int n, mib[4], off;
size_t len;