summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_sr.h
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2018-01-29 17:58:53 +0100
committerOlivier Dugeon <olivier.dugeon@orange.com>2018-01-29 17:58:53 +0100
commit7743f2f8c00ed2541454a806c1dc55257e06c7a5 (patch)
tree535706c0cba106a9579ed990156be19934c97f3d /ospfd/ospf_sr.h
parentOSPFD: Set Segment Routing patch conform to C99 (diff)
downloadfrr-7743f2f8c00ed2541454a806c1dc55257e06c7a5.tar.xz
frr-7743f2f8c00ed2541454a806c1dc55257e06c7a5.zip
OSPFd: Update Segment Routing PR following review
Following various review, following files have been modfied: - All: Change u_intXX_t typedef to standard uintXX_t types - doc/OSPF-SR.rst: Update doc in particular the Linux Kernel configuration section - doc/ospfd.texi: Update CLI - ospfd/ospf_dump.[c,h]: Add new 'debug ospf sr' when performing 'sh run' - ospfd/ospf_ext.[c, h]: Various bug corrections notably to handle flooding of Extended Prefix at startup. iFix TLVs size for LAN Adjacency. Update Licence as per Community.md - ospfd/ospf_opaque.c: Add proper termination function call to remove MPLS entries - ospfd/ospf_ri.[c,h]: Bug corrections - ospfd/ospf_sr.[c,h]: Various bug corrections, notably to determine the nexthop SR Node. Add support to 'no-php-flag'. Update Licence as per Community.md - ospfd/ospfd.c: Add call to 'ospf_opaque_term()' Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_sr.h')
-rw-r--r--ospfd/ospf_sr.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/ospfd/ospf_sr.h b/ospfd/ospf_sr.h
index 938e4740c..172e8a536 100644
--- a/ospfd/ospf_sr.h
+++ b/ospfd/ospf_sr.h
@@ -7,24 +7,21 @@
* Author: Olivier Dugeon <olivier.dugeon@orange.com>
* Author: Anselme Sawadogo <anselmesawadogo@gmail.com>
*
- * Copyright (C) 2016 - 2017 Orange Labs http://www.orange.com
+ * Copyright (C) 2016 - 2018 Orange Labs http://www.orange.com
*
- * This file is part of FRR.
+ * 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 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 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.
*
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with FRR; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * 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
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _FRR_OSPF_SR_H
@@ -43,9 +40,9 @@
#define SET_LABEL(label) ((label << 8) & SET_LABEL_MASK)
#define GET_LABEL(label) ((label >> 8) & GET_LABEL_MASK)
-/* Label range for Adj-SID attribution purpose. See ospf_ext.c */
-#define ADJ_SID_MIN 50000
-#define ADJ_SID_MAX 51000
+/* Label range for Adj-SID attribution purpose. Start just right after SRGB */
+#define ADJ_SID_MIN MPLS_DEFAULT_MAX_SRGB_LABEL
+#define ADJ_SID_MAX (MPLS_DEFAULT_MAX_SRGB_LABEL + 1000)
#define OSPF_SR_DEFAULT_METRIC 1
@@ -259,7 +256,7 @@ struct sr_link {
uint32_t instance;
/* Flags to manage this link parameters. */
- uint32_t flags[2];
+ uint8_t flags[2];
/* Segment Routing ID */
uint32_t sid[2];
@@ -279,7 +276,7 @@ struct sr_prefix {
uint32_t instance;
/* Flags to manage this prefix parameters. */
- uint32_t flags;
+ uint8_t flags;
/* Segment Routing ID */
uint32_t sid;
@@ -291,8 +288,10 @@ struct sr_prefix {
/* Back pointer to SR Node which advertise this Prefix */
struct sr_node *srn;
- /* Pointer to SR Node which is the next hop for this Prefix
- * or NULL if next hop is the destination of the prefix */
+ /*
+ * Pointer to SR Node which is the next hop for this Prefix
+ * or NULL if next hop is the destination of the prefix
+ */
struct sr_node *nexthop;
};
@@ -303,13 +302,14 @@ extern void ospf_sr_term(void);
/* Segment Routing LSA update & delete functions */
extern void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa);
extern void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa);
-extern void ospf_sr_ext_link_lsa_update(struct ospf_lsa *);
-extern void ospf_sr_ext_link_lsa_delete(struct ospf_lsa *);
-extern void ospf_sr_ext_prefix_lsa_update(struct ospf_lsa *);
-extern void ospf_sr_ext_prefix_lsa_delete(struct ospf_lsa *);
+extern void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa);
+extern void ospf_sr_ext_link_lsa_delete(struct ospf_lsa *lsa);
+extern void ospf_sr_ext_prefix_lsa_update(struct ospf_lsa *lsa);
+extern void ospf_sr_ext_prefix_lsa_delete(struct ospf_lsa *lsa);
/* Segment Routing configuration functions */
extern uint32_t get_ext_link_label_value(void);
-extern void ospf_sr_config_write_router(struct vty *);
+extern void ospf_sr_config_write_router(struct vty *vty);
+extern void ospf_sr_update_prefix(struct interface *ifp, struct prefix *p);
/* Segment Routing re-routing function */
-extern void ospf_sr_update_timer_add(struct ospf *);
+extern void ospf_sr_update_timer_add(struct ospf *ospf);
#endif /* _FRR_OSPF_SR_H */