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>
This commit is contained in:
Olivier Dugeon 2017-07-21 16:34:33 +02:00
parent ead99d5f26
commit 2a39170c6b
4 changed files with 9 additions and 10 deletions

View File

@ -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. */

View File

@ -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;

View File

@ -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;

View File

@ -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);