summaryrefslogtreecommitdiffstats
path: root/isisd/isis_adjacency.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /isisd/isis_adjacency.h
parent*: add indent control files (diff)
downloadfrr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.tar.xz
frr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.zip
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_adjacency.h')
-rw-r--r--isisd/isis_adjacency.h153
1 files changed, 74 insertions, 79 deletions
diff --git a/isisd/isis_adjacency.h b/isisd/isis_adjacency.h
index a81797bb1..9f4af1b45 100644
--- a/isisd/isis_adjacency.h
+++ b/isisd/isis_adjacency.h
@@ -1,20 +1,20 @@
/*
- * IS-IS Rout(e)ing protocol - isis_adjacency.h
+ * IS-IS Rout(e)ing protocol - isis_adjacency.h
* IS-IS adjacency handling
*
* Copyright (C) 2001,2002 Sampo Saaristo
- * Tampere University of Technology
+ * Tampere University of Technology
* Institute of Communications Engineering
*
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public Licenseas published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public Licenseas published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
- * This program is distributed in the hope that it will be useful,but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * This program is distributed in the hope that it will be useful,but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -25,95 +25,90 @@
#ifndef _ZEBRA_ISIS_ADJACENCY_H
#define _ZEBRA_ISIS_ADJACENCY_H
-enum isis_adj_usage
-{
- ISIS_ADJ_NONE,
- ISIS_ADJ_LEVEL1,
- ISIS_ADJ_LEVEL2,
- ISIS_ADJ_LEVEL1AND2
+enum isis_adj_usage {
+ ISIS_ADJ_NONE,
+ ISIS_ADJ_LEVEL1,
+ ISIS_ADJ_LEVEL2,
+ ISIS_ADJ_LEVEL1AND2
};
-enum isis_system_type
-{
- ISIS_SYSTYPE_UNKNOWN,
- ISIS_SYSTYPE_ES,
- ISIS_SYSTYPE_IS,
- ISIS_SYSTYPE_L1_IS,
- ISIS_SYSTYPE_L2_IS
+enum isis_system_type {
+ ISIS_SYSTYPE_UNKNOWN,
+ ISIS_SYSTYPE_ES,
+ ISIS_SYSTYPE_IS,
+ ISIS_SYSTYPE_L1_IS,
+ ISIS_SYSTYPE_L2_IS
};
-enum isis_adj_state
-{
- ISIS_ADJ_UNKNOWN,
- ISIS_ADJ_INITIALIZING,
- ISIS_ADJ_UP,
- ISIS_ADJ_DOWN
+enum isis_adj_state {
+ ISIS_ADJ_UNKNOWN,
+ ISIS_ADJ_INITIALIZING,
+ ISIS_ADJ_UP,
+ ISIS_ADJ_DOWN
};
/*
* we use the following codes to give an indication _why_
* a specific adjacency is up or down
*/
-enum isis_adj_updown_reason
-{
- ISIS_ADJ_REASON_SEENSELF,
- ISIS_ADJ_REASON_AREA_MISMATCH,
- ISIS_ADJ_REASON_HOLDTIMER_EXPIRED,
- ISIS_ADJ_REASON_AUTH_FAILED,
- ISIS_ADJ_REASON_CHECKSUM_FAILED
+enum isis_adj_updown_reason {
+ ISIS_ADJ_REASON_SEENSELF,
+ ISIS_ADJ_REASON_AREA_MISMATCH,
+ ISIS_ADJ_REASON_HOLDTIMER_EXPIRED,
+ ISIS_ADJ_REASON_AUTH_FAILED,
+ ISIS_ADJ_REASON_CHECKSUM_FAILED
};
#define DIS_RECORDS 8 /* keep the last 8 DIS state changes on record */
-struct isis_dis_record
-{
- int dis; /* is our neighbor the DIS ? */
- time_t last_dis_change; /* timestamp for last dis change */
+struct isis_dis_record {
+ int dis; /* is our neighbor the DIS ? */
+ time_t last_dis_change; /* timestamp for last dis change */
};
-struct isis_adjacency
-{
- u_char snpa[ETH_ALEN]; /* NeighbourSNPAAddress */
- u_char sysid[ISIS_SYS_ID_LEN]; /* neighbourSystemIdentifier */
- u_char lanid[ISIS_SYS_ID_LEN + 1]; /* LAN id on bcast circuits */
- int dischanges[ISIS_LEVELS]; /* how many DIS changes ? */
- /* an array of N levels for M records */
- struct isis_dis_record dis_record[DIS_RECORDS * ISIS_LEVELS];
- enum isis_adj_state adj_state; /* adjacencyState */
- enum isis_adj_usage adj_usage; /* adjacencyUsage */
- struct list *area_addrs; /* areaAdressesOfNeighbour */
- struct nlpids nlpids; /* protocols spoken ... */
- struct list *ipv4_addrs;
- struct in_addr router_address;
- struct list *ipv6_addrs;
- struct in6_addr router_address6;
- u_char prio[ISIS_LEVELS]; /* priorityOfNeighbour for DIS */
- int circuit_t; /* from hello PDU hdr */
- int level; /* level (1 or 2) */
- enum isis_system_type sys_type; /* neighbourSystemType */
- u_int16_t hold_time; /* entryRemainingTime */
- u_int32_t last_upd;
- u_int32_t last_flap; /* last time the adj flapped */
- int flaps; /* number of adjacency flaps */
- struct thread *t_expire; /* expire after hold_time */
- struct isis_circuit *circuit; /* back pointer */
- uint16_t *mt_set; /* Topologies this adjacency is valid for */
- unsigned int mt_count; /* Number of entries in mt_set */
+struct isis_adjacency {
+ u_char snpa[ETH_ALEN]; /* NeighbourSNPAAddress */
+ u_char sysid[ISIS_SYS_ID_LEN]; /* neighbourSystemIdentifier */
+ u_char lanid[ISIS_SYS_ID_LEN + 1]; /* LAN id on bcast circuits */
+ int dischanges[ISIS_LEVELS]; /* how many DIS changes ? */
+ /* an array of N levels for M records */
+ struct isis_dis_record dis_record[DIS_RECORDS * ISIS_LEVELS];
+ enum isis_adj_state adj_state; /* adjacencyState */
+ enum isis_adj_usage adj_usage; /* adjacencyUsage */
+ struct list *area_addrs; /* areaAdressesOfNeighbour */
+ struct nlpids nlpids; /* protocols spoken ... */
+ struct list *ipv4_addrs;
+ struct in_addr router_address;
+ struct list *ipv6_addrs;
+ struct in6_addr router_address6;
+ u_char prio[ISIS_LEVELS]; /* priorityOfNeighbour for DIS */
+ int circuit_t; /* from hello PDU hdr */
+ int level; /* level (1 or 2) */
+ enum isis_system_type sys_type; /* neighbourSystemType */
+ u_int16_t hold_time; /* entryRemainingTime */
+ u_int32_t last_upd;
+ u_int32_t last_flap; /* last time the adj flapped */
+ int flaps; /* number of adjacency flaps */
+ struct thread *t_expire; /* expire after hold_time */
+ struct isis_circuit *circuit; /* back pointer */
+ uint16_t *mt_set; /* Topologies this adjacency is valid for */
+ unsigned int mt_count; /* Number of entries in mt_set */
};
-struct isis_adjacency *isis_adj_lookup (const u_char * sysid, struct list *adjdb);
-struct isis_adjacency *isis_adj_lookup_snpa (const u_char * ssnpa,
- struct list *adjdb);
-struct isis_adjacency *isis_new_adj (const u_char * id, const u_char * snpa, int level,
- struct isis_circuit *circuit);
-void isis_delete_adj (void *adj);
-void isis_adj_state_change (struct isis_adjacency *adj,
- enum isis_adj_state state, const char *reason);
-void isis_adj_print (struct isis_adjacency *adj);
-int isis_adj_expire (struct thread *thread);
-void isis_adj_print_vty (struct isis_adjacency *adj, struct vty *vty, char detail);
-void isis_adj_build_neigh_list (struct list *adjdb, struct list *list);
-void isis_adj_build_up_list (struct list *adjdb, struct list *list);
+struct isis_adjacency *isis_adj_lookup(const u_char *sysid, struct list *adjdb);
+struct isis_adjacency *isis_adj_lookup_snpa(const u_char *ssnpa,
+ struct list *adjdb);
+struct isis_adjacency *isis_new_adj(const u_char *id, const u_char *snpa,
+ int level, struct isis_circuit *circuit);
+void isis_delete_adj(void *adj);
+void isis_adj_state_change(struct isis_adjacency *adj,
+ enum isis_adj_state state, const char *reason);
+void isis_adj_print(struct isis_adjacency *adj);
+int isis_adj_expire(struct thread *thread);
+void isis_adj_print_vty(struct isis_adjacency *adj, struct vty *vty,
+ char detail);
+void isis_adj_build_neigh_list(struct list *adjdb, struct list *list);
+void isis_adj_build_up_list(struct list *adjdb, struct list *list);
int isis_adj_usage2levels(enum isis_adj_usage usage);
#endif /* ISIS_ADJACENCY_H */