diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-06-20 13:22:02 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-06-20 15:32:56 +0900 |
commit | bf018a623f8acc70721d1d09f95fd72c2bad6df3 (patch) | |
tree | b849de8fa31d175d4d9815187229a74d5659caf9 /packet/bgp.go | |
parent | 1380d3697201754fd496444fc66391b5622fe62b (diff) |
packet: make getPathAttribute public
we use this function later in mrt code
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp.go')
-rw-r--r-- | packet/bgp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 15888439..b5d5f9f5 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -3681,7 +3681,7 @@ func (p *PathAttributeUnknown) MarshalJSON() ([]byte, error) { return json.Marshal(p.ToApiStruct()) } -func getPathAttribute(data []byte) (PathAttributeInterface, error) { +func GetPathAttribute(data []byte) (PathAttributeInterface, error) { if len(data) < 1 { eCode := uint8(BGP_ERROR_UPDATE_MESSAGE_ERROR) eSubCode := uint8(BGP_ERROR_SUB_MALFORMED_ATTRIBUTE_LIST) @@ -3789,7 +3789,7 @@ func (msg *BGPUpdate) DecodeFromBytes(data []byte) error { } for pathlen := msg.TotalPathAttributeLen; pathlen > 0; { - p, err := getPathAttribute(data) + p, err := GetPathAttribute(data) if err != nil { return err } |