2 * Static Routing Information header
3 * Copyright (C) 2016 Cumulus Networks
6 * This file is part of Quagga.
8 * Quagga is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * Quagga is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; see the file COPYING; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef __ZEBRA_STATIC_H__
23 #define __ZEBRA_STATIC_H__
25 /* Static route label information */
26 struct static_nh_label
30 mpls_label_t label
[2];
38 STATIC_IPV6_GATEWAY_IFINDEX
,
41 /* Static route information. */
44 /* For linked list. */
45 struct static_route
*prev
;
46 struct static_route
*next
;
51 /* Administrative distance. */
57 /* Flag for this static route's type. */
58 zebra_static_types type
;
63 * Under IPv4 addr and ifindex are
64 * used independentyly.
65 * STATIC_IPV4_GATEWAY uses addr
66 * STATIC_IFINDEX uses ifindex
71 char ifname
[INTERFACE_NAMSIZ
+ 1];
80 /* Label information */
81 struct static_nh_label snh_label
;
85 static_install_route (afi_t afi
, safi_t safi
, struct prefix
*p
,
86 struct prefix_ipv6
*src_p
, struct static_route
*si
);
88 static_uninstall_route (afi_t afi
, safi_t safi
, struct prefix
*p
,
89 struct prefix_ipv6
*src_p
, struct static_route
*si
);
92 static_add_route (afi_t
, safi_t safi
, u_char type
, struct prefix
*p
,
93 struct prefix_ipv6
*src_p
,
94 union g_addr
*gate
, ifindex_t ifindex
,
95 const char *ifname
, u_char flags
, route_tag_t tag
,
96 u_char distance
, struct zebra_vrf
*zvrf
,
97 struct static_nh_label
*snh_label
);
100 static_delete_route (afi_t
, safi_t safi
, u_char type
, struct prefix
*p
,
101 struct prefix_ipv6
*src_p
,
102 union g_addr
*gate
, ifindex_t ifindex
, route_tag_t tag
,
103 u_char distance
, struct zebra_vrf
*zvrf
,
104 struct static_nh_label
*snh_label
);
107 zebra_static_ipv4 (struct vty
*vty
, safi_t safi
, int add_cmd
,
108 const char *dest_str
, const char *mask_str
,
109 const char *gate_str
, const char *flag_str
,
110 const char *tag_str
, const char *distance_str
,
111 const char *vrf_id_str
, const char *label_str
);
114 static_ipv6_func (struct vty
*vty
, int add_cmd
, const char *dest_str
,
116 const char *gate_str
, const char *ifname
,
117 const char *flag_str
, const char *tag_str
,
118 const char *distance_str
, const char *vrf_id_str
,
119 const char *label_str
);