NAME
Net::BGP4::Notification - Class encapsulating BGP4 NOTIFICATION message
SYNOPSIS
use Net::BGP4::Notification;
$error = new Net::BGP4::Notification(
ErrorCode => $error_code,
ErrorSubcode => $error_subcode,
ErrorData => $error_data
);
$error_code = $error->error_code();
$error_subcode = $error->error_subcode();
$error_data = $error->error_data();
DESCRIPTION
This module encapsulates the data contained in a BGP4 NOTIFICATION message. It provides a constructor, and accessor methods for each of the Error Code, Error Subcode, and Error Data fields of a NOTIFICATION. It is unlikely that user programs will need to instantiate Net::BGP4::Notification objects directly. However, when an error occurs and a NOTIFICATION message is sent or received by a BGP peering session established with the Net::BGP4 module, a reference to a Net::BGP4::Notification object will be passed to the corresponding user callback subroutine. The subroutine can then use the accessor methods provided by this module to examine the details of the NOTIFICATION message.
METHODS
new() - create a new Net::BGP4::Notification object
$error = new Net::BGP4::Notification(
ErrorCode => $error_code,
ErrorSubcode => $error_subcode,
ErrorData => $error_data
);
This is the constructor for Net::BGP4::Notification objects. It returns a reference to the newly created object. The following named parameters may be passed to the constructor.
ErrorCode
This parameter corresponds to the Error Code field of a NOTIFICATION message. It must be provided to the constructor.
ErrorSubcode
This parameter corresponds to the Error Subcode field of a NOTIFICATION message. It may be omitted, in which case the field defaults to the null (0) subcode value.
ErrorData
This parameter corresponds to the Error Data field of a NOTIFICATION message. It may be omitted, in which case the field defaults to a null (zero-length) value.
error_code() - retrieve the value of the Error Code field
$error_code = $error->error_code();
error_subcode() - retrieve the value of the Error Subcode field
$error_subcode = $error->error_subcode();
error_data() - retrieve the value of the Error Data field
$error_data = $error->error_data();
SEE ALSO
Net::BGP4, Net::BGP4::Process, Net::BGP4::Peer, Net::BGP4::Update
AUTHOR
Stephen J. Scheck <code@neurosphere.com>