Extended-Community
NAME
Net::BGP::Message::Path-Attribute::Extended-Community - BGP Extended-Community Path-Attribute Object
SYNOPSIS
use Net::BGP::Path-Attribute::Extended-Community;
my $cap = Net::BGP::Path-Attribute::Extended-Community.from-raw( $raw );
# or …
my $cap = Net::BGP::Path-Attribute::Extended-Community.from-hash(
%{ Extended-community => 'RT:65000:123456' }
);
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 extended-community
. Path-Attribute code
should represent the desired path-attribute code. The extended-community
should be a list of attributes in the format T:S:V1:V2 where T is the
type value (including transitive and IETF bits), S is the subtype value (or
first byte of data where applicable), V1 is the first 16 bits of the value,
and V2 is the last 32 bits of the value.
Optionally, instead of providing T and S,i
"ET" can be used to specify an encapsulation type when followed by the type integer.
"RT" can be used to specify a route target type with transitive set.
"SoO" can be used to specify a route origin.
"OSPF-Route-Type" can be used to specify an OSPF route type, when followed by the OSPF area, OSPF route type, and OSPF route options (for example, "OSPF-Route-Type:0:5:1" for an OSPF route in area 0, with a type of 5, and an option indicating a type 1 metric).
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.
ip
The IP address (in string format) of the next hop.
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.