DhcpDeclinePacketpublic class DhcpDeclinePacket extends DhcpPacket This class implements the DHCP-DECLINE packet. |
Constructors Summary |
---|
DhcpDeclinePacket(int transId, InetAddress clientIp, InetAddress yourIp, InetAddress nextIp, InetAddress relayIp, byte[] clientMac)Generates a DECLINE packet with the specified parameters.
super(transId, clientIp, yourIp, nextIp, relayIp, clientMac, false);
|
Methods Summary |
---|
public java.nio.ByteBuffer | buildPacket(int encap, short destUdp, short srcUdp)Fills in a packet with the requested DECLINE attributes.
ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH);
fillInPacket(encap, mClientIp, mYourIp, destUdp, srcUdp, result,
DHCP_BOOTREQUEST, false);
result.flip();
return result;
| public void | doNextOp(DhcpStateMachine machine)Informs the state machine of the arrival of a DECLINE packet.
machine.onDeclineReceived(mClientMac, mRequestedIp);
| void | finishPacket(java.nio.ByteBuffer buffer)Adds optional parameters to the DECLINE packet.
// None needed
| public java.lang.String | toString()
String s = super.toString();
return s + " DECLINE";
|
|