Author: erodriguez
Date: Sat Jan  8 21:49:17 2005
New Revision: 124705

URL: http://svn.apache.org/viewcvs?view=rev&rev=124705
Log:
Modified options in dhcp options package to use new IP address option base 
classes.
Modified:
   
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java
   
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java

Modified: 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java?view=diff&rev=124705&p1=incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java&r1=124704&p2=incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java&r2=124705
==============================================================================
--- 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java
   (original)
+++ 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/RequestedIpAddress.java
   Sat Jan  8 21:49:17 2005
@@ -17,9 +17,7 @@
 
 package org.apache.dhcp.options.dhcp;
 
-import java.nio.ByteBuffer;
-
-import org.apache.dhcp.options.DhcpOption;
+import org.apache.dhcp.options.AddressOption;
 
 /**
  * This option is used in a client request (DHCPDISCOVER) to allow the
@@ -27,19 +25,11 @@
  * 
  * The code for this option is 50, and its length is 4.
  */
-public class RequestedIpAddress extends DhcpOption
+public class RequestedIpAddress extends AddressOption
 {
-       private byte[] requestedIpAddress;
-       
        public RequestedIpAddress( byte[] requestedIpAddress )
        {
-               super( 50, 4 );
-               this.requestedIpAddress = requestedIpAddress;
-       }
-       
-       protected void valueToByteBuffer( ByteBuffer out )
-       {
-               out.put( requestedIpAddress );
+               super( 50, requestedIpAddress );
        }
 }
 

Modified: 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java?view=diff&rev=124705&p1=incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java&r1=124704&p2=incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java&r2=124705
==============================================================================
--- 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java
     (original)
+++ 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/dhcp/ServerIdentifier.java
     Sat Jan  8 21:49:17 2005
@@ -17,9 +17,7 @@
 
 package org.apache.dhcp.options.dhcp;
 
-import java.nio.ByteBuffer;
-
-import org.apache.dhcp.options.DhcpOption;
+import org.apache.dhcp.options.AddressOption;
 
 /**
  * This option is used in DHCPOFFER and DHCPREQUEST messages, and may
@@ -35,19 +33,11 @@
  * 
  * The code for this option is 54, and its length is 4.
  */
-public class ServerIdentifier extends DhcpOption
+public class ServerIdentifier extends AddressOption
 {
-       private byte[] serverIdentifier;
-       
        public ServerIdentifier( byte[] serverIdentifier )
        {
-               super( 54, 4 );
-               this.serverIdentifier = serverIdentifier;
-       }
-       
-       protected void valueToByteBuffer( ByteBuffer out )
-       {
-               out.put( serverIdentifier );
+               super( 54, serverIdentifier );
        }
 }
 

Reply via email to