mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 09:47:11 +00:00
zebra: Convert to enum zebra_iftype
as per our internal standard
We do not use typedef's to talk about structures as per our standard. Fixing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
60e3656140
commit
e6f2bec087
@ -250,7 +250,7 @@ static enum zebra_link_type netlink_to_zebra_link_type(unsigned int hwt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void zebra_if_set_ziftype(struct interface *ifp,
|
static inline void zebra_if_set_ziftype(struct interface *ifp,
|
||||||
zebra_iftype_t zif_type,
|
enum zebra_iftype zif_type,
|
||||||
zebra_slave_iftype_t zif_slave_type)
|
zebra_slave_iftype_t zif_slave_type)
|
||||||
{
|
{
|
||||||
struct zebra_if *zif;
|
struct zebra_if *zif;
|
||||||
@ -270,7 +270,7 @@ static inline void zebra_if_set_ziftype(struct interface *ifp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void netlink_determine_zebra_iftype(const char *kind,
|
static void netlink_determine_zebra_iftype(const char *kind,
|
||||||
zebra_iftype_t *zif_type)
|
enum zebra_iftype *zif_type)
|
||||||
{
|
{
|
||||||
*zif_type = ZEBRA_IF_OTHER;
|
*zif_type = ZEBRA_IF_OTHER;
|
||||||
|
|
||||||
@ -875,7 +875,7 @@ static int netlink_interface(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
char *slave_kind = NULL;
|
char *slave_kind = NULL;
|
||||||
struct zebra_ns *zns = NULL;
|
struct zebra_ns *zns = NULL;
|
||||||
vrf_id_t vrf_id = VRF_DEFAULT;
|
vrf_id_t vrf_id = VRF_DEFAULT;
|
||||||
zebra_iftype_t zif_type = ZEBRA_IF_OTHER;
|
enum zebra_iftype zif_type = ZEBRA_IF_OTHER;
|
||||||
zebra_slave_iftype_t zif_slave_type = ZEBRA_IF_SLAVE_NONE;
|
zebra_slave_iftype_t zif_slave_type = ZEBRA_IF_SLAVE_NONE;
|
||||||
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
||||||
ifindex_t link_ifindex = IFINDEX_INTERNAL;
|
ifindex_t link_ifindex = IFINDEX_INTERNAL;
|
||||||
@ -1467,7 +1467,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
|||||||
char *slave_kind = NULL;
|
char *slave_kind = NULL;
|
||||||
struct zebra_ns *zns;
|
struct zebra_ns *zns;
|
||||||
vrf_id_t vrf_id = VRF_DEFAULT;
|
vrf_id_t vrf_id = VRF_DEFAULT;
|
||||||
zebra_iftype_t zif_type = ZEBRA_IF_OTHER;
|
enum zebra_iftype zif_type = ZEBRA_IF_OTHER;
|
||||||
zebra_slave_iftype_t zif_slave_type = ZEBRA_IF_SLAVE_NONE;
|
zebra_slave_iftype_t zif_slave_type = ZEBRA_IF_SLAVE_NONE;
|
||||||
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
ifindex_t bridge_ifindex = IFINDEX_INTERNAL;
|
||||||
ifindex_t bond_ifindex = IFINDEX_INTERNAL;
|
ifindex_t bond_ifindex = IFINDEX_INTERNAL;
|
||||||
|
@ -1295,7 +1295,7 @@ static const char *zebra_zifslavetype_2str(zebra_slave_iftype_t zif_slave_type)
|
|||||||
return "None";
|
return "None";
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *zebra_ziftype_2str(zebra_iftype_t zif_type)
|
static const char *zebra_ziftype_2str(enum zebra_iftype zif_type)
|
||||||
{
|
{
|
||||||
switch (zif_type) {
|
switch (zif_type) {
|
||||||
case ZEBRA_IF_OTHER:
|
case ZEBRA_IF_OTHER:
|
||||||
|
@ -253,7 +253,7 @@ struct rtadv_dnssl {
|
|||||||
#endif /* HAVE_RTADV */
|
#endif /* HAVE_RTADV */
|
||||||
|
|
||||||
/* Zebra interface type - ones of interest. */
|
/* Zebra interface type - ones of interest. */
|
||||||
typedef enum {
|
enum zebra_iftype {
|
||||||
ZEBRA_IF_OTHER = 0, /* Anything else */
|
ZEBRA_IF_OTHER = 0, /* Anything else */
|
||||||
ZEBRA_IF_VXLAN, /* VxLAN interface */
|
ZEBRA_IF_VXLAN, /* VxLAN interface */
|
||||||
ZEBRA_IF_VRF, /* VRF device */
|
ZEBRA_IF_VRF, /* VRF device */
|
||||||
@ -264,7 +264,7 @@ typedef enum {
|
|||||||
ZEBRA_IF_BOND, /* Bond */
|
ZEBRA_IF_BOND, /* Bond */
|
||||||
ZEBRA_IF_BOND_SLAVE, /* Bond */
|
ZEBRA_IF_BOND_SLAVE, /* Bond */
|
||||||
ZEBRA_IF_GRE, /* GRE interface */
|
ZEBRA_IF_GRE, /* GRE interface */
|
||||||
} zebra_iftype_t;
|
};
|
||||||
|
|
||||||
/* Zebra "slave" interface type */
|
/* Zebra "slave" interface type */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -367,7 +367,7 @@ struct zebra_if {
|
|||||||
uint8_t ptm_enable;
|
uint8_t ptm_enable;
|
||||||
|
|
||||||
/* Zebra interface and "slave" interface type */
|
/* Zebra interface and "slave" interface type */
|
||||||
zebra_iftype_t zif_type;
|
enum zebra_iftype zif_type;
|
||||||
zebra_slave_iftype_t zif_slave_type;
|
zebra_slave_iftype_t zif_slave_type;
|
||||||
|
|
||||||
/* Additional L2 info, depends on zif_type */
|
/* Additional L2 info, depends on zif_type */
|
||||||
|
Loading…
Reference in New Issue
Block a user