Main > Programming > Libraries >

Net::DHCP::Packet 0.66

Net::DHCP::Packet 0.66

Sponsored Links

Net::DHCP::Packet 0.66 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.021 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 868
Date added: 2007-06-23
Publisher: Stephan Hadinger

Net::DHCP::Packet 0.66 description

Net::DHCP::Packet is a Perl module with object methods to create a DHCP packet.

SYNOPSIS

use Net::DHCP::Packet;

my $p = new Net::DHCP::Packet->new(
Chaddr => 000BCDEF,
Xid => 0x9F0FD,
Ciaddr => 0.0.0.0,
Siaddr => 0.0.0.0,
Hops => 0);

Represents a DHCP packet as specified in RFC 1533, RFC 2132.

CONSTRUCTOR

This module only provides basic constructor. For "easy" constructors, you can use the Net::DHCP::Session module.

new( )

new( BUFFER )

new( ARG => VALUE, ARG => VALUE... )

Creates an Net::DHCP::Packet object, which can be used to send or receive DHCP network packets. BOOTP is not supported.

Without argument, a default empty packet is created.

$packet = Net::DHCP::Packet();

A BUFFER argument is interpreted as a binary buffer like one provided by the socket recv() function. if the packet is malformed, a fatal error is issued.

use IO::Socket::INET;
use Net::DHCP::Packet;

$sock = IO::Socket::INET->new(LocalPort => 67, Proto => "udp", Broadcast => 1)
or die "socket: $@";

while ($sock->recv($newmsg, 1024)) {
$packet = Net::DHCP::Packet->new($newmsg);
print $packet->toString();
}

To create a fresh new packet new() takes arguments as a key-value pairs :

ARGUMENT FIELD OCTETS DESCRIPTION
-------- ----- ------ -----------

Op op 1 Message op code / message type.
1 = BOOTREQUEST, 2 = BOOTREPLY
Htype htype 1 Hardware address type, see ARP section in "Assigned
Numbers" RFC; e.g., 1 = 10mb ethernet.
Hlen hlen 1 Hardware address length (e.g. 6 for 10mb
ethernet).
Hops hops 1 Client sets to zero, optionally used by relay agents
when booting via a relay agent.
Xid xid 4 Transaction ID, a random number chosen by the
client, used by the client and server to associate
messages and responses between a client and a
server.
Secs secs 2 Filled in by client, seconds elapsed since client
began address acquisition or renewal process.
Flags flags 2 Flags (see figure 2).
Ciaddr ciaddr 4 Client IP address; only filled in if client is in
BOUND, RENEW or REBINDING state and can respond
to ARP requests.
Yiaddr yiaddr 4 your (client) IP address.
Siaddr siaddr 4 IP address of next server to use in bootstrap;
returned in DHCPOFFER, DHCPACK by server.
Giaddr giaddr 4 Relay agent IP address, used in booting via a
relay agent.
Chaddr chaddr 16 Client hardware address.
Sname sname 64 Optional server host name, null terminated string.
File file 128 Boot file name, null terminated string; "generic"
name or null in DHCPDISCOVER, fully qualified
directory-path name in DHCPOFFER.
IsDhcp isDhcp 4 Controls whether the packet is BOOTP or DHCP.
DHCP conatains the "magic cookie" of 4 bytes.
0x63 0x82 0x53 0x63.
DHO_*code Optional parameters field. See the options
documents for a list of defined options.
See Net::DHCP::Constants.
Padding padding * Optional padding at the end of the packet

See below methods for values and syntax descrption.

Note: DHCP options are created in the same order as key-value pairs.

Net::DHCP::Packet 0.66 Screenshot

Advertisements

Net::DHCP::Packet 0.66 Keywords

Bookmark Net::DHCP::Packet 0.66

Hyperlink code:
Link for forum:

Net::DHCP::Packet 0.66 Copyright

WareSeeker periodically updates pricing and software information of Net::DHCP::Packet 0.66 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Net::DHCP::Packet 0.66 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
NetPacket::IP is a Perl module to assemble and disassemble IP (Internet Protocol) packets. Free Download
Anemon Dhcp Servers goal is to create an implementation of the DHCP protocol under GPL. Free Download
ISC DHCP provides a freely redistributable reference implementation of all aspects of DHCP. Free Download
dhcp-helper is a simple, straightforward DHCP relay agent which I wrote as alternative to the ISC relay. Free Download
TCP Knocking provides a port knocking implementation. Free Download
Netdiscover is a network address discovering tool. Free Download
dhcpcd is an RFC2131-, RFC2132-, and RFC1541-compliant DHCP client daemon. Free Download
Dhcpclient is an RFC 2131 compatible DHCP client for Linux 2.6. Free Download