diff options
Diffstat (limited to 'packet/bgp/bgp.go')
-rw-r--r-- | packet/bgp/bgp.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index ab2c5e5c..17b53f29 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -8170,6 +8170,12 @@ func (i *DefaultPmsiTunnelID) String() string { return string(i.Value) } +func NewDefaultPmsiTunnelID(value []byte) *DefaultPmsiTunnelID { + return &DefaultPmsiTunnelID{ + Value: value, + } +} + type IngressReplTunnelID struct { Value net.IP } @@ -8189,6 +8195,16 @@ func (i *IngressReplTunnelID) String() string { return i.Value.String() } +func NewIngressReplTunnelID(value string) *IngressReplTunnelID { + ip := net.ParseIP(value) + if ip == nil { + return nil + } + return &IngressReplTunnelID{ + Value: ip, + } +} + type PathAttributePmsiTunnel struct { PathAttribute IsLeafInfoRequired bool |