diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-11-27 17:46:54 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-11-27 17:46:54 +0100 |
commit | a399694f39c6492e61e72d2145f4a2f4beed8ee2 (patch) | |
tree | 822956cf9f730663dbc0cb553c18b8da3ba8fba3 /lib/nexthop.h | |
parent | zebra: Fix non usage of VRF_DEFAULT (diff) | |
download | frr-a399694f39c6492e61e72d2145f4a2f4beed8ee2.tar.xz frr-a399694f39c6492e61e72d2145f4a2f4beed8ee2.zip |
Quagga: Nexthop refactoring
Upstream wanted some nexthop code to be refactored.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r-- | lib/nexthop.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h index 6909775a0..8a3a7620a 100644 --- a/lib/nexthop.h +++ b/lib/nexthop.h @@ -1,21 +1,22 @@ /* * Nexthop structure definition. + * Copyright (C) 1997, 98, 99, 2001 Kunihiro Ishiguro * Copyright (C) 2013 Cumulus Networks, Inc. * - * This file is part of GNU Zebra. + * This file is part of Quagga. * - * GNU Zebra is free software; you can redistribute it and/or modify it + * Quagga is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * - * GNU Zebra is distributed in the hope that it will be useful, but + * Quagga is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the Free + * along with Quagga; see the file COPYING. If not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ @@ -77,13 +78,6 @@ struct nexthop struct nexthop *resolved; }; -#define nexthop_new() \ -({ \ - struct nexthop *n = XCALLOC (MTYPE_NEXTHOP, sizeof (struct nexthop)); \ - n; \ -}) - - extern int zebra_rnh_ip_default_route; extern int zebra_rnh_ipv6_default_route; @@ -97,6 +91,13 @@ nh_resolve_via_default(int family) return 0; } +struct nexthop *nexthop_new (void); +void nexthop_add (struct nexthop **target, struct nexthop *nexthop); + +void copy_nexthops (struct nexthop **tnh, struct nexthop *nh); +void nexthop_free (struct nexthop *nexthop); +void nexthops_free (struct nexthop *nexthop); + extern const char *nexthop_type_to_str (enum nexthop_types_t nh_type); extern int nexthop_same_no_recurse (struct nexthop *next1, struct nexthop *next2); |