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

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

: ifp->int_addr);

if (setsockopt(rip_sock,IPPROTO_IP, IP_ADD_MEMBERSHIP,

&m, sizeof(m)) < 0)

LOGERR("setsockopt(IP_ADD_MEMBERSHIP RIP)");

}

}

/* Prepare socket used for RIP.

*/

void

rip_on(struct interface *ifp)

{

/* If the main RIP socket is already alive, only start receiving

* multicasts for this interface.

*/

if (rip_sock >= 0) {

if (ifp != 0)

rip_mcast_on(ifp);

return;

}

/* If the main RIP socket is off and it makes sense to turn it on,

* then turn it on for all of the interfaces.

*/

if (rip_interfaces > 0 && !rdisc_ok) {

trace_act("turn on RIP");

/* Close all of the query sockets so that we can open

* the main socket. SO_REUSEPORT is not a solution,

* since that would let two daemons bind to the broadcast

* socket.

*/

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