version 1.1.1.3, 2013/07/21 23:54:38
|
version 1.1.1.4, 2016/11/02 10:09:10
|
Line 50
|
Line 50
|
#include "isis_zebra.h" |
#include "isis_zebra.h" |
|
|
static struct isis_nexthop * |
static struct isis_nexthop * |
isis_nexthop_create (struct in_addr *ip, unsigned int ifindex) | isis_nexthop_create (struct in_addr *ip, ifindex_t ifindex) |
{ |
{ |
struct listnode *node; |
struct listnode *node; |
struct isis_nexthop *nexthop; |
struct isis_nexthop *nexthop; |
Line 67 isis_nexthop_create (struct in_addr *ip, unsigned int
|
Line 67 isis_nexthop_create (struct in_addr *ip, unsigned int
|
} |
} |
|
|
nexthop = XCALLOC (MTYPE_ISIS_NEXTHOP, sizeof (struct isis_nexthop)); |
nexthop = XCALLOC (MTYPE_ISIS_NEXTHOP, sizeof (struct isis_nexthop)); |
if (!nexthop) |
|
{ |
|
zlog_err ("ISIS-Rte: isis_nexthop_create: out of memory!"); |
|
} |
|
|
|
nexthop->ifindex = ifindex; |
nexthop->ifindex = ifindex; |
memcpy (&nexthop->ip, ip, sizeof (struct in_addr)); |
memcpy (&nexthop->ip, ip, sizeof (struct in_addr)); |
Line 95 isis_nexthop_delete (struct isis_nexthop *nexthop)
|
Line 91 isis_nexthop_delete (struct isis_nexthop *nexthop)
|
|
|
static int |
static int |
nexthoplookup (struct list *nexthops, struct in_addr *ip, |
nexthoplookup (struct list *nexthops, struct in_addr *ip, |
unsigned int ifindex) | ifindex_t ifindex) |
{ |
{ |
struct listnode *node; |
struct listnode *node; |
struct isis_nexthop *nh; |
struct isis_nexthop *nh; |
Line 134 nexthops_print (struct list *nhs)
|
Line 130 nexthops_print (struct list *nhs)
|
|
|
#ifdef HAVE_IPV6 |
#ifdef HAVE_IPV6 |
static struct isis_nexthop6 * |
static struct isis_nexthop6 * |
isis_nexthop6_new (struct in6_addr *ip6, unsigned int ifindex) | isis_nexthop6_new (struct in6_addr *ip6, ifindex_t ifindex) |
{ |
{ |
struct isis_nexthop6 *nexthop6; |
struct isis_nexthop6 *nexthop6; |
|
|
nexthop6 = XCALLOC (MTYPE_ISIS_NEXTHOP6, sizeof (struct isis_nexthop6)); |
nexthop6 = XCALLOC (MTYPE_ISIS_NEXTHOP6, sizeof (struct isis_nexthop6)); |
if (!nexthop6) |
|
{ |
|
zlog_err ("ISIS-Rte: isis_nexthop_create6: out of memory!"); |
|
} |
|
|
|
nexthop6->ifindex = ifindex; |
nexthop6->ifindex = ifindex; |
memcpy (&nexthop6->ip6, ip6, sizeof (struct in6_addr)); |
memcpy (&nexthop6->ip6, ip6, sizeof (struct in6_addr)); |
Line 152 isis_nexthop6_new (struct in6_addr *ip6, unsigned int
|
Line 144 isis_nexthop6_new (struct in6_addr *ip6, unsigned int
|
} |
} |
|
|
static struct isis_nexthop6 * |
static struct isis_nexthop6 * |
isis_nexthop6_create (struct in6_addr *ip6, unsigned int ifindex) | isis_nexthop6_create (struct in6_addr *ip6, ifindex_t ifindex) |
{ |
{ |
struct listnode *node; |
struct listnode *node; |
struct isis_nexthop6 *nexthop6; |
struct isis_nexthop6 *nexthop6; |
Line 189 isis_nexthop6_delete (struct isis_nexthop6 *nexthop6)
|
Line 181 isis_nexthop6_delete (struct isis_nexthop6 *nexthop6)
|
|
|
static int |
static int |
nexthop6lookup (struct list *nexthops6, struct in6_addr *ip6, |
nexthop6lookup (struct list *nexthops6, struct in6_addr *ip6, |
unsigned int ifindex) | ifindex_t ifindex) |
{ |
{ |
struct listnode *node; |
struct listnode *node; |
struct isis_nexthop6 *nh6; |
struct isis_nexthop6 *nh6; |
Line 284 isis_route_info_new (struct prefix *prefix, uint32_t c
|
Line 276 isis_route_info_new (struct prefix *prefix, uint32_t c
|
struct listnode *node; |
struct listnode *node; |
|
|
rinfo = XCALLOC (MTYPE_ISIS_ROUTE_INFO, sizeof (struct isis_route_info)); |
rinfo = XCALLOC (MTYPE_ISIS_ROUTE_INFO, sizeof (struct isis_route_info)); |
if (!rinfo) |
|
{ |
|
zlog_err ("ISIS-Rte: isis_route_info_new: out of memory!"); |
|
return NULL; |
|
} |
|
|
|
if (prefix->family == AF_INET) |
if (prefix->family == AF_INET) |
{ |
{ |
Line 424 isis_route_create (struct prefix *prefix, u_int32_t co
|
Line 411 isis_route_create (struct prefix *prefix, u_int32_t co
|
prefix2str (prefix, (char *) buff, BUFSIZ); |
prefix2str (prefix, (char *) buff, BUFSIZ); |
|
|
rinfo_new = isis_route_info_new (prefix, cost, depth, adjacencies); |
rinfo_new = isis_route_info_new (prefix, cost, depth, adjacencies); |
if (!rinfo_new) |
|
{ |
|
zlog_err ("ISIS-Rte (%s): isis_route_create: out of memory!", |
|
area->area_tag); |
|
return NULL; |
|
} |
|
|
|
if (family == AF_INET) |
if (family == AF_INET) |
route_node = route_node_get (area->route_table[level - 1], prefix); |
route_node = route_node_get (area->route_table[level - 1], prefix); |