vty_out (vty, "%% Malformed address\n");
return CMD_WARNING;
}
-
+
routes = route_stream(0);
if(routes) {
while(1) {
ba->hostname);
continue;
}
-
+
set_nonblocking(ba->socket);
res = sockunion_connect(ba->socket, &ba->addrs[ba->addrpos],
htons(ba->port), 0);
/* BGP TRAP. */
#define BGPESTABLISHED 1
-#define BGPBACKWARDTRANSITION 2
+#define BGPBACKWARDTRANSITION 2
/* BGP MIB bgpVersion. */
#define BGPVERSION 0
msg_str);
}
- }
+ }
json_object_string_add(json_peer, "lastResetDueTo",
peer_down_str[(int)peer->last_reset]);
json_object_int_add(json_peer, "lastResetCode",
false);
}
}
-
+
/* Show BGP peer's summary information. */
static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
if (peer_dynamic_neighbor(peer))
dn_count++;
}
-
+
} else {
/* Loop over all neighbors that will be displayed to determine
* how many
if (len > max_neighbor_width)
max_neighbor_width = len;
-
+
/* See if we have at least a single failed peer */
if (bgp_has_peer_failed(peer, afi, safi))
failed_count++;
if (use_json) {
json_object_int_add(json, "failedPeersCount", 0);
json_object_int_add(json, "dynamicPeers", dn_count);
- json_object_int_add(json, "totalPeers", count);
+ json_object_int_add(json, "totalPeers", count);
vty_out(vty, "%s\n", json_object_to_json_string_ext(
json, JSON_C_TO_STRING_PRETTY));
}
return CMD_SUCCESS;
}
-
+
count = 0; /* Reset the value as its used again */
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
#define NETLINK_SELINUX 7 /* SELinux event notifications */
#define NETLINK_ISCSI 8 /* Open-iSCSI */
#define NETLINK_AUDIT 9 /* auditing */
-#define NETLINK_FIB_LOOKUP 10
+#define NETLINK_FIB_LOOKUP 10
#define NETLINK_CONNECTOR 11
#define NETLINK_NETFILTER 12 /* netfilter subsystem */
#define NETLINK_IP6_FW 13
#define NETLINK_INET_DIAG NETLINK_SOCK_DIAG
-#define MAX_LINKS 32
+#define MAX_LINKS 32
struct sockaddr_nl {
__kernel_sa_family_t nl_family; /* AF_NETLINK */
#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
-/*
+/*
Generic structure for encapsulation of optional route information.
It is reminiscent of sockaddr, but with sa_family replaced
with attribute type.
unsigned char rtm_table; /* Routing table id */
unsigned char rtm_protocol; /* Routing protocol; see below */
- unsigned char rtm_scope; /* See below */
+ unsigned char rtm_scope; /* See below */
unsigned char rtm_type; /* See below */
unsigned rtm_flags;
};
/********************************************************************
- * prefix information
+ * prefix information
****/
struct prefixmsg {
unsigned char prefix_pad3;
};
-enum
+enum
{
PREFIX_UNSPEC,
PREFIX_ADDRESS,
types->table = types->stattable;
types->tablesize = STATIC_ARG_TBL_SIZE;
- types->tablemax = 0;
+ types->tablemax = 0;
types->nextarg = 1;
for (n = 0; n < STATIC_ARG_TBL_SIZE; n++)
types->table[n] = T_UNUSED;
/*
* struct typetable destructor.
- */
+ */
static inline void
freetypes(struct typetable *types)
{
* initial argument table should be an array of STATIC_ARG_TBL_SIZE entries.
* It will be replaces with a malloc-ed one if it overflows.
* Returns 0 on success. On failure, returns nonzero and sets errno.
- */
+ */
int
_frr_find_arguments (const char *fmt0, va_list ap, union arg **argtable)
{
newsize &= ~(HEAP_NARY - 1);
if (newsize == head->arraysz)
return;
-
+
head->array = XREALLOC(MTYPE_HEAP_ARRAY, head->array,
newsize * sizeof(struct heap_item *));
head->arraysz = newsize;
zlog_debug ("ospf_ase_calculate(): Originating router is not an ASBR");
return NULL;
}
-
+
if (al->e[0].fwd_addr.s_addr != 0)
{
if (IS_DEBUG_OSPF (lsa, LSA))
asbr.prefixlen = IPV4_MAX_BITLEN;
rn = route_node_match (rt_network, (struct prefix *) &asbr);
-
+
if (rn == NULL)
{
if (IS_DEBUG_OSPF (lsa, LSA))
#if 0
/* These don't exist yet... */
ospf_summary_incremental_update(new);
- /* Isn't this done by the above call?
+ /* Isn't this done by the above call?
- RFC 2328 Section 16.5 implies it should be */
/* ospf_ase_calculate_schedule(); */
#else /* #if 0 */
char src_str[INET_ADDRSTRLEN];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
zlog_debug("%s: PIM hello option from %s on interface %s: %s",
- label,
+ label,
src_str, ifname,
tlv_name);
}
return (uint8_t *)&domain;
case RIP2PEERLASTUPDATE:
-#if 0
+#if 0
/* We don't know the SNMP agent startup time. We have two choices here:
* - assume ripd startup time equals SNMP agent startup time
* - don't support this variable, at all
/* If RFC2133 definition is used. */
#ifndef IPV6_JOIN_GROUP
-#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
#endif
#ifndef IPV6_LEAVE_GROUP
-#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
#endif
DEFINE_MTYPE_STATIC(RIPNGD, RIPNG_IF, "ripng interface")
return CMD_SUCCESS;
vty_out (vty, "Routing Protocol is \"ripng\"\n");
-
+
vty_out (vty, "Sending updates every %ld seconds, next due in %d seconds\n",
ripng->update_time, 0);
assert(!tmp || tmp->val >= j);
} else
assert(gteq == list_first(&head));
-
+
if (gteq)
assert(gteq->val >= j);
}
#endif /* INADDR_ALLRTRS_GROUP */
/* Default irdp packet interval */
-#define IRDP_DEFAULT_INTERVAL 300
+#define IRDP_DEFAULT_INTERVAL 300
/* Router constants from RFC1256 */
#define MAX_INITIAL_ADVERT_INTERVAL 16
#define IF_ACTIVE (1<<0) /* ICMP Active */
#define IF_BROADCAST (1<<1) /* 255.255.255.255 */
#define IF_SOLICIT (1<<2) /* Solicit active */
-#define IF_DEBUG_MESSAGES (1<<3)
-#define IF_DEBUG_PACKET (1<<4)
-#define IF_DEBUG_MISC (1<<5)
-#define IF_SHUTDOWN (1<<6)
+#define IF_DEBUG_MESSAGES (1<<3)
+#define IF_DEBUG_PACKET (1<<4)
+#define IF_DEBUG_MISC (1<<5)
+#define IF_SHUTDOWN (1<<6)
struct interface *ifp;
struct thread *t_advertise;
/* If RFC2133 definition is used. */
#ifndef IPV6_JOIN_GROUP
-#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
#endif
#ifndef IPV6_LEAVE_GROUP
-#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
#endif
#define ALLNODE "ff02::1"