summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/bgp.go
diff options
context:
space:
mode:
authorAntoine Eiche <antoine.eiche@cloudwatt.com>2016-06-13 17:00:59 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-06-14 16:46:39 +0900
commit70f709558781ba6a0ea4d8513d80ef5c80e34c41 (patch)
treecdb9510c6c7dccdb09cf7f92e0b220651707e125 /packet/bgp/bgp.go
parentfb7617b988b05e6100dffa72fcbe818f82ad9a13 (diff)
bgp: partial TwoOctetAsSpecificExtended.Flat and OpaqueExtended.Flat implementation
Only EC_SUBTYPE_ROUTE_TARGET and EC_SUBTYPE_ENCAPSULATION are implemented.
Diffstat (limited to 'packet/bgp/bgp.go')
-rw-r--r--packet/bgp/bgp.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go
index 7295ec1f..75dda14f 100644
--- a/packet/bgp/bgp.go
+++ b/packet/bgp/bgp.go
@@ -7086,10 +7086,16 @@ func (e *MessageError) Error() string {
}
func (e *TwoOctetAsSpecificExtended) Flat() map[string]string {
+ if e.SubType == EC_SUBTYPE_ROUTE_TARGET {
+ return map[string]string{"routeTarget": e.String()}
+ }
return map[string]string{}
}
func (e *OpaqueExtended) Flat() map[string]string {
+ if e.SubType == EC_SUBTYPE_ENCAPSULATION {
+ return map[string]string{"encaspulation": e.Value.String()}
+ }
return map[string]string{}
}