I try programming a software, which to use an DHCP Server, in Java!
So I found this nice API! ;-) Thank you very much!
Firstly I read out the DHCPDISCOVER paket to the console!
Secoundly I read this paket and make a DHCPOFFER Paket with the DHCPResponseFactory.makeDHCPOffer method!
Now I want to send this DHCPOFFER paket to the client!
How can I do this?
Good Evening!
I try programming a software, which to use an DHCP Server, in Java!
So I found this nice API! ;-) Thank you very much!
Firstly I read out the DHCPDISCOVER paket to the console!
Secoundly I read this paket and make a DHCPOFFER Paket with the DHCPResponseFactory.makeDHCPOffer method!
Now I want to send this DHCPOFFER paket to the client!
How can I do this?
There is my Code:
I now the DHCP Options for the DHCPOFFER paket aren't completely! But this doesn't matter at the moment!
So and there is the console output:
DHCP Packet
comment=
address=0.0.0.0(68)
op=BOOTREQUEST(1)
htype=HTYPE_ETHER(1)
hlen=6
hops=0
xid=0x2A5B76AB
secs=4
flags=0xffff8000
ciaddr=0.0.0.0
yiaddr=0.0.0.0
siaddr=0.0.0.0
giaddr=0.0.0.0
chaddr=0x000C295B76AB
sname=
file=
Options follows:
DHO_DHCP_MESSAGE_TYPE(53)=DHCPDISCOVER
DHO_DHCP_PARAMETER_REQUEST_LIST(55)=1 2 3 5 6 11 12 13 15 16 17 18 43 54 60 67 128 129 130 131 132 133 134 135
DHO_DHCP_MAX_MESSAGE_SIZE(57)=1260
(97)=0x00564D6464B30AEC3484A7F288615B76AB
(93)=0x0000
(94)=0x010201
DHO_VENDOR_CLASS_IDENTIFIER(60)="PXEClient:Arch:00000:UNDI:002001"
padding=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
DHCP Packet
comment=
address=255.255.255.255(68)
op=BOOTREPLY(2)
htype=HTYPE_ETHER(1)
hlen=6
hops=0
xid=0x2A5B76AB
secs=0
flags=0xffff8000
ciaddr=0.0.0.0
yiaddr=192.168.1.30
siaddr=0.0.0.0
giaddr=0.0.0.0
chaddr=0x000C295B76AB
sname=
file=
Options follows:
DHO_DHCP_MESSAGE_TYPE(53)=DHCPOFFER
DHO_DHCP_LEASE_TIME(51)=-1
DHO_DHCP_SERVER_IDENTIFIER(54)=192.168.1.5
DHO_DHCP_MESSAGE(56)="TEST"
padding=
Thank you for your help!