#include "plist.h"
#include "lib_errors.h"
#include "network.h"
+#include "if.h"
#include "babel_main.h"
#include "babeld.h"
/* We failed to get a global EUI64 from the interfaces we were given.
Let's try to find an interface with a MAC address. */
for(i = 1; i < 256; i++) {
- char buf[IF_NAMESIZE], *ifname;
+ char buf[INTERFACE_NAMSIZ], *ifname;
unsigned char eui[8];
ifname = if_indextoname(i, buf);
if(ifname == NULL)
uint16_t mhop;
struct in6_addr peer;
struct in6_addr local;
- char ifname[MAXNAMELEN];
- char vrfname[MAXNAMELEN];
+ char ifname[INTERFACE_NAMSIZ];
+ char vrfname[VRF_NAMSIZ];
} __attribute__((packed));
struct bfd_session_stats {
struct iface {
RB_ENTRY(iface) entry;
- char name[IF_NAMESIZE];
+ char name[INTERFACE_NAMSIZ];
ifindex_t ifindex;
struct if_addr_head addr_list;
struct in6_addr linklocal;
struct l2vpn_if {
RB_ENTRY(l2vpn_if) entry;
struct l2vpn *l2vpn;
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int operative;
uint8_t mac[ETH_ALEN];
int af;
union ldpd_addr addr;
uint32_t pwid;
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
bool enabled;
uint32_t remote_group;
int type;
int pw_type;
int mtu;
- char br_ifname[IF_NAMESIZE];
+ char br_ifname[INTERFACE_NAMSIZ];
ifindex_t br_ifindex;
struct l2vpn_if_head if_tree;
struct l2vpn_pw_head pw_tree;
};
struct kaddr {
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int af;
union ldpd_addr addr;
};
struct kif {
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int flags;
int operative;
/* control data structures */
struct ctl_iface {
int af;
- char name[IF_NAMESIZE];
+ char name[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int state;
enum iface_type type;
};
struct ctl_disc_if {
- char name[IF_NAMESIZE];
+ char name[INTERFACE_NAMSIZ];
int active_v4;
int active_v6;
int no_adj;
int af;
struct in_addr id;
enum hello_type type;
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
union ldpd_addr src_addr;
uint16_t holdtime;
uint16_t holdtime_remaining;
struct ctl_pw {
uint16_t type;
char l2vpn_name[L2VPN_NAME_LEN];
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
uint32_t pwid;
struct in_addr lsr_id;
uint32_t local_label;
};
struct ctl_ldp_sync {
- char name[IF_NAMESIZE];
+ char name[INTERFACE_NAMSIZ];
ifindex_t ifindex;
bool in_sync;
bool timer_running;
stream_reset(s);
zclient_create_header(s, command, VRF_DEFAULT);
- stream_write(s, pw->ifname, IF_NAMESIZE);
+ stream_write(s, pw->ifname, INTERFACE_NAMSIZ);
stream_putl(s, pw->ifindex);
/* Put type */
s = zclient->ibuf;
/* Get data. */
- stream_get(pw->ifname, s, IF_NAMESIZE);
+ stream_get(pw->ifname, s, INTERFACE_NAMSIZ);
STREAM_GETL(s, pw->ifindex);
STREAM_GETL(s, pw->status);
};
struct zapi_pw {
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int type;
int af;
};
struct zapi_pw_status {
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
uint32_t status;
};
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
zclient_create_header(s, ZEBRA_PW_STATUS_UPDATE, pw->vrf_id);
- stream_write(s, pw->ifname, IF_NAMESIZE);
+ stream_write(s, pw->ifname, INTERFACE_NAMSIZ);
stream_putl(s, pw->ifindex);
stream_putl(s, pw->status);
static void zread_pseudowire(ZAPI_HANDLER_ARGS)
{
struct stream *s;
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int type;
int af;
s = msg;
/* Get data. */
- STREAM_GET(ifname, s, IF_NAMESIZE);
- ifname[IF_NAMESIZE - 1] = '\0';
+ STREAM_GET(ifname, s, INTERFACE_NAMSIZ);
+ ifname[INTERFACE_NAMSIZ - 1] = '\0';
STREAM_GETL(s, ifindex);
STREAM_GETL(s, type);
STREAM_GETL(s, af);
struct zebra_pw {
RB_ENTRY(zebra_pw) pw_entry, static_pw_entry;
vrf_id_t vrf_id;
- char ifname[IF_NAMESIZE];
+ char ifname[INTERFACE_NAMSIZ];
ifindex_t ifindex;
int type;
int af;