diff options
author | paul <paul> | 2005-02-09 15:51:56 +0000 |
---|---|---|
committer | paul <paul> | 2005-02-09 15:51:56 +0000 |
commit | 9985f83ce7102f64b15f744b60320f8d14a8a5ff (patch) | |
tree | 344629bdc2b4a7d53b8d7ca1705c9be2ca282d18 /isisd/isis_network.c | |
parent | 083ee9d9cdbf72a452b9af96e62d0625ea712cd9 (diff) |
2005-02-09 Paul Jakma <paul.jakma@sun.com>
* (global) Update code to match stream.h changes.
stream_get_putp effectively replaced with stream_get_endp.
stream_forward renamed to stream_forward_getp.
stream_forward_endp introduced to replace some previous
setting/manual twiddling of putp by daemons.
* lib/stream.h: Remove putp. Update reference to putp with endp.
Add stream_forward_endp, which daemons were doing manually.
Rename stream_forward to stream_forward_getp.
lib/stream.c: Remove/update references to putp.
introduce stream_forward_endp.
Diffstat (limited to 'isisd/isis_network.c')
-rw-r--r-- | isisd/isis_network.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/isisd/isis_network.c b/isisd/isis_network.c index a0df32e3..2e901f1a 100644 --- a/isisd/isis_network.c +++ b/isisd/isis_network.c @@ -422,7 +422,6 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa) /* then we lose the LLC */ memcpy (STREAM_DATA (circuit->rcv_stream), sock_buff + LLC_LEN, bytesread - LLC_LEN); - circuit->rcv_stream->putp = bytesread - LLC_LEN; circuit->rcv_stream->endp = bytesread - LLC_LEN; memcpy (ssnpa, &s_addr.sll_addr, s_addr.sll_halen); @@ -453,7 +452,6 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa) return ISIS_WARNING; } - circuit->rcv_stream->putp = bytesread; circuit->rcv_stream->endp = bytesread; /* If we don't have protocol type 0x00FE which is @@ -503,7 +501,7 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level) /* now we can send this */ written = sendto (circuit->fd, sock_buff, - circuit->snd_stream->putp + LLC_LEN, 0, + stream_get_endp(circuit->snd_stream) + LLC_LEN, 0, (struct sockaddr *) &sa, sizeof (struct sockaddr_ll)); return ISIS_OK; @@ -531,7 +529,8 @@ isis_send_pdu_p2p (struct isis_circuit *circuit, int level) /* lets try correcting the protocol */ sa.sll_protocol = htons (0x00FE); written = sendto (circuit->fd, circuit->snd_stream->data, - circuit->snd_stream->putp, 0, (struct sockaddr *) &sa, + stream_get_endp (circuit->snd_stream), 0, + (struct sockaddr *) &sa, sizeof (struct sockaddr_ll)); return ISIS_OK; @@ -576,7 +575,6 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa) memcpy (STREAM_DATA (circuit->rcv_stream), readbuff + offset, bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN); - circuit->rcv_stream->putp = bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN; circuit->rcv_stream->endp = bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN; circuit->rcv_stream->getp = 0; @@ -603,7 +601,6 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa) return ISIS_WARNING; } - circuit->rcv_stream->putp = bytesread; circuit->rcv_stream->endp = bytesread; return ISIS_OK; @@ -641,7 +638,8 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level) /* now we can send this */ written = write (circuit->fd, sock_buff, - circuit->snd_stream->putp + LLC_LEN + ETHER_HDR_LEN); + stream_get_endp (circuit->snd_stream) + + LLC_LEN + ETHER_HDR_LEN); return ISIS_OK; } |