-
Notifications
You must be signed in to change notification settings - Fork 5
/
sr_tlv_api.h
77 lines (62 loc) · 2.35 KB
/
sr_tlv_api.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* =====================================================================================
*
* Filename: sr_tlv_api.h
*
* Description: Defines the APIs to process SR related TLVs
*
* Version: 1.0
* Created: Monday 26 February 2018 01:48:38 IST
* Revision: 1.0
* Compiler: gcc
*
* Author: Er. Abhishek Sagar, Networking Developer (AS), [email protected]
* Company: Brocade Communications(Jul 2012- Mar 2016), Current : Juniper Networks(Apr 2017 - Present)
*
* This file is part of the SPFComputation distribution (https://github.com/sachinites).
* Copyright (c) 2017 Abhishek Sagar.
* 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, version 3.
*
* 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. If not, see <http://www.gnu.org/licenses/>.
*
* =====================================================================================
*/
#ifndef __SR_TLV_API__
#define __SR_TLV_API__
#include "instanceconst.h"
typedef struct _node_t node_t;
typedef struct prefix_ prefix_t;
typedef struct _prefix_sid_subtlv_t prefix_sid_subtlv_t;
boolean
set_node_sid(node_t *node, mpls_label_t node_sid_value);
boolean
unset_node_sid(node_t *node);
boolean
set_interface_address_prefix_sid(node_t *node, char *interface,
mpls_label_t prefix_sid_value);
boolean
unset_interface_address_prefix_sid(node_t *node, char *interface);
boolean
set_interface_adj_sid(node_t *node, char *interface,
mpls_label_t adj_sid_value);
boolean
unset_interface_adj_sid(node_t *node, char *interface);
boolean
update_prefix_sid(node_t *node, prefix_t *prefix, mpls_label_t prefix_sid_value, LEVEL level);
void
diplay_prefix_sid(prefix_t *prefix);
unsigned int
PREFIX_SID_INDEX(prefix_t *prefix);
prefix_sid_subtlv_t *
get_prefix_sid(prefix_t *prefix);
void
free_prefix_sid(prefix_t *prefix);
#endif /* __SR_TLV_API__ */