From 0846db61601ba06e7feb587a4e7d1877671cec39 Mon Sep 17 00:00:00 2001 From: Louis Poinsignon Date: Fri, 25 Oct 2019 12:47:12 -0700 Subject: [PATCH] Add GetMaxLen to the prefixfile api --- prefixfile/prefixfile.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prefixfile/prefixfile.go b/prefixfile/prefixfile.go index 952e0d7..e6cb307 100644 --- a/prefixfile/prefixfile.go +++ b/prefixfile/prefixfile.go @@ -110,6 +110,10 @@ func (roa *ROAJson) GetPrefix() *net.IPNet { return prefix } +func (roa *ROAJson) GetMaxLen() int { + return int(roa.Length) +} + func (roa *ROAJson) String() string { return fmt.Sprintf("%v/%v/%v", roa.Prefix, roa.Length, roa.ASN) }