]> git.proxmox.com Git - mirror_frr.git/blobdiff - staticd/static_routes.h
zebra: Convert socket interface to use `union sockunion`
[mirror_frr.git] / staticd / static_routes.h
index ec4ca1861cd807c9b38771d0c8ebf489f0f5debd..6036bfe396970df625915b759ee4e68f5e909233 100644 (file)
@@ -3,15 +3,15 @@
  * Copyright (C) 2018 Cumulus Networks, Inc.
  *               Donald Sharp
  *
- * FRR 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.
+ * This program 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 of the License, or (at your option)
+ * any later version.
  *
- * FRR 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.
+ * This program 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 this program; see the file COPYING; if not, write to the Free Software
@@ -79,6 +79,13 @@ struct static_route {
        struct static_nh_label snh_label;
 
        uint32_t table_id;
+
+       /*
+        * Whether to pretend the nexthop is directly attached to the specified
+        * link. Only meaningful when both a gateway address and interface name
+        * are specified.
+        */
+       bool onlink;
 };
 
 extern bool mpls_enabled;
@@ -94,7 +101,7 @@ extern int static_add_route(afi_t afi, safi_t safi, uint8_t type,
                            uint8_t distance, struct static_vrf *svrf,
                            struct static_vrf *nh_svrf,
                            struct static_nh_label *snh_label,
-                           uint32_t table_id);
+                           uint32_t table_id, bool onlink);
 
 extern int static_delete_route(afi_t afi, safi_t safi, uint8_t type,
                               struct prefix *p, struct prefix_ipv6 *src_p,
@@ -106,5 +113,7 @@ extern int static_delete_route(afi_t afi, safi_t safi, uint8_t type,
 
 extern void static_cleanup_vrf_ids(struct static_vrf *disable_svrf);
 
+extern void static_install_intf_nh(struct interface *ifp);
+
 extern void static_ifindex_update(struct interface *ifp, bool up);
 #endif