From bf018a623f8acc70721d1d09f95fd72c2bad6df3 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sat, 20 Jun 2015 13:22:02 +0900 Subject: packet: make getPathAttribute public we use this function later in mrt code Signed-off-by: ISHIDA Wataru --- packet/bgp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packet/bgp.go') 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 } -- cgit v1.2.3