AS-Path
NAME
Net::BGP::Message::Path-Attribute::AS-Path - BGP AS-Path Path-Attribute Object
SYNOPSIS
use Net::BGP::Path-Attribute::AS-Path;
my $cap = Net::BGP::Path-Attribute::AS-Path.from-raw( $raw );
# or ā¦
my $cap = Net::BGP::Path-Attribute::AS-Path.from-hash(
!!! # NOT YET IMPLEMENTED
);
DESCRIPTION
BGP Path-Attribute Object
Constructors
from-raw
Constructs a new object for a given raw binary buffer.
from-hash
Constructs a new object for a given hash. This requires elements with keys of
path-attribute-code
and value
. Path-Attribute code should represent the
desired path-attribute code. Value should be a buf8
containing the payload
data (value
in RFC standards).
It also accepts values for optional
, transitive
, and partial
, which
are used to populate the flags
field in the attribute. These all default to
False
if they are not provided by the caller.
Methods
path-attribute-code
Cpaability code of the object.
path-attribute-name
The path-attribute name of the object.
flags
The value of the attribute flags (as a packed integer).
optional
True if the attribute is an optional (not well-known).
transitive
True if the attribute is a transitive attribute.
partial
True if the attribute is a partial attribute, I.E. this attribute was seen on an intermediate router that does not understand how to process it.
extended-length
True if the attribute uses a two digit length
reserved-flags
The four flags not defined in RFC4271, represented as a packed integer (values will be 0 through 15).
data-length
The length of the attribute's data.
data
This returns a buf8
containing the data in the attribute.
raw
Returns the raw (wire format) data for this path-attribute.
as-lists
Returns the AS-Lists present in the attribute as an array of AS-Lists.
as-path
Returns a string representation of the AS path.
as-array
Returns an array of AS path members.
as-path-first
Returns the first N AS path elements, as calculated according to RFC4271 section 9.1.1.2.
as-array-first
Returns the first N AS path elements as an array, as calcluated according to RFC4271 section 9.1.1.2.
path-length
Returns the length of the AS path, as calculated according to RFC4271 section 9.1.1.2.
AUTHOR
Joelle Maslak <[email protected]>
COPYRIGHT AND LICENSE
Copyright Ā© 2018-2019 Joelle Maslak
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.