FileDocCategorySizeDatePackage
DhcpDeclinePacket.javaAPI DocAndroid 5.1 API1995Thu Mar 12 22:22:10 GMT 2015android.net.dhcp

DhcpDeclinePacket

public class DhcpDeclinePacket extends DhcpPacket
This class implements the DHCP-DECLINE packet.

Fields Summary
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.ByteBufferbuildPacket(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 voiddoNextOp(DhcpStateMachine machine)
Informs the state machine of the arrival of a DECLINE packet.

        machine.onDeclineReceived(mClientMac, mRequestedIp);
    
voidfinishPacket(java.nio.ByteBuffer buffer)
Adds optional parameters to the DECLINE packet.

        // None needed
    
public java.lang.StringtoString()

        String s = super.toString();
        return s + " DECLINE";