blob: afcef471dcb2e5dcb4a5b766be6a795cc4b0d4fd (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
// Copyright (C) 2014,2015 Nippon Telegraph and Telephone Corporation.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package config
import "net"
// typedef for typedef bgp:remove-private-as-option
type RemovePrivateAsOption int
const (
REMOVE_PRIVATE_AS_OPTION_ALL = iota
REMOVE_PRIVATE_AS_OPTION_REPLACE
)
// typedef for typedef bgp:community-type
type CommunityType int
const (
COMMUNITY_TYPE_STANDARD = iota
COMMUNITY_TYPE_EXTENDED
COMMUNITY_TYPE_BOTH
COMMUNITY_TYPE_NONE
)
// typedef for typedef bgp:rr-cluster-id-type
type RrClusterIdType string
// typedef for typedef bgp:peer-type
type PeerTypeDef int
const (
PEER_TYPE_INTERNAL = iota
PEER_TYPE_EXTERNAL
)
// typedef for typedef bgp:percentage
type Percentage uint8
// typedef for typedef bgp:bgp-origin-attr-type
type BgpOriginAttrType int
const (
BGP_ORIGIN_ATTR_TYPE_IGP = 0
BGP_ORIGIN_ATTR_TYPE_EGP = 1
BGP_ORIGIN_ATTR_TYPE_INCOMPLETE = 2
)
// typedef for typedef rpol:install-protocol-type
type InstallProtocolType int
const (
INSTALL_PROTOCOL_TYPE_ISIS = iota
INSTALL_PROTOCOL_TYPE_OSPF
INSTALL_PROTOCOL_TYPE_OSPF3
INSTALL_PROTOCOL_TYPE_STATIC
INSTALL_PROTOCOL_TYPE_DIRECTLY_CONNECTED
)
// typedef for typedef rpol:default-policy-type
type DefaultPolicyType int
const (
DEFAULT_POLICY_TYPE_ACCEPT_ROUTE = iota
DEFAULT_POLICY_TYPE_REJECT_ROUTE
)
//struct for container apply-policy
type ApplyPolicy struct {
// original -> rpol:import-policies
ImportPolicies []string
// original -> rpol:default-import-policy
DefaultImportPolicy DefaultPolicyType
// original -> rpol:export-policies
ExportPolicies []string
// original -> rpol:default-export-policy
DefaultExportPolicy DefaultPolicyType
}
//struct for container bgp-neighbor-common-state
type BgpNeighborCommonState struct {
// original -> bgp-op:state
State uint32
// original -> bgp-op:uptime
Uptime int64
// original -> bgp-op:downtime
Downtime int64
// original -> bgp-op:open-in
OpenIn uint32
// original -> bgp-op:open-out
OpenOut uint32
// original -> bgp-op:update-in
UpdateIn uint32
// original -> bgp-op:update-out
UpdateOut uint32
// original -> bgp-op:update-recv-time
UpdateRecvTime int64
// original -> bgp-op:keepalive-in
KeepaliveIn uint32
// original -> bgp-op:keepalive-out
KeepaliveOut uint32
// original -> bgp-op:notify-in
NotifyIn uint32
// original -> bgp-op:notify-out
NotifyOut uint32
// original -> bgp-op:refresh-in
RefreshIn uint32
// original -> bgp-op:refresh-out
RefreshOut uint32
// original -> bgp-op:dynamic-cap-in
DynamicCapIn uint32
// original -> bgp-op:dynamic-cap-out
DynamicCapOut uint32
// original -> bgp-op:discarded-in
DiscardedIn uint32
// original -> bgp-op:discarded-out
DiscardedOut uint32
// original -> bgp-op:total-in
TotalIn uint32
// original -> bgp-op:total-out
TotalOut uint32
// original -> bgp-op:established-count
EstablishedCount uint32
// original -> bgp-op:flops
Flops uint32
}
//struct for container add-paths
type AddPaths struct {
// original -> bgp:receive
//receive's original type is empty
Receive bool
// original -> bgp:send-max
SendMax uint8
}
//struct for container as-path-options
type AsPathOptions struct {
// original -> bgp:allow-own-as
//allow-own-as's original type is boolean
AllowOwnAs bool
// original -> bgp:replace-peer-as
//replace-peer-as's original type is boolean
ReplacePeerAs bool
}
//struct for container error-handling
type ErrorHandling struct {
// original -> bgp:treat-as-withdraw
//treat-as-withdraw's original type is boolean
TreatAsWithdraw bool
}
//struct for container transport-options
type TransportOptions struct {
// original -> bgp:tcp-mss
TcpMss uint16
// original -> bgp:mtu-discovery
//mtu-discovery's original type is boolean
MtuDiscovery bool
// original -> bgp:passive-mode
//passive-mode's original type is boolean
PassiveMode bool
}
//struct for container bgp-logging-options
type BgpLoggingOptions struct {
// original -> bgp:log-neighbor-state-changes
//log-neighbor-state-changes's original type is boolean
LogNeighborStateChanges bool
}
//struct for container route-server
type RouteServer struct {
// original -> bgp:route-server-client
//route-server-client's original type is boolean
RouteServerClient bool
}
//struct for container route-reflector
type RouteReflector struct {
// original -> bgp:route-reflector-cluster-id
//route-reflector-cluster-id's original type is rr-cluster-id-type
RouteReflectorClusterId uint32
// original -> bgp:route-reflector-client
//route-reflector-client's original type is boolean
RouteReflectorClient bool
}
//struct for container ebgp-multihop
type EbgpMultihop struct {
// original -> bgp:multihop-ttl
MultihopTtl uint8
}
//struct for container timers
type Timers struct {
// original -> bgp:connect-retry
//connect-retry's original type is decimal64
ConnectRetry float64
// original -> bgp:hold-time
//hold-time's original type is decimal64
HoldTime float64
// original -> bgp:idle-hold-time-after-reset
//idle-hold-time-after-reset's original type is decimal64
IdleHoldTimeAfterReset float64
// original -> bgp:keepalive-interval
//keepalive-interval's original type is decimal64
KeepaliveInterval float64
// original -> bgp:minimum-advertisement-interval
//minimum-advertisement-interval's original type is decimal64
MinimumAdvertisementInterval float64
// original -> bgp:send-update-delay
//send-update-delay's original type is decimal64
SendUpdateDelay float64
}
//struct for container prefix-limit
type PrefixLimit struct {
// original -> bgp-mp:max-prefixes
MaxPrefixes uint32
// original -> bgp-mp:shutdown-threshold-pct
ShutdownThresholdPct Percentage
// original -> bgp-mp:restart-timer
//restart-timer's original type is decimal64
RestartTimer float64
}
//struct for container l2vpn-evpn
type L2vpnEvpn struct {
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container l2vpn-vpls
type L2vpnVpls struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container l3vpn-ipv6-multicast
type L3vpnIpv6Multicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container l3vpn-ipv4-multicast
type L3vpnIpv4Multicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container l3vpn-ipv6-unicast
type L3vpnIpv6Unicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container l3vpn-ipv4-unicast
type L3vpnIpv4Unicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container ipv6-labelled-unicast
type Ipv6LabelledUnicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container ipv4-labelled-unicast
type Ipv4LabelledUnicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container ipv6-multicast
type Ipv6Multicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container ipv4-multicast
type Ipv4Multicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
}
//struct for container ipv6-unicast
type Ipv6Unicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
// original -> bgp-mp:send-default-route
//send-default-route's original type is boolean
SendDefaultRoute bool
}
//struct for container ipv4-unicast
type Ipv4Unicast struct {
// original -> bgp-mp:enabled
//enabled's original type is boolean
Enabled bool
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit
// original -> bgp-mp:send-default-route
//send-default-route's original type is boolean
SendDefaultRoute bool
}
//struct for container afi-safi
type AfiSafi struct {
// original -> bgp-mp:afi-safi-name
AfiSafiName string
// original -> bgp-mp:ipv4-unicast
Ipv4Unicast Ipv4Unicast
// original -> bgp-mp:ipv6-unicast
Ipv6Unicast Ipv6Unicast
// original -> bgp-mp:ipv4-multicast
Ipv4Multicast Ipv4Multicast
// original -> bgp-mp:ipv6-multicast
Ipv6Multicast Ipv6Multicast
// original -> bgp-mp:ipv4-labelled-unicast
Ipv4LabelledUnicast Ipv4LabelledUnicast
// original -> bgp-mp:ipv6-labelled-unicast
Ipv6LabelledUnicast Ipv6LabelledUnicast
// original -> bgp-mp:l3vpn-ipv4-unicast
L3vpnIpv4Unicast L3vpnIpv4Unicast
// original -> bgp-mp:l3vpn-ipv6-unicast
L3vpnIpv6Unicast L3vpnIpv6Unicast
// original -> bgp-mp:l3vpn-ipv4-multicast
L3vpnIpv4Multicast L3vpnIpv4Multicast
// original -> bgp-mp:l3vpn-ipv6-multicast
L3vpnIpv6Multicast L3vpnIpv6Multicast
// original -> bgp-mp:l2vpn-vpls
L2vpnVpls L2vpnVpls
// original -> bgp-mp:l2vpn-evpn
L2vpnEvpn L2vpnEvpn
}
//struct for container graceful-restart
type GracefulRestart struct {
// original -> bgp:restart-time
RestartTime uint16
// original -> bgp:stale-routes-time
//stale-routes-time's original type is decimal64
StaleRoutesTime float64
}
//struct for container neighbor
type Neighbor struct {
// original -> bgp:neighbor-address
//neighbor-address's original type is inet:ip-address
NeighborAddress net.IP
// original -> bgp:peer-as
//peer-as's original type is inet:as-number
PeerAs uint32
// original -> bgp:description
Description string
// original -> bgp:graceful-restart
GracefulRestart GracefulRestart
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:afi-safi
AfiSafiList []AfiSafi
// original -> bgp:auth-password
AuthPassword string
// original -> bgp:peer-type
PeerType PeerTypeDef
// original -> bgp:timers
Timers Timers
// original -> bgp:ebgp-multihop
EbgpMultihop EbgpMultihop
// original -> bgp:route-reflector
RouteReflector RouteReflector
// original -> bgp:route-server
RouteServer RouteServer
// original -> bgp:remove-private-as
RemovePrivateAs RemovePrivateAsOption
// original -> bgp:bgp-logging-options
BgpLoggingOptions BgpLoggingOptions
// original -> bgp:transport-options
TransportOptions TransportOptions
// original -> bgp:local-address
//local-address's original type is inet:ip-address
LocalAddress net.IP
// original -> bgp:route-flap-damping
//route-flap-damping's original type is boolean
RouteFlapDamping bool
// original -> bgp:send-community
SendCommunity CommunityType
// original -> bgp:error-handling
ErrorHandling ErrorHandling
// original -> bgp:as-path-options
AsPathOptions AsPathOptions
// original -> bgp:add-paths
AddPaths AddPaths
// original -> bgp-op:bgp-neighbor-common-state
BgpNeighborCommonState BgpNeighborCommonState
}
//struct for container ibgp
type Ibgp struct {
// original -> bgp-mp:maximum-paths
MaximumPaths uint32
}
//struct for container ebgp
type Ebgp struct {
// original -> bgp-mp:allow-multiple-as
//allow-multiple-as's original type is boolean
AllowMultipleAs bool
// original -> bgp-mp:maximum-paths
MaximumPaths uint32
}
//struct for container use-multiple-paths
type UseMultiplePaths struct {
// original -> bgp-mp:ebgp
Ebgp Ebgp
// original -> bgp-mp:ibgp
Ibgp Ibgp
}
//struct for container bgp-group-common-state
type BgpGroupCommonState struct {
}
//struct for container peer-group
type PeerGroup struct {
// original -> bgp:group-name
GroupName string
// original -> bgp-op:bgp-group-common-state
BgpGroupCommonState BgpGroupCommonState
// original -> bgp:description
Description string
// original -> bgp:graceful-restart
GracefulRestart GracefulRestart
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
// original -> bgp-mp:afi-safi
AfiSafiList []AfiSafi
// original -> bgp:auth-password
AuthPassword string
// original -> bgp:peer-type
PeerType PeerTypeDef
// original -> bgp:timers
Timers Timers
// original -> bgp:ebgp-multihop
EbgpMultihop EbgpMultihop
// original -> bgp:route-reflector
RouteReflector RouteReflector
// original -> bgp:route-server
RouteServer RouteServer
// original -> bgp:remove-private-as
RemovePrivateAs RemovePrivateAsOption
// original -> bgp:bgp-logging-options
BgpLoggingOptions BgpLoggingOptions
// original -> bgp:transport-options
TransportOptions TransportOptions
// original -> bgp:local-address
//local-address's original type is inet:ip-address
LocalAddress net.IP
// original -> bgp:route-flap-damping
//route-flap-damping's original type is boolean
RouteFlapDamping bool
// original -> bgp:send-community
SendCommunity CommunityType
// original -> bgp:error-handling
ErrorHandling ErrorHandling
// original -> bgp:as-path-options
AsPathOptions AsPathOptions
// original -> bgp:add-paths
AddPaths AddPaths
// original -> bgp-mp:use-multiple-paths
UseMultiplePaths UseMultiplePaths
// original -> bgp:neighbor
NeighborList []Neighbor
}
//struct for container bgp-global-state
type BgpGlobalState struct {
}
//struct for container route-selection-options
type RouteSelectionOptions struct {
// original -> bgp-mp:always-compare-med
//always-compare-med's original type is boolean
AlwaysCompareMed bool
// original -> bgp-mp:ignore-as-path-length
//ignore-as-path-length's original type is boolean
IgnoreAsPathLength bool
// original -> bgp-mp:external-compare-router-id
//external-compare-router-id's original type is boolean
ExternalCompareRouterId bool
// original -> bgp-mp:advertise-inactive-routes
//advertise-inactive-routes's original type is boolean
AdvertiseInactiveRoutes bool
// original -> bgp-mp:enable-aigp
//enable-aigp's original type is empty
EnableAigp bool
// original -> bgp-mp:ignore-next-hop-igp-metric
//ignore-next-hop-igp-metric's original type is boolean
IgnoreNextHopIgpMetric bool
}
//struct for container confederation
type Confederation struct {
// original -> bgp:identifier
//identifier's original type is inet:as-number
Identifier uint32
// original -> bgp:member-as
//original type is list of inet:as-number
MemberAs []uint32
}
//struct for container default-route-distance
type DefaultRouteDistance struct {
// original -> bgp:external-route-distance
ExternalRouteDistance uint8
// original -> bgp:internal-route-distance
InternalRouteDistance uint8
}
//struct for container global
type Global struct {
// original -> bgp:as
//as's original type is inet:as-number
As uint32
// original -> bgp:router-id
//router-id's original type is inet:ipv4-address
RouterId net.IP
// original -> bgp:default-route-distance
DefaultRouteDistance DefaultRouteDistance
// original -> bgp:confederation
Confederation Confederation
// original -> bgp-mp:use-multiple-paths
UseMultiplePaths UseMultiplePaths
// original -> bgp-mp:afi-safi
AfiSafiList []AfiSafi
// original -> bgp-op:bgp-global-state
BgpGlobalState BgpGlobalState
}
//struct for container bgp
type Bgp struct {
// original -> bgp:global
Global Global
// original -> bgp:peer-group
PeerGroupList []PeerGroup
// original -> bgp:neighbor
NeighborList []Neighbor
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy
}
|