NAME
VMPS::Packet - Handle VMPS request/response packets.
FUNCTIONS
client_ip()
Return the IP address encoded in the request. NB: this may be different from the source IP in the UDP header.
port()
The switch port name in the request.
vlan()
Return the VLAN name from the request. With arg, sets the VLAN name in replies:
$reply->vlan('your_vlan');
domain()
Returns the VTP domain from the request.
packet()
Returns the "first packet" that may be encoded in the request.
mac_addr()
Returns a Net::MAC object with the MAC address from the request. This searches the dynamic mac address (0xc06), then the static mac address (0xc08). Returns undef if none can be found.
GENERATING REPLIES
reply()
Create a request object with the specified error code and vlan. Vlan may be omitted for error codes other than VLAN_ERROR_NONE.
my $reply = $request->reply($err_code, $vlan);
GENERATING REPLIES MADE EASY
reject()
Create a response object that rejects the request.
accept($vlan)
Accept the request, assign the user to the specified VLAN name.
shutdown()
Reject the request; instruct the switch to shutdown the port.
wrong_domain()
Reject the request because it is from the wrong domain.