org.apache.directory.server.dhcp.messages
Class DhcpMessage

java.lang.Object
  extended by org.apache.directory.server.dhcp.messages.DhcpMessage

public class DhcpMessage
extends java.lang.Object


Constructor Summary
DhcpMessage(MessageType messageType, byte opCode, byte hardwareAddressType, byte hardwareAddressLength, byte hardwareOptions, int transactionId, short seconds, short flags, byte[] actualClientAddress, byte[] assignedClientAddress, byte[] nextServerAddress, byte[] relayAgentAddress, byte[] clientHardwareAddress, byte[] serverHostname, byte[] bootFileName, OptionsField options)
           
 
Method Summary
 byte[] getActualClientAddress()
          Client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ARP requests.
 byte[] getAssignedClientAddress()
          Get 'your' (client) IP address.
 byte[] getBootFileName()
          Boot file name, null terminated string; "generic" name or null in DHCPDISCOVER, fully qualified directory-path name in DHCPOFFER.
 byte[] getClientHardwareAddress()
          Client hardware address.
 short getFlags()
          Flags.
 byte getHardwareAddressLength()
          Hardware address length (e.g.
 byte getHardwareAddressType()
          Hardware address type, see ARP section in "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet.
 byte getHardwareOptions()
          Client sets to zero, optionally used by relay agents when booting via a relay agent.
 MessageType getMessageType()
          Message type.
 byte[] getNextServerAddress()
          IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server.
 byte getOpCode()
          Message op code / message type.
 OptionsField getOptions()
          Optional parameters field.
 byte[] getRelayAgentAddress()
          Relay agent IP address, used in booting via a relay agent.
 short getSeconds()
          Filled in by client, seconds elapsed since client began address acquisition or renewal process.
 byte[] getServerHostname()
          Optional server host name, null terminated string.
 int getTransactionId()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DhcpMessage

public DhcpMessage(MessageType messageType,
                   byte opCode,
                   byte hardwareAddressType,
                   byte hardwareAddressLength,
                   byte hardwareOptions,
                   int transactionId,
                   short seconds,
                   short flags,
                   byte[] actualClientAddress,
                   byte[] assignedClientAddress,
                   byte[] nextServerAddress,
                   byte[] relayAgentAddress,
                   byte[] clientHardwareAddress,
                   byte[] serverHostname,
                   byte[] bootFileName,
                   OptionsField options)
Method Detail

getMessageType

public MessageType getMessageType()
Message type.


getOpCode

public byte getOpCode()
Message op code / message type. 1 = BOOTREQUEST, 2 = BOOTREPLY


getHardwareAddressType

public byte getHardwareAddressType()
Hardware address type, see ARP section in "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet.


getHardwareAddressLength

public byte getHardwareAddressLength()
Hardware address length (e.g. '6' for 10mb ethernet).


getHardwareOptions

public byte getHardwareOptions()
Client sets to zero, optionally used by relay agents when booting via a relay agent.


getTransactionId

public int getTransactionId()
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.


getSeconds

public short getSeconds()
Filled in by client, seconds elapsed since client began address acquisition or renewal process.


getFlags

public short getFlags()
Flags.


getActualClientAddress

public byte[] getActualClientAddress()
Client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ARP requests.


getAssignedClientAddress

public byte[] getAssignedClientAddress()
Get 'your' (client) IP address.


getNextServerAddress

public byte[] getNextServerAddress()
IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server.


getRelayAgentAddress

public byte[] getRelayAgentAddress()
Relay agent IP address, used in booting via a relay agent.


getClientHardwareAddress

public byte[] getClientHardwareAddress()
Client hardware address.


getServerHostname

public byte[] getServerHostname()
Optional server host name, null terminated string.


getBootFileName

public byte[] getBootFileName()
Boot file name, null terminated string; "generic" name or null in DHCPDISCOVER, fully qualified directory-path name in DHCPOFFER.


getOptions

public OptionsField getOptions()
Optional parameters field. See the options documents for a list of defined options.



Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.