mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 12:44:55 +00:00
isisd: Make lspid_print non-static
`lspid_print` is useful in other places, so make it available in `isis_lsp.h`. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
parent
eb2bcb2800
commit
0d6fb551c1
@ -611,7 +611,7 @@ static void lsp_set_time(struct isis_lsp *lsp)
|
|||||||
stream_putw_at(lsp->pdu, 10, lsp->hdr.rem_lifetime);
|
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;
|
struct isis_dynhn *dyn = NULL;
|
||||||
uint8_t id[SYSID_STRLEN];
|
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
|
else
|
||||||
memcpy(id, sysid_print(lsp_id), 15);
|
memcpy(id, sysid_print(lsp_id), 15);
|
||||||
if (frag)
|
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));
|
LSP_FRAGMENT(lsp_id));
|
||||||
else
|
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 */
|
/* 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 */
|
/* this function prints the lsp on show isis database */
|
||||||
void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost)
|
void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost)
|
||||||
{
|
{
|
||||||
uint8_t LSPid[255];
|
char LSPid[255];
|
||||||
char age_out[8];
|
char age_out[8];
|
||||||
char b[200];
|
char b[200];
|
||||||
|
|
||||||
|
@ -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_tlvs *tlvs, struct stream *stream,
|
||||||
struct isis_area *area, int level, bool confusion);
|
struct isis_area *area, int level, bool confusion);
|
||||||
void lsp_inc_seqno(struct isis_lsp *lsp, uint32_t seqno);
|
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(struct isis_lsp *lsp, struct vty *vty, char dynhost);
|
||||||
void lsp_print_detail(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);
|
int lsp_print_all(struct vty *vty, dict_t *lspdb, char detail, char dynhost);
|
||||||
|
Loading…
Reference in New Issue
Block a user