summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/isis_lsp.c8
-rw-r--r--isisd/isis_lsp.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index de9c84402f..b8640f34bf 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -611,7 +611,7 @@ static void lsp_set_time(struct isis_lsp *lsp)
stream_putw_at(lsp->pdu, 10, lsp->hdr.rem_lifetime);
}
-static void lspid_print(uint8_t *lsp_id, uint8_t *trg, char dynhost, char frag)
+void lspid_print(uint8_t *lsp_id, char *dest, char dynhost, char frag)
{
struct isis_dynhn *dyn = NULL;
uint8_t id[SYSID_STRLEN];
@@ -628,10 +628,10 @@ static void lspid_print(uint8_t *lsp_id, uint8_t *trg, char dynhost, char frag)
else
memcpy(id, sysid_print(lsp_id), 15);
if (frag)
- sprintf((char *)trg, "%s.%02x-%02x", id, LSP_PSEUDO_ID(lsp_id),
+ sprintf(dest, "%s.%02x-%02x", id, LSP_PSEUDO_ID(lsp_id),
LSP_FRAGMENT(lsp_id));
else
- sprintf((char *)trg, "%s.%02x", id, LSP_PSEUDO_ID(lsp_id));
+ sprintf(dest, "%s.%02x", id, LSP_PSEUDO_ID(lsp_id));
}
/* Convert the lsp attribute bits to attribute string */
@@ -660,7 +660,7 @@ static const char *lsp_bits2string(uint8_t lsp_bits, char *buf, size_t buf_size)
/* this function prints the lsp on show isis database */
void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost)
{
- uint8_t LSPid[255];
+ char LSPid[255];
char age_out[8];
char b[200];
diff --git a/isisd/isis_lsp.h b/isisd/isis_lsp.h
index f303c953c0..3013b8c214 100644
--- a/isisd/isis_lsp.h
+++ b/isisd/isis_lsp.h
@@ -100,6 +100,7 @@ void lsp_update(struct isis_lsp *lsp, struct isis_lsp_hdr *hdr,
struct isis_tlvs *tlvs, struct stream *stream,
struct isis_area *area, int level, bool confusion);
void lsp_inc_seqno(struct isis_lsp *lsp, uint32_t seqno);
+void lspid_print(uint8_t *lsp_id, char *dest, char dynhost, char frag);
void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost);
void lsp_print_detail(struct isis_lsp *lsp, struct vty *vty, char dynhost);
int lsp_print_all(struct vty *vty, dict_t *lspdb, char detail, char dynhost);