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

A DHCP (RFC 2131) message. Field descriptions contain the oroginal RFC field names in brackets.

Version:
$Rev: 664295 $, $Date: 2008-06-07 09:48:16 +0200 (Sa, 07 Jun 2008) $
Author:
Apache Directory Project

Field Summary
static int FLAG_BROADCAST
          Flag value: request broadcast answer.
static byte OP_BOOTREPLY
          Operation constant: boot reply (server to client).
static byte OP_BOOTREQUEST
          Operation constant: boot request (client to server).
 
Constructor Summary
DhcpMessage()
          Create a default dhcp message.
DhcpMessage(MessageType messageType, byte op, HardwareAddress hardwareAddress, short hops, int transactionId, int seconds, short flags, java.net.InetAddress currentClientAddress, java.net.InetAddress assignedClientAddress, java.net.InetAddress nextServerAddress, java.net.InetAddress relayAgentAddress, java.lang.String serverHostname, java.lang.String bootFileName, OptionsField options)
          Create a DHCP message based on the supplied values.
 
Method Summary
 java.net.InetAddress getAssignedClientAddress()
           
 java.lang.String getBootFileName()
           
 java.net.InetAddress getCurrentClientAddress()
           
 short getFlags()
           
 HardwareAddress getHardwareAddress()
           
 short getHopCount()
           
 MessageType getMessageType()
           
 java.net.InetAddress getNextServerAddress()
           
 byte getOp()
           
 OptionsField getOptions()
           
 java.net.InetAddress getRelayAgentAddress()
           
 int getSeconds()
           
 java.lang.String getServerHostname()
           
 int getTransactionId()
           
 void setAssignedClientAddress(java.net.InetAddress assignedClientAddress)
           
 void setBootFileName(java.lang.String bootFileName)
           
 void setCurrentClientAddress(java.net.InetAddress currentClientAddress)
           
 void setFlags(short flags)
           
 void setHardwareAddress(HardwareAddress hardwareAddress)
           
 void setHopCount(short hopCount)
           
 void setMessageType(MessageType messageType)
           
 void setNextServerAddress(java.net.InetAddress nextServerAddress)
           
 void setOp(byte op)
           
 void setOptions(OptionsField options)
           
 void setRelayAgentAddress(java.net.InetAddress relayAgentAddress)
           
 void setSeconds(int seconds)
           
 void setServerHostname(java.lang.String serverHostname)
           
 void setTransactionId(int transactionId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FLAG_BROADCAST

public static final int FLAG_BROADCAST
Flag value: request broadcast answer.

See Also:
Constant Field Values

OP_BOOTREQUEST

public static final byte OP_BOOTREQUEST
Operation constant: boot request (client to server).

See Also:
op, Constant Field Values

OP_BOOTREPLY

public static final byte OP_BOOTREPLY
Operation constant: boot reply (server to client).

See Also:
op, Constant Field Values
Constructor Detail

DhcpMessage

public DhcpMessage()
Create a default dhcp message.


DhcpMessage

public DhcpMessage(MessageType messageType,
                   byte op,
                   HardwareAddress hardwareAddress,
                   short hops,
                   int transactionId,
                   int seconds,
                   short flags,
                   java.net.InetAddress currentClientAddress,
                   java.net.InetAddress assignedClientAddress,
                   java.net.InetAddress nextServerAddress,
                   java.net.InetAddress relayAgentAddress,
                   java.lang.String serverHostname,
                   java.lang.String bootFileName,
                   OptionsField options)
Create a DHCP message based on the supplied values.

Parameters:
messageType -
op -
hardwareAddress -
hops -
transactionId -
seconds -
flags -
currentClientAddress -
assignedClientAddress -
nextServerAddress -
relayAgentAddress -
serverHostname -
bootFileName -
options -
Method Detail

getAssignedClientAddress

public java.net.InetAddress getAssignedClientAddress()

getBootFileName

public java.lang.String getBootFileName()

getCurrentClientAddress

public java.net.InetAddress getCurrentClientAddress()

getFlags

public short getFlags()

getHopCount

public short getHopCount()

getMessageType

public MessageType getMessageType()

getNextServerAddress

public java.net.InetAddress getNextServerAddress()

getOptions

public OptionsField getOptions()

getRelayAgentAddress

public java.net.InetAddress getRelayAgentAddress()

getSeconds

public int getSeconds()

getServerHostname

public java.lang.String getServerHostname()

getTransactionId

public int getTransactionId()

setAssignedClientAddress

public void setAssignedClientAddress(java.net.InetAddress assignedClientAddress)

setBootFileName

public void setBootFileName(java.lang.String bootFileName)

setCurrentClientAddress

public void setCurrentClientAddress(java.net.InetAddress currentClientAddress)

setFlags

public void setFlags(short flags)

setHopCount

public void setHopCount(short hopCount)

setMessageType

public void setMessageType(MessageType messageType)

setNextServerAddress

public void setNextServerAddress(java.net.InetAddress nextServerAddress)

setOptions

public void setOptions(OptionsField options)

setRelayAgentAddress

public void setRelayAgentAddress(java.net.InetAddress relayAgentAddress)

setSeconds

public void setSeconds(int seconds)

setServerHostname

public void setServerHostname(java.lang.String serverHostname)

setTransactionId

public void setTransactionId(int transactionId)

getOp

public byte getOp()

setOp

public void setOp(byte op)

getHardwareAddress

public HardwareAddress getHardwareAddress()

setHardwareAddress

public void setHardwareAddress(HardwareAddress hardwareAddress)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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