summaryrefslogtreecommitdiff
path: root/isisd/isis_lsp.c
diff options
context:
space:
mode:
authorpaul <paul>2005-02-09 15:51:56 +0000
committerpaul <paul>2005-02-09 15:51:56 +0000
commit9985f83ce7102f64b15f744b60320f8d14a8a5ff (patch)
tree344629bdc2b4a7d53b8d7ca1705c9be2ca282d18 /isisd/isis_lsp.c
parent083ee9d9cdbf72a452b9af96e62d0625ea712cd9 (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_lsp.c')
-rw-r--r--isisd/isis_lsp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 8dae147f..52d8884d 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -369,7 +369,6 @@ lsp_update_data (struct isis_lsp *lsp, struct stream *stream,
/* copying only the relevant part of our stream */
lsp->pdu = stream_new (stream->endp);
- lsp->pdu->putp = stream->putp;
lsp->pdu->getp = stream->getp;
lsp->pdu->endp = stream->endp;
memcpy (lsp->pdu->data, stream->data, stream->endp);
@@ -509,7 +508,7 @@ lsp_new (u_char * lsp_id, u_int16_t rem_lifetime, u_int32_t seq_num,
lsp->level = level;
lsp->age_out = ZERO_AGE_LIFETIME;
- stream_set_putp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
+ stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
/* #ifdef EXTREME_DEBUG */
/* logging */
@@ -1141,7 +1140,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area)
}
}
- stream_set_putp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
+ stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
if (lsp->tlv_data.nlpids)
tlv_add_nlpid (lsp->tlv_data.nlpids, lsp->pdu);
@@ -1159,7 +1158,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area)
tlv_add_ipv6_reachs (lsp->tlv_data.ipv6_reachs, lsp->pdu);
#endif /* HAVE_IPV6 */
- lsp->lsp_header->pdu_len = htons (stream_get_putp (lsp->pdu));
+ lsp->lsp_header->pdu_len = htons (stream_get_endp (lsp->pdu));
return;
}
@@ -1200,7 +1199,7 @@ lsp_tlv_fit (struct isis_lsp *lsp, struct list **from, struct list **to,
}
tlv_build_func (*to, lsp->pdu);
}
- lsp->lsp_header->pdu_len = htons (stream_get_putp (lsp->pdu));
+ lsp->lsp_header->pdu_len = htons (stream_get_endp (lsp->pdu));
return;
}
@@ -1319,7 +1318,7 @@ lsp_build_nonpseudo (struct isis_lsp *lsp, struct isis_area *area)
/*
* Building the zero lsp
*/
- stream_set_putp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
+ stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
/*
* Add the authentication info if its present
*/
@@ -1929,7 +1928,7 @@ lsp_build_pseudo (struct isis_lsp *lsp, struct isis_circuit *circuit,
}
}
- stream_set_putp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
+ stream_forward_endp (lsp->pdu, ISIS_FIXED_HDR_LEN + ISIS_LSP_HDR_LEN);
/*
* Add the authentication info if it's present
*/
@@ -1947,7 +1946,7 @@ lsp_build_pseudo (struct isis_lsp *lsp, struct isis_circuit *circuit,
if (lsp->tlv_data.es_neighs && listcount (lsp->tlv_data.es_neighs) > 0)
tlv_add_is_neighs (lsp->tlv_data.es_neighs, lsp->pdu);
- lsp->lsp_header->pdu_len = htons (stream_get_putp (lsp->pdu));
+ lsp->lsp_header->pdu_len = htons (stream_get_endp (lsp->pdu));
iso_csum_create (STREAM_DATA (lsp->pdu) + 12,
ntohs (lsp->lsp_header->pdu_len) - 12, 12);
@@ -2473,7 +2472,6 @@ build_topology_lsp_data (struct isis_lsp *lsp, struct isis_area *area,
}
/* thanks to hannes, another bug bites the dust */
- lsp->pdu->putp = ntohs (lsp->lsp_header->pdu_len);
lsp->pdu->endp = ntohs (lsp->lsp_header->pdu_len);
}
#endif /* TOPOLOGY_GENERATE */