summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2017-07-21 16:34:33 +0200
committerOlivier Dugeon <olivier.dugeon@orange.com>2017-07-21 16:34:33 +0200
commit2a39170c6bd4dddf803a8c4c241e8ab072d78cca (patch)
treedbaa7efdc0b4306200155fcdd00e93169c9644e5 /ospfd
parentOSPF OPAQUE, TE and RI macro refactoring & cleanup (diff)
downloadfrr-2a39170c6bd4dddf803a8c4c241e8ab072d78cca.tar.xz
frr-2a39170c6bd4dddf803a8c4c241e8ab072d78cca.zip
Correct indentation and remove _opcode_t typedef
* Correct struct tlh_header indentation in opaque.h * Change typedef enum _opcode_t by enum lsa_opcode * Propagate change in ospf_te.[c,h) and ospf_ri.c Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_opaque.h7
-rw-r--r--ospfd/ospf_ri.c4
-rw-r--r--ospfd/ospf_te.c6
-rw-r--r--ospfd/ospf_te.h2
4 files changed, 9 insertions, 10 deletions
diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h
index 88a6854b8..60435e502 100644
--- a/ospfd/ospf_opaque.h
+++ b/ospfd/ospf_opaque.h
@@ -81,8 +81,7 @@
* Following section defines generic TLV (type, length, value) macros,
* used for various LSA opaque usage e.g. Traffic Engineering.
*/
-struct tlv_header
-{
+struct tlv_header {
u_int16_t type; /* Type of Value */
u_int16_t length; /* Length of Value portion only, in bytes */
};
@@ -112,11 +111,11 @@ struct tlv_header
#define TLV_HDR(tlvh) tlvh.header
/* Following declaration concerns the Opaque LSA management */
-typedef enum _opcode_t {
+enum lsa_opcode {
REORIGINATE_THIS_LSA,
REFRESH_THIS_LSA,
FLUSH_THIS_LSA
-} opcode_t;
+};
/* Prototypes. */
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c
index 2136f2eb6..e192a39e4 100644
--- a/ospfd/ospf_ri.c
+++ b/ospfd/ospf_ri.c
@@ -111,7 +111,7 @@ static void ospf_router_info_config_write_router(struct vty *vty);
static void ospf_router_info_show_info(struct vty *vty, struct ospf_lsa *lsa);
static int ospf_router_info_lsa_originate(void *arg);
static struct ospf_lsa *ospf_router_info_lsa_refresh(struct ospf_lsa *lsa);
-static void ospf_router_info_lsa_schedule(opcode_t opcode);
+static void ospf_router_info_lsa_schedule(enum lsa_opcode opcode);
static void ospf_router_info_register_vty(void);
static void del_pce_info(void *val);
@@ -778,7 +778,7 @@ static struct ospf_lsa *ospf_router_info_lsa_refresh(struct ospf_lsa *lsa)
return new;
}
-static void ospf_router_info_lsa_schedule(opcode_t opcode)
+static void ospf_router_info_lsa_schedule(enum lsa_opcode opcode)
{
struct ospf_lsa lsa;
struct lsa_header lsah;
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 66de46c5c..a982350e6 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -229,8 +229,8 @@ static struct mpls_te_link *lookup_linkparams_by_instance(struct ospf_lsa *lsa)
}
static void ospf_mpls_te_foreach_area(void (*func)(struct mpls_te_link *lp,
- opcode_t sched_opcode),
- opcode_t sched_opcode)
+ enum lsa_opcode sched_opcode),
+ enum lsa_opcode sched_opcode)
{
struct listnode *node, *nnode;
struct listnode *node2;
@@ -1509,7 +1509,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
return new;
}
-void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, opcode_t opcode)
+void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, enum lsa_opcode opcode)
{
struct ospf_lsa lsa;
struct lsa_header lsah;
diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h
index 233350f83..e3a6114b4 100644
--- a/ospfd/ospf_te.h
+++ b/ospfd/ospf_te.h
@@ -408,7 +408,7 @@ extern int ospf_mpls_te_init(void);
extern void ospf_mpls_te_term(void);
extern struct ospf_mpls_te *get_ospf_mpls_te(void);
extern void ospf_mpls_te_update_if(struct interface *);
-extern void ospf_mpls_te_lsa_schedule(struct mpls_te_link *, opcode_t);
+extern void ospf_mpls_te_lsa_schedule(struct mpls_te_link *, enum lsa_opcode);
extern void set_linkparams_llri(struct mpls_te_link *, u_int32_t, u_int32_t);
extern void set_linkparams_lrrid(struct mpls_te_link *, struct in_addr,
struct in_addr);