static int lsp_l1_refresh_pseudo(struct thread *thread);
static int lsp_l2_refresh_pseudo(struct thread *thread);
-int lsp_id_cmp(u_char *id1, u_char *id2)
+int lsp_id_cmp(uint8_t *id1, uint8_t *id2)
{
return memcmp(id1, id2, ISIS_SYS_ID_LEN + 2);
}
return dict;
}
-struct isis_lsp *lsp_search(u_char *id, dict_t *lspdb)
+struct isis_lsp *lsp_search(uint8_t *id, dict_t *lspdb)
{
dnode_t *node;
zlog_debug("searching db");
for (dn = dict_first(lspdb); dn; dn = dict_next(lspdb, dn)) {
zlog_debug("%s\t%pX",
- rawlspid_print((u_char *)dnode_getkey(dn)),
+ rawlspid_print((uint8_t *)dnode_getkey(dn)),
dnode_get(dn));
}
#endif /* EXTREME DEBUG */
return;
}
-void lsp_search_and_destroy(u_char *id, dict_t *lspdb)
+void lsp_search_and_destroy(uint8_t *id, dict_t *lspdb)
{
dnode_t *node;
struct isis_lsp *lsp;
return;
}
-static u_int8_t lsp_bits_generate(int level, int overload_bit, int attached_bit)
+static uint8_t lsp_bits_generate(int level, int overload_bit, int attached_bit)
{
- u_int8_t lsp_bits = 0;
+ uint8_t lsp_bits = 0;
if (level == IS_LEVEL_1)
lsp_bits = IS_LEVEL_1;
else
return lsp;
}
-struct isis_lsp *lsp_new(struct isis_area *area, u_char *lsp_id,
+struct isis_lsp *lsp_new(struct isis_area *area, uint8_t *lsp_id,
uint16_t rem_lifetime, uint32_t seqno,
uint8_t lsp_bits, uint16_t checksum,
struct isis_lsp *lsp0, int level)
/*
* Build a list of LSPs with non-zero ht bounded by start and stop ids
*/
-void lsp_build_list_nonzero_ht(u_char *start_id, u_char *stop_id,
+void lsp_build_list_nonzero_ht(uint8_t *start_id, uint8_t *stop_id,
struct list *list, dict_t *lspdb)
{
dnode_t *first, *last, *curr;
stream_putw_at(lsp->pdu, 10, lsp->hdr.rem_lifetime);
}
-static void lspid_print(u_char *lsp_id, u_char *trg, char dynhost, char frag)
+static void lspid_print(uint8_t *lsp_id, uint8_t *trg, char dynhost, char frag)
{
struct isis_dynhn *dyn = NULL;
- u_char id[SYSID_STRLEN];
+ uint8_t id[SYSID_STRLEN];
if (dynhost)
dyn = dynhn_find_by_id(lsp_id);
/* this function prints the lsp on show isis database */
void lsp_print(struct isis_lsp *lsp, struct vty *vty, char dynhost)
{
- u_char LSPid[255];
+ uint8_t LSPid[255];
char age_out[8];
lspid_print(lsp->hdr.lsp_id, LSPid, dynhost, 1);
return lsp_count;
}
-static u_int16_t lsp_rem_lifetime(struct isis_area *area, int level)
+static uint16_t lsp_rem_lifetime(struct isis_area *area, int level)
{
- u_int16_t rem_lifetime;
+ uint16_t rem_lifetime;
/* Add jitter to configured LSP lifetime */
rem_lifetime =
return rem_lifetime;
}
-static u_int16_t lsp_refresh_time(struct isis_lsp *lsp, u_int16_t rem_lifetime)
+static uint16_t lsp_refresh_time(struct isis_lsp *lsp, uint16_t rem_lifetime)
{
struct isis_area *area = lsp->area;
int level = lsp->level;
- u_int16_t refresh_time;
+ uint16_t refresh_time;
/* Add jitter to LSP refresh time */
refresh_time =
int lsp_generate(struct isis_area *area, int level)
{
struct isis_lsp *oldlsp, *newlsp;
- u_int32_t seq_num = 0;
- u_char lspid[ISIS_SYS_ID_LEN + 2];
- u_int16_t rem_lifetime, refresh_time;
+ uint32_t seq_num = 0;
+ uint8_t lspid[ISIS_SYS_ID_LEN + 2];
+ uint16_t rem_lifetime, refresh_time;
if ((area == NULL) || (area->is_type & level) != level)
return ISIS_ERROR;
dict_t *lspdb;
struct isis_lsp *lsp, *frag;
struct listnode *node;
- u_char lspid[ISIS_SYS_ID_LEN + 2];
- u_int16_t rem_lifetime, refresh_time;
+ uint8_t lspid[ISIS_SYS_ID_LEN + 2];
+ uint16_t rem_lifetime, refresh_time;
if ((area == NULL) || (area->is_type & level) != level)
return ISIS_ERROR;
int lsp_regenerate_schedule(struct isis_area *area, int level, int all_pseudo)
{
struct isis_lsp *lsp;
- u_char id[ISIS_SYS_ID_LEN + 2];
+ uint8_t id[ISIS_SYS_ID_LEN + 2];
time_t now, diff;
long timeout;
struct listnode *cnode;
{
dict_t *lspdb = circuit->area->lspdb[level - 1];
struct isis_lsp *lsp;
- u_char lsp_id[ISIS_SYS_ID_LEN + 2];
- u_int16_t rem_lifetime, refresh_time;
+ uint8_t lsp_id[ISIS_SYS_ID_LEN + 2];
+ uint16_t rem_lifetime, refresh_time;
if ((circuit->is_type & level) != level
|| (circuit->state != C_STATE_UP)
{
dict_t *lspdb = circuit->area->lspdb[level - 1];
struct isis_lsp *lsp;
- u_char lsp_id[ISIS_SYS_ID_LEN + 2];
- u_int16_t rem_lifetime, refresh_time;
+ uint8_t lsp_id[ISIS_SYS_ID_LEN + 2];
+ uint16_t rem_lifetime, refresh_time;
if ((circuit->is_type & level) != level
|| (circuit->state != C_STATE_UP)
static int lsp_l1_refresh_pseudo(struct thread *thread)
{
struct isis_circuit *circuit;
- u_char id[ISIS_SYS_ID_LEN + 2];
+ uint8_t id[ISIS_SYS_ID_LEN + 2];
circuit = THREAD_ARG(thread);
static int lsp_l2_refresh_pseudo(struct thread *thread)
{
struct isis_circuit *circuit;
- u_char id[ISIS_SYS_ID_LEN + 2];
+ uint8_t id[ISIS_SYS_ID_LEN + 2];
circuit = THREAD_ARG(thread);
int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level)
{
struct isis_lsp *lsp;
- u_char lsp_id[ISIS_SYS_ID_LEN + 2];
+ uint8_t lsp_id[ISIS_SYS_ID_LEN + 2];
time_t now, diff;
long timeout;
int lvl;
struct listnode *lspnode, *cnode;
dnode_t *dnode, *dnode_next;
int level;
- u_int16_t rem_lifetime;
+ uint16_t rem_lifetime;
time_t now = monotime(NULL);
lsp_list = list_new();
return ISIS_OK;
}
-void lsp_purge_pseudo(u_char *id, struct isis_circuit *circuit, int level)
+void lsp_purge_pseudo(uint8_t *id, struct isis_circuit *circuit, int level)
{
struct isis_lsp *lsp;