1Net::DHCP::Packet::AttrUisbeurteCso(n3tprmi)buted Perl DNoectu:m:eDnHtCaPt:i:oPnacket::Attributes(3pm)
2
3
4

NAME

6       Net::DHCP::Packet::Attributes - Attribute methods for Net::DHCP::Packet
7

VERSION

9       version 0.7
10

SYNOPSIS

12          use Net::DHCP::Packet::Attributes qw( :all );
13

DESCRIPTION

15       Provides attribute methods for Net::DHCP::Packet.
16
17       This module is not particularly useful on its own.
18

METHODS

20       comment( [STRING] )
21           Sets or gets the comment attribute (object meta-data only)
22
23       op( [BYTE] )
24           Sets/gets the BOOTP opcode.
25
26           Normal values are:
27
28             BOOTREQUEST()
29             BOOTREPLY()
30
31       htype( [BYTE] )
32           Sets/gets the hardware address type.
33
34           Common value is: HTYPE_ETHER() (1) = ethernet
35
36       hlen ( [BYTE] )
37           Sets/gets the hardware address length. Value must be between 0 and
38           16.
39
40           For most NIC's, the MAC address has 6 bytes.
41
42       hops ( [BYTE] )
43           Sets/gets the number of hops.
44
45           This field is incremented by each encountered DHCP relay agent.
46
47       xid ( [INTEGER] )
48           Sets/gets the 32 bits transaction id.
49
50           This field should be a random value set by the DHCP client.
51
52       secs ( [SHORT] )
53           Sets/gets the 16 bits elapsed boot time in seconds.
54
55       flags ( [SHORT] )
56           Sets/gets the 16 bits flags.
57
58             0x8000 = Broadcast reply requested.
59
60       ciaddr ( [STRING] )
61           Sets/gets the client IP address.
62
63           IP address is only accepted as a string like '10.24.50.3'.
64
65           Note: IP address is internally stored as a 4 bytes binary string.
66           See "Special methods" below.
67
68       yiaddr ( [STRING] )
69           Sets/gets the your IP address.
70
71           IP address is only accepted as a string like '10.24.50.3'.
72
73           Note: IP address is internally stored as a 4 bytes binary string.
74           See "Special methods" below.
75
76       siaddr ( [STRING] )
77           Sets/gets the next server IP address.
78
79           IP address is only accepted as a string like '10.24.50.3'.
80
81           Note: IP address is internally stored as a 4 bytes binary string.
82           See "Special methods" below.
83
84       giaddr ( [STRING] )
85           Sets/gets the relay agent IP address.
86
87           IP address is only accepted as a string like '10.24.50.3'.
88
89           Note: IP address is internally stored as a 4 bytes binary string.
90           See "Special methods" below.
91
92       chaddr ( [STRING] )
93           Sets/gets the client hardware address. Its length is given by the
94           "hlen" attribute.
95
96           Value is formatted as an Hexadecimal string representation.
97
98             Example: "0010A706DFFF" for 6 bytes mac address.
99
100           Note : internal format is packed bytes string.  See "Special
101           methods" below.
102
103       sname ( [STRING] )
104           Sets/gets the "server host name". Maximum size is 63 bytes. If
105           greater a warning is issued.
106
107       file ( [STRING] )
108           Sets/gets the "boot file name". Maximum size is 127 bytes. If
109           greater a warning is issued.
110
111       isDhcp ( [BOOLEAN] )
112           Sets/gets the DHCP cookie. Returns whether the cookie is valid or
113           not, hence whether the packet is DHCP or BOOTP.
114
115           Default value is 1, valid DHCP cookie.
116
117       padding ( [BYTES] )
118           Sets/gets the optional padding at the end of the DHCP packet, i.e.
119           after DHCP options.
120
121           Convert to hex with:
122            unpack( 'H*', $obj->padding() )
123
124   SPECIAL METHODS
125       These methods are provided for performance tuning only. They give
126       access to internal data representation , thus avoiding unnecessary type
127       conversion.
128
129       ciaddrRaw ( [STRING])
130           Sets/gets the client IP address in packed 4 characters binary
131           strings.
132
133       yiaddrRaw ( [STRING] )
134           Sets/gets the your IP address in packed 4 characters binary
135           strings.
136
137       siaddrRaw ( [STRING] )
138           Sets/gets the next server IP address in packed 4 characters binary
139           strings.
140
141       giaddrRaw ( [STRING] )
142           Sets/gets the relay agent IP address in packed 4 characters binary
143           strings.
144
145       chaddrRaw ( [STRING] )
146           Sets/gets the client hardware address in packed binary string.  Its
147           length is given by the "hlen" attribute.
148

SEE ALSO

150       Net::DHCP, Net::DHCP::Packet, Net::DHCP::Constants.
151

AUTHOR

153       Dean Hamstead <dean@fragfest.com.au>
154
156       This software is Copyright (c) 2022 by Dean Hamstead.
157
158       This is free software, licensed under:
159
160         The MIT (X11) License
161
162
163
164perl v5.38.0                      2023-07-21Net::DHCP::Packet::Attributes(3pm)
Impressum