static struct neighbor_entry *neighbor_entry_new(const uint8_t *id,
struct isis_adjacency *adj)
{
- struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR, sizeof(*rv));
+ struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR,
+ sizeof(*rv));
memcpy(rv->id, id, sizeof(rv->id));
rv->adj = adj;
static struct neighbor_entry *neighbor_entry_lookup_list(struct skiplist *list,
const uint8_t *id)
{
- struct neighbor_entry n = {{0}};
+ struct neighbor_entry n = { {0} };
memcpy(n.id, id, sizeof(n.id));
if (n->adj)
isis_tx_queue_add(n->adj->circuit->tx_queue, lsp, type);
- uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO, sizeof(n->id));
+ uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO,
+ sizeof(n->id));
memcpy(neighbor_id, n->id, sizeof(n->id));
listnode_add(lsp->flooding_neighbors[type], neighbor_id);
}
lsp->flooding_neighbors[type] = list_new();
- lsp->flooding_neighbors[type]->del = fabricd_free_lsp_flooding_info;
+ lsp->flooding_neighbors[type]->del =
+ fabricd_free_lsp_flooding_info;
}
if (circuit) {
struct neighbor_entry *n;
/* Mark all elements in NL as present */
- while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor)) {
+ while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor))
n->present = true;
- }
/* Mark all elements in NN as present */
hash_iterate(f->neighbors_neighbors, mark_neighbor_as_present, NULL);
- struct isis_vertex *originator = isis_find_vertex(&f->spftree->paths,
- lsp->hdr.lsp_id,
- VTYPE_NONPSEUDO_TE_IS);
+ struct isis_vertex *originator =
+ isis_find_vertex(&f->spftree->paths,
+ lsp->hdr.lsp_id,
+ VTYPE_NONPSEUDO_TE_IS);
/* Remove all IS from NL and NN in the shortest path
* to the IS that originated the LSP */
struct isis_circuit *circuit,
bool circuit_scoped)
{
- if (!circuit_scoped) {
+ if (!circuit_scoped)
lsp_flood(lsp, circuit);
- } else {
+ else
fabricd_update_lsp_no_flood(lsp, circuit);
- }
}
/*
/* our own LSP -> 7.3.16.4 c) */
if (comp == LSP_NEWER) {
lsp_inc_seqno(lsp, hdr.seqno);
- lsp_flood_or_update(lsp, NULL, circuit_scoped);
+ lsp_flood_or_update(lsp, NULL,
+ circuit_scoped);
} else {
isis_tx_queue_add(circuit->tx_queue,
lsp, TX_LSP_NORMAL);
}
if (isis->debugs & DEBUG_UPDATE_PACKETS)
zlog_debug(
- "ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32,
+ "ISIS-Upd (%s): (1) "
+ "re-originating LSP %s new seq "
+ "0x%08" PRIx32,
circuit->area->area_tag,
rawlspid_print(hdr.lsp_id),
lsp->hdr.seqno);
isis_free_tlvs(tlvs);
- pdu_counter_count(circuit->area->pdu_tx_counters, hello_pdu_type(circuit, level));
+ pdu_counter_count(circuit->area->pdu_tx_counters,
+ hello_pdu_type(circuit, level));
retval = circuit->tx(circuit, level);
if (retval != ISIS_OK)
flog_err(EC_ISIS_PACKET,
static int send_hello_cb(struct thread *thread)
{
struct isis_circuit_arg *arg = THREAD_ARG(thread);
-
assert(arg);
-
+
struct isis_circuit *circuit = arg->circuit;
int level = arg->level;
if (tx_type == TX_LSP_CIRCUIT_SCOPED) {
stream_putc_at(circuit->snd_stream, 4, FS_LINK_STATE);
- stream_putc_at(circuit->snd_stream, 7, L2_CIRCUIT_FLOODING_SCOPE);
+ stream_putc_at(circuit->snd_stream, 7,
+ L2_CIRCUIT_FLOODING_SCOPE);
}
if (isis->debugs & DEBUG_UPDATE_PACKETS) {
static const char *pdu_counter_index_to_name(enum pdu_counter_index index)
{
- switch(index) {
+ switch (index) {
case L1_LAN_HELLO_INDEX:
return " L1 IIH";
case L2_LAN_HELLO_INDEX:
e->retry = NULL;
thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
- if (e->is_retry) {
+ if (e->is_retry)
queue->circuit->area->lsp_rxmt_count++;
- } else {
+ else
e->is_retry = true;
- }
+
queue->send_event(queue->circuit, e->lsp, e->type);
/* Don't access e here anymore, send_event might have destroyed it */
_isis_tx_queue_add((queue), (lsp), (type), \
__func__, __FILE__, __LINE__)
void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
- enum isis_tx_type type, const char *func,
- const char *file, int line);
+ enum isis_tx_type type, const char *func,
+ const char *file, int line);
#define isis_tx_queue_del(queue, lsp) \
_isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
vty_out(vty, " ago)\n");
if (lsp->flooding_circuit_scoped) {
- vty_out(vty, " Received as circuit-scoped LSP, so not flooded.\n");
+ vty_out(vty, " Received as circuit-scoped LSP, so not "
+ "flooded.\n");
return;
}
{
const char *lspid = NULL;
- if (argc == 4) {
+ if (argc == 4)
lspid = argv[3]->arg;
- }
struct listnode *node;
struct isis_area *area;