version 1.1.1.1, 2012/02/21 17:26:11
|
version 1.1.1.2, 2012/10/09 09:22:28
|
Line 301 int
|
Line 301 int
|
isis_send_pdu_bcast (struct isis_circuit *circuit, int level) |
isis_send_pdu_bcast (struct isis_circuit *circuit, int level) |
{ |
{ |
struct ether_header *eth; |
struct ether_header *eth; |
int written; | int written, buflen; |
|
|
|
buflen = stream_get_endp (circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN; |
|
if (buflen > sizeof (sock_buff)) |
|
{ |
|
zlog_warn ("isis_send_pdu_bcast: sock_buff size %lu is less than " |
|
"output pdu size %d on circuit %s", |
|
sizeof (sock_buff), buflen, circuit->interface->name); |
|
return ISIS_WARNING; |
|
} |
|
|
stream_set_getp (circuit->snd_stream, 0); |
stream_set_getp (circuit->snd_stream, 0); |
|
|
/* |
/* |
Line 328 isis_send_pdu_bcast (struct isis_circuit *circuit, int
|
Line 337 isis_send_pdu_bcast (struct isis_circuit *circuit, int
|
stream_get_endp (circuit->snd_stream)); |
stream_get_endp (circuit->snd_stream)); |
|
|
/* now we can send this */ |
/* now we can send this */ |
written = write (circuit->fd, sock_buff, | written = write (circuit->fd, sock_buff, buflen); |
stream_get_endp (circuit->snd_stream) | |
+ LLC_LEN + ETHER_HDR_LEN); | |
|
|
return ISIS_OK; |
return ISIS_OK; |
} |
} |