directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henn...@apache.org
Subject svn commit: r628890 [2/4] - in /directory/apacheds/branches/bigbang/protocol-dhcp/src: main/java/org/apache/directory/server/dhcp/ main/java/org/apache/directory/server/dhcp/io/ main/java/org/apache/directory/server/dhcp/messages/ main/java/org/apache/...
Date Mon, 18 Feb 2008 22:14:21 GMT
Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java Mon Feb 18 14:14:09 2008
@@ -6,23 +6,24 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
  *  under the License. 
- *  
+ *
  */
 
 package org.apache.directory.server.dhcp.options;
 
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
 
 
 /**
@@ -37,38 +38,105 @@
  */
 public class OptionsField
 {
-    private Set<DhcpOption> options = new HashSet<DhcpOption>();
+    /**
+     * A map of option code (Integer)->DhcpOption. FIXME: use IntHashtable from
+     * commons collections
+     */
+    private Map options = new HashMap();
+
+
+    public void add( DhcpOption option )
+    {
+        options.put( new Integer( option.getTag() ), option );
+    }
+
+
+    public boolean isEmpty()
+    {
+        return options.isEmpty();
+    }
+
+
+    public Iterator iterator()
+    {
+        return options.values().iterator();
+    }
 
 
     /**
-     * Adds the provided {@link DhcpOption} to this {@link OptionsField}.
-     *
-     * @param option
+     * Return the (first) DHCP option matching a given option class or
+     * <code>null</code> of the option isn't set.
+     * 
+     * @param class1
      */
-    public void add( DhcpOption option )
+    public DhcpOption get( Class optionClass )
     {
-        options.add( option );
+        Integer key = new Integer( DhcpOption.getTagByClass( optionClass ) );
+        return ( DhcpOption ) options.get( key );
     }
 
 
     /**
-     * Returns whether this {@link OptionsField} is empty.
-     *
-     * @return true if this {@link OptionsField} is empty.
+     * Return the (first) DHCP option matching a given tag or <code>null</code>
+     * of the option isn't set.
+     * 
+     * @param class1
      */
-    public boolean isEmpty()
+    public DhcpOption get( int tag )
     {
-        return options.isEmpty();
+        Integer key = new Integer( tag );
+        return ( DhcpOption ) options.get( key );
+    }
+
+
+    /**
+     * Merge the options from the given options field into my options. Existing
+     * options are replaced by the ones from the supplied options field.
+     * 
+     * @param options2
+     */
+    public void merge( OptionsField options )
+    {
+        if ( null == options )
+            return;
+
+        for ( Iterator i = options.iterator(); i.hasNext(); )
+        {
+            DhcpOption option = ( DhcpOption ) i.next();
+            this.options.put( new Integer( option.getTag() ), option );
+        }
+    }
+
+
+    /**
+     * Remove instances of the given option class.
+     * 
+     * @param class1
+     */
+    public void remove( Class c )
+    {
+        Integer key = new Integer( DhcpOption.getTagByClass( c ) );
+        options.remove( key );
+    }
+
+
+    /**
+     * Remove options matching the given tag
+     * 
+     * @param class1
+     */
+    public void remove( int tag )
+    {
+        Integer key = new Integer( tag );
+        options.remove( key );
     }
 
 
     /**
-     * Returns this {@link OptionsField} as an array of {@link DhcpOption}s.
-     *
-     * @return The array of {@link DhcpOption}s.
+     * @see Map#clear()
      */
-    public DhcpOption[] toArray()
+    public void clear()
     {
-        return options.toArray( new DhcpOption[options.size()] );
+        options.clear();
     }
 }

Added: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/ShortOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/ShortOption.java?rev=628890&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/ShortOption.java (added)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/ShortOption.java Mon Feb 18 14:14:09 2008
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *
+ */
+
+package org.apache.directory.server.dhcp.options;
+
+/**
+ * The Dynamic Host Configuration Protocol (DHCP) provides a framework for
+ * passing configuration information to hosts on a TCP/IP network. Configuration
+ * parameters and other control information are carried in tagged data items
+ * that are stored in the 'options' field of the DHCP message. The data items
+ * themselves are also called "options."
+ * 
+ * This abstract base class is for options that carry an unsigned short value
+ * (16 bit).
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 551805 $, $Date: 2007-06-29 00:57:04 -0500 (Fr, 29 Jun 2007) $
+ */
+public abstract class ShortOption extends DhcpOption {
+	/**
+	 * The short value (represented as an int because of the unsignedness).
+	 */
+	private int shortValue;
+
+	/*
+	 * @see org.apache.directory.server.dhcp.options.DhcpOption#setData(byte[])
+	 */
+	public void setData(byte[] data) {
+		shortValue = (data[0] & 0xff) << 8 | (data[1] & 0xff);
+	}
+
+	/*
+	 * @see org.apache.directory.server.dhcp.options.DhcpOption#getData()
+	 */
+	public byte[] getData() {
+		return new byte[]{(byte) (shortValue >> 8 & 0xff),
+				(byte) (shortValue & 0xff)};
+	}
+
+	public int getShortValue() {
+		return shortValue;
+	}
+
+	public void setShortValue(int shortValue) {
+		this.shortValue = shortValue;
+	}
+}

Propchange: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/ShortOption.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/StringOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/StringOption.java?rev=628890&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/StringOption.java (added)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/StringOption.java Mon Feb 18 14:14:09 2008
@@ -0,0 +1,93 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *
+ */
+
+package org.apache.directory.server.dhcp.options;
+
+
+import java.io.UnsupportedEncodingException;
+
+
+/**
+ * The Dynamic Host Configuration Protocol (DHCP) provides a framework for
+ * passing configuration information to hosts on a TCP/IP network. Configuration
+ * parameters and other control information are carried in tagged data items
+ * that are stored in the 'options' field of the DHCP message. The data items
+ * themselves are also called "options." 
+ * 
+ * This abstract base class is for options
+ * that carry a string.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 551805 $, $Date: 2007-06-29 00:57:04 -0500 (Fr, 29 Jun 2007) $
+ */
+public abstract class StringOption extends DhcpOption
+{
+    private String string;
+
+
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#setData(byte[])
+     */
+    public void setData( byte[] data )
+    {
+        try
+        {
+            string = new String( data, "ASCII" );
+        }
+        catch ( UnsupportedEncodingException e )
+        {
+            // should not happen
+            throw new RuntimeException( "ASCII encoding unavailable" );
+        }
+    }
+
+
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getData()
+     */
+    public byte[] getData()
+    {
+        if ( null == string )
+            return new byte[]
+                {};
+
+        try
+        {
+            return string.getBytes( "ASCII" );
+        }
+        catch ( UnsupportedEncodingException e )
+        {
+            // should not happen
+            throw new RuntimeException( "ASCII encoding unavailable" );
+        }
+    }
+
+
+    public String getString()
+    {
+        return string;
+    }
+
+
+    public void setString( String string )
+    {
+        this.string = string;
+    }
+}

Propchange: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/StringOption.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/BootfileName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/BootfileName.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/BootfileName.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/BootfileName.java Mon Feb 18 14:14:09 2008
@@ -6,54 +6,40 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
  *  under the License. 
- *  
+ *
  */
 
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
  * This option is used to identify a bootfile when the 'file' field in
  * the DHCP header has been used for DHCP options.
- * 
+*
  * The code for this option is 67, and its minimum length is 1.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class BootfileName extends DhcpOption
+public class BootfileName extends StringOption
 {
-    private byte[] bootFileName;
-
-
-    /**
-     * Creates a new instance of BootfileName.
-     *
-     * @param bootFileName
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public BootfileName( byte[] bootFileName )
-    {
-        super( 67, 1 );
-        this.bootFileName = bootFileName;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( bootFileName );
+        return 67;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ClientIdentifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ClientIdentifier.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ClientIdentifier.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ClientIdentifier.java Mon Feb 18 14:14:09 2008
@@ -21,8 +21,6 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
 import org.apache.directory.server.dhcp.options.DhcpOption;
 
 
@@ -55,23 +53,11 @@
  */
 public class ClientIdentifier extends DhcpOption
 {
-    private byte[] clientIdentifier;
-
-
-    /**
-     * Creates a new instance of ClientIdentifier.
-     *
-     * @param clientIdentifier
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public ClientIdentifier( byte[] clientIdentifier )
-    {
-        super( 61, 2 );
-        this.clientIdentifier = clientIdentifier;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( clientIdentifier );
+        return 61;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/DhcpMessageType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/DhcpMessageType.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/DhcpMessageType.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/DhcpMessageType.java Mon Feb 18 14:14:09 2008
@@ -21,8 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
+import org.apache.directory.server.dhcp.messages.MessageType;
 import org.apache.directory.server.dhcp.options.DhcpOption;
 
 
@@ -47,23 +46,44 @@
  */
 public class DhcpMessageType extends DhcpOption
 {
-    private byte[] messageType;
+    private MessageType type;
+
+
+    public DhcpMessageType()
+    {
+    }
+
+
+    public DhcpMessageType(MessageType type)
+    {
+        this.type = type;
+    }
 
 
-    /**
-     * Creates a new instance of DhcpMessageType.
-     *
-     * @param messageType
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public DhcpMessageType( byte[] messageType )
+    public byte getTag()
+    {
+        return 53;
+    }
+
+
+    public void setData( byte[] messageType )
+    {
+        type = MessageType.getTypeByCode( messageType[0] );
+    }
+
+
+    public byte[] getData()
     {
-        super( 53, 1 );
-        this.messageType = messageType;
+        return new byte[]
+            { type.getCode() };
     }
 
 
-    protected void valueToByteBuffer( ByteBuffer out )
+    public MessageType getType()
     {
-        out.put( messageType );
+        return type;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/IpAddressLeaseTime.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/IpAddressLeaseTime.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/IpAddressLeaseTime.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/IpAddressLeaseTime.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.IntOption;
 
 
 /**
@@ -40,25 +38,24 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class IpAddressLeaseTime extends DhcpOption
+public class IpAddressLeaseTime extends IntOption
 {
-    private byte[] ipAddressLeaseTime;
+    public IpAddressLeaseTime()
+    {
+    }
 
 
-    /**
-     * Creates a new instance of IpAddressLeaseTime.
-     *
-     * @param ipAddressLeaseTime
-     */
-    public IpAddressLeaseTime( byte[] ipAddressLeaseTime )
+    public IpAddressLeaseTime(long leaseTime)
     {
-        super( 51, 4 );
-        this.ipAddressLeaseTime = ipAddressLeaseTime;
+        setIntValue( leaseTime );
     }
 
 
-    protected void valueToByteBuffer( ByteBuffer out )
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
+     */
+    public byte getTag()
     {
-        out.put( ipAddressLeaseTime );
+        return 51;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/MaximumDhcpMessageSize.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/MaximumDhcpMessageSize.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/MaximumDhcpMessageSize.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/MaximumDhcpMessageSize.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ShortOption;
 
 
 /**
@@ -39,25 +37,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MaximumDhcpMessageSize extends DhcpOption
+public class MaximumDhcpMessageSize extends ShortOption
 {
-    private byte[] maximumDhcpMessageSize;
-
-
-    /**
-     * Creates a new instance of MaximumDhcpMessageSize.
-     *
-     * @param maximumDhcpMessageSize
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public MaximumDhcpMessageSize( byte[] maximumDhcpMessageSize )
-    {
-        super( 57, 2 );
-        this.maximumDhcpMessageSize = maximumDhcpMessageSize;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( maximumDhcpMessageSize );
+        return 57;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/Message.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/Message.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/Message.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/Message.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
@@ -39,25 +37,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class Message extends DhcpOption
+public class Message extends StringOption
 {
-    private byte[] message;
-
-
-    /**
-     * Creates a new instance of Message.
-     *
-     * @param message
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public Message( byte[] message )
-    {
-        super( 56, 1 );
-        this.message = message;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( message );
+        return 56;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/OptionOverload.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/OptionOverload.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/OptionOverload.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/OptionOverload.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
@@ -48,25 +46,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class OptionOverload extends DhcpOption
+public class OptionOverload extends ByteOption
 {
-    private byte[] optionOverload;
-
-
-    /**
-     * Creates a new instance of OptionOverload.
-     *
-     * @param optionOverload
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public OptionOverload( byte[] optionOverload )
-    {
-        super( 52, 1 );
-        this.optionOverload = optionOverload;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( optionOverload );
+        return 52;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ParameterRequestList.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ParameterRequestList.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ParameterRequestList.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ParameterRequestList.java Mon Feb 18 14:14:09 2008
@@ -21,8 +21,6 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
 import org.apache.directory.server.dhcp.options.DhcpOption;
 
 
@@ -44,23 +42,11 @@
  */
 public class ParameterRequestList extends DhcpOption
 {
-    private byte[] parameterRequestList;
-
-
-    /**
-     * Creates a new instance of ParameterRequestList.
-     *
-     * @param parameterRequestList
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public ParameterRequestList( byte[] parameterRequestList )
-    {
-        super( 55, 1 );
-        this.parameterRequestList = parameterRequestList;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( parameterRequestList );
+        return 55;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RebindingTimeValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RebindingTimeValue.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RebindingTimeValue.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RebindingTimeValue.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.IntOption;
 
 
 /**
@@ -38,25 +36,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class RebindingTimeValue extends DhcpOption
+public class RebindingTimeValue extends IntOption
 {
-    private int rebindingTimeValue;
-
-
-    /**
-     * Creates a new instance of RebindingTimeValue.
-     *
-     * @param rebindingTimeValue
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public RebindingTimeValue( int rebindingTimeValue )
-    {
-        super( 59, 4 );
-        this.rebindingTimeValue = rebindingTimeValue;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.putInt( rebindingTimeValue );
+        return 59;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RenewalTimeValue.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RenewalTimeValue.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RenewalTimeValue.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RenewalTimeValue.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.IntOption;
 
 
 /**
@@ -38,25 +36,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class RenewalTimeValue extends DhcpOption
+public class RenewalTimeValue extends IntOption
 {
-    private int renewalTimeValue;
-
-
-    /**
-     * Creates a new instance of RenewalTimeValue.
-     *
-     * @param renewalTimeValue
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public RenewalTimeValue( int renewalTimeValue )
-    {
-        super( 58, 4 );
-        this.renewalTimeValue = renewalTimeValue;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.putInt( renewalTimeValue );
+        return 58;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RequestedIpAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RequestedIpAddress.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RequestedIpAddress.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/RequestedIpAddress.java Mon Feb 18 14:14:09 2008
@@ -35,13 +35,11 @@
  */
 public class RequestedIpAddress extends AddressOption
 {
-    /**
-     * Creates a new instance of RequestedIpAddress.
-     *
-     * @param requestedIpAddress
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public RequestedIpAddress( byte[] requestedIpAddress )
+    public byte getTag()
     {
-        super( 50, requestedIpAddress );
+        return 50;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ServerIdentifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ServerIdentifier.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ServerIdentifier.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/ServerIdentifier.java Mon Feb 18 14:14:09 2008
@@ -21,6 +21,8 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
+import java.net.InetAddress;
+
 import org.apache.directory.server.dhcp.options.AddressOption;
 
 
@@ -43,13 +45,22 @@
  */
 public class ServerIdentifier extends AddressOption
 {
-    /**
-     * Creates a new instance of ServerIdentifier.
-     *
-     * @param serverIdentifier
+    public ServerIdentifier()
+    {
+    }
+
+
+    public ServerIdentifier(InetAddress localHost)
+    {
+        setAddress( localHost );
+    }
+
+
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public ServerIdentifier( byte[] serverIdentifier )
+    public byte getTag()
     {
-        super( 54, serverIdentifier );
+        return 54;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/TftpServerName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/TftpServerName.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/TftpServerName.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/TftpServerName.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
@@ -35,25 +33,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class TftpServerName extends DhcpOption
+public class TftpServerName extends StringOption
 {
-    private byte[] tftpServerName;
-
-
-    /**
-     * Creates a new instance of TftpServerName.
-     *
-     * @param tftpServerName
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public TftpServerName( byte[] tftpServerName )
-    {
-        super( 66, 1 );
-        this.tftpServerName = tftpServerName;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( tftpServerName );
+        return 66;
     }
 }

Added: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/UnrecognizedOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/UnrecognizedOption.java?rev=628890&view=auto
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/UnrecognizedOption.java (added)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/UnrecognizedOption.java Mon Feb 18 14:14:09 2008
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.server.dhcp.options.dhcp;
+
+import org.apache.directory.server.dhcp.options.DhcpOption;
+
+/**
+ * This pseudo option represents all options which have not been recognized and
+ * parsed as specific implementations. No special semantics are associated with
+ * it. Users are therefore required to manually deal with the contained data.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev: 552077 $, $Date: 2007-06-29 21:23:39 -0500 (Fr, 29 Jun 2007) $
+ */
+public class UnrecognizedOption extends DhcpOption {
+	private final byte tag;
+
+	public UnrecognizedOption() {
+		tag = -1;
+	}
+
+	/*
+	 * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
+	 */
+	public byte getTag() {
+		return tag;
+	}
+
+	public UnrecognizedOption(byte tag) {
+		this.tag = tag;
+	}
+}

Propchange: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/UnrecognizedOption.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/VendorClassIdentifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/VendorClassIdentifier.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/VendorClassIdentifier.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/dhcp/VendorClassIdentifier.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.dhcp;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
@@ -44,25 +42,14 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class VendorClassIdentifier extends DhcpOption
+public class VendorClassIdentifier extends StringOption
 {
-    private byte[] vendorClassIdentifier;
-
-
-    /**
-     * Creates a new instance of VendorClassIdentifier.
-     *
-     * @param vendorClassIdentifier
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public VendorClassIdentifier( byte[] vendorClassIdentifier )
+    public byte getTag()
     {
-        super( 60, 1 );
-        this.vendorClassIdentifier = vendorClassIdentifier;
+        return 60;
     }
 
-
-    protected void valueToByteBuffer( ByteBuffer out )
-    {
-        out.put( vendorClassIdentifier );
-    }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/ArpCacheTimeout.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/ArpCacheTimeout.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/ArpCacheTimeout.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/ArpCacheTimeout.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.linklayer;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.IntOption;
 
 
 /**
@@ -35,25 +33,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ArpCacheTimeout extends DhcpOption
+public class ArpCacheTimeout extends IntOption
 {
-    private byte[] arpCacheTimeout;
-
-
-    /**
-     * Creates a new instance of ArpCacheTimeout.
-     *
-     * @param arpCacheTimeout
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public ArpCacheTimeout( byte[] arpCacheTimeout )
-    {
-        super( 35, 4 );
-        this.arpCacheTimeout = arpCacheTimeout;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( arpCacheTimeout );
+        return 35;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/EthernetEncapsulation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/EthernetEncapsulation.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/EthernetEncapsulation.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/EthernetEncapsulation.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.linklayer;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
@@ -38,25 +36,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class EthernetEncapsulation extends DhcpOption
+public class EthernetEncapsulation extends ByteOption
 {
-    private byte[] ethernetEncapsulation;
-
-
-    /**
-     * Creates a new instance of EthernetEncapsulation.
-     *
-     * @param ethernetEncapsulation
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public EthernetEncapsulation( byte[] ethernetEncapsulation )
-    {
-        super( 36, 1 );
-        this.ethernetEncapsulation = ethernetEncapsulation;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( ethernetEncapsulation );
+        return 36;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/TrailerEncapsulation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/TrailerEncapsulation.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/TrailerEncapsulation.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/linklayer/TrailerEncapsulation.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.linklayer;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
@@ -37,25 +35,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class TrailerEncapsulation extends DhcpOption
+public class TrailerEncapsulation extends ByteOption
 {
-    private byte[] trailerEncapsulation;
-
-
-    /**
-     * Creates a new instance of TrailerEncapsulation.
-     *
-     * @param trailerEncapsulation
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public TrailerEncapsulation( byte[] trailerEncapsulation )
-    {
-        super( 34, 1 );
-        this.trailerEncapsulation = trailerEncapsulation;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( trailerEncapsulation );
+        return 34;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultFingerServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultFingerServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultFingerServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultFingerServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class DefaultFingerServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of DefaultFingerServers.
-     *
-     * @param defaultFingerServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public DefaultFingerServers( byte[] defaultFingerServer )
+    public byte getTag()
     {
-        super( 73, defaultFingerServer );
+        return 73;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultIrcServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultIrcServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultIrcServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultIrcServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class DefaultIrcServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of DefaultIrcServers.
-     *
-     * @param defaultIrcServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public DefaultIrcServers( byte[] defaultIrcServer )
+    public byte getTag()
     {
-        super( 74, defaultIrcServer );
+        return 74;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultWwwServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultWwwServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultWwwServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/DefaultWwwServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class DefaultWwwServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of DefaultWwwServers.
-     *
-     * @param defaultWwwServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public DefaultWwwServers( byte[] defaultWwwServer )
+    public byte getTag()
     {
-        super( 72, defaultWwwServer );
+        return 72;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/MobileIpHomeAgents.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/MobileIpHomeAgents.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/MobileIpHomeAgents.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/MobileIpHomeAgents.java Mon Feb 18 14:14:09 2008
@@ -39,13 +39,11 @@
  */
 public class MobileIpHomeAgents extends AddressListOption
 {
-    /**
-     * Creates a new instance of MobileIpHomeAgents.
-     *
-     * @param mobileIpHomeAgent
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public MobileIpHomeAgents( byte[] mobileIpHomeAgent )
+    public byte getTag()
     {
-        super( 68, mobileIpHomeAgent );
+        return 68;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NbddServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NbddServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NbddServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NbddServers.java Mon Feb 18 14:14:09 2008
@@ -35,13 +35,11 @@
  */
 public class NbddServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NbddServers.
-     *
-     * @param netbiosDatagramDistributionServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NbddServers( byte[] netbiosDatagramDistributionServer )
+    public byte getTag()
     {
-        super( 45, netbiosDatagramDistributionServer );
+        return 45;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNameServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNameServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNameServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNameServers.java Mon Feb 18 14:14:09 2008
@@ -36,13 +36,11 @@
  */
 public class NetbiosNameServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NetbiosNameServers.
-     *
-     * @param netbiosNameServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NetbiosNameServers( byte[] netbiosNameServer )
+    public byte getTag()
     {
-        super( 44, netbiosNameServer );
+        return 44;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNodeType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNodeType.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNodeType.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosNodeType.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.misc;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
@@ -40,33 +38,16 @@
  *    0x8           H-node
  * 
  * In the above chart, the notation '0x' indicates a number in base-16
- * (hexadecimal).
- * 
- * The code for this option is 46.  The length of this option is always
- * 1.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
+ * (hexadecimal). The code for this option is 46. The length of this option is
+ * always 1.
  */
-public class NetbiosNodeType extends DhcpOption
+public class NetbiosNodeType extends ByteOption
 {
-    private byte[] netbiosNodeType;
-
-
-    /**
-     * Creates a new instance of NetbiosNodeType.
-     *
-     * @param netbiosNodeType
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NetbiosNodeType( byte[] netbiosNodeType )
-    {
-        super( 46, 1 );
-        this.netbiosNodeType = netbiosNodeType;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( netbiosNodeType );
+        return 46;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosScope.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosScope.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosScope.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NetbiosScope.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.misc;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
@@ -36,25 +34,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NetbiosScope extends DhcpOption
+public class NetbiosScope extends StringOption
 {
-    private byte[] netbiosScope;
-
-
-    /**
-     * Creates a new instance of NetbiosScope.
-     *
-     * @param netbiosScope
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NetbiosScope( byte[] netbiosScope )
-    {
-        super( 47, 1 );
-        this.netbiosScope = netbiosScope;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( netbiosScope );
+        return 47;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisDomain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisDomain.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisDomain.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisDomain.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.misc;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.StringOption;
 
 
 /**
@@ -36,25 +34,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NisDomain extends DhcpOption
+public class NisDomain extends StringOption
 {
-    private byte[] nisDomain;
-
-
-    /**
-     * Creates a new instance of NisDomain.
-     *
-     * @param nisDomain
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NisDomain( byte[] nisDomain )
-    {
-        super( 40, 1 );
-        this.nisDomain = nisDomain;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( nisDomain );
+        return 40;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusDomain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusDomain.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusDomain.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusDomain.java Mon Feb 18 14:14:09 2008
@@ -21,8 +21,6 @@
 package org.apache.directory.server.dhcp.options.misc;
 
 
-import java.nio.ByteBuffer;
-
 import org.apache.directory.server.dhcp.options.DhcpOption;
 
 
@@ -38,23 +36,11 @@
  */
 public class NisPlusDomain extends DhcpOption
 {
-    private byte[] nisPlusDomain;
-
-
-    /**
-     * Creates a new instance of NisPlusDomain.
-     *
-     * @param nisPlusDomain
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NisPlusDomain( byte[] nisPlusDomain )
-    {
-        super( 64, 1 );
-        this.nisPlusDomain = nisPlusDomain;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( nisPlusDomain );
+        return 64;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisPlusServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class NisPlusServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NisPlusServers.
-     *
-     * @param nisPlusServers
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NisPlusServers( byte[] nisPlusServers )
+    public byte getTag()
     {
-        super( 65, nisPlusServers );
+        return 65;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NisServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class NisServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NisServers.
-     *
-     * @param nisServers
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NisServers( byte[] nisServers )
+    public byte getTag()
     {
-        super( 41, nisServers );
+        return 41;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NntpServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NntpServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NntpServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NntpServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class NntpServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NntpServers.
-     *
-     * @param nntpServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NntpServers( byte[] nntpServer )
+    public byte getTag()
     {
-        super( 71, nntpServer );
+        return 71;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NtpServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NtpServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NtpServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/NtpServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class NtpServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of NtpServers.
-     *
-     * @param ntpServers
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NtpServers( byte[] ntpServers )
+    public byte getTag()
     {
-        super( 42, ntpServers );
+        return 42;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/Pop3Servers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/Pop3Servers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/Pop3Servers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/Pop3Servers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class Pop3Servers extends AddressListOption
 {
-    /**
-     * Creates a new instance of Pop3Servers.
-     *
-     * @param pop3Server
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public Pop3Servers( byte[] pop3Server )
+    public byte getTag()
     {
-        super( 70, pop3Server );
+        return 70;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/SmtpServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/SmtpServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/SmtpServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/SmtpServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class SmtpServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of SmtpServers.
-     *
-     * @param smtpServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public SmtpServers( byte[] smtpServer )
+    public byte getTag()
     {
-        super( 69, smtpServer );
+        return 69;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StdaServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StdaServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StdaServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StdaServers.java Mon Feb 18 14:14:09 2008
@@ -38,13 +38,11 @@
  */
 public class StdaServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of StdaServers.
-     *
-     * @param stdaServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public StdaServers( byte[] stdaServer )
+    public byte getTag()
     {
-        super( 76, stdaServer );
+        return 76;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StreetTalkServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StreetTalkServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StreetTalkServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/StreetTalkServers.java Mon Feb 18 14:14:09 2008
@@ -38,13 +38,11 @@
  */
 public class StreetTalkServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of StreetTalkServers.
-     *
-     * @param streetTalkServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public StreetTalkServers( byte[] streetTalkServer )
+    public byte getTag()
     {
-        super( 75, streetTalkServer );
+        return 75;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/VendorSpecificInformation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/VendorSpecificInformation.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/VendorSpecificInformation.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/VendorSpecificInformation.java Mon Feb 18 14:14:09 2008
@@ -21,8 +21,6 @@
 package org.apache.directory.server.dhcp.options.misc;
 
 
-import java.nio.ByteBuffer;
-
 import org.apache.directory.server.dhcp.options.DhcpOption;
 
 
@@ -65,23 +63,11 @@
  */
 public class VendorSpecificInformation extends DhcpOption
 {
-    private byte[] vendorSpecificInformation;
-
-
-    /**
-     * Creates a new instance of VendorSpecificInformation.
-     *
-     * @param vendorSpecificInformation
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public VendorSpecificInformation( byte[] vendorSpecificInformation )
-    {
-        super( 43, 1 );
-        this.vendorSpecificInformation = vendorSpecificInformation;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( vendorSpecificInformation );
+        return 43;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowDisplayManagers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowDisplayManagers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowDisplayManagers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowDisplayManagers.java Mon Feb 18 14:14:09 2008
@@ -39,13 +39,11 @@
  */
 public class XWindowDisplayManagers extends AddressListOption
 {
-    /**
-     * Creates a new instance of XWindowDisplayManagers.
-     *
-     * @param xWindowDisplayManager
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public XWindowDisplayManagers( byte[] xWindowDisplayManager )
+    public byte getTag()
     {
-        super( 49, xWindowDisplayManager );
+        return 49;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowFontServers.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowFontServers.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowFontServers.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/misc/XWindowFontServers.java Mon Feb 18 14:14:09 2008
@@ -37,13 +37,11 @@
  */
 public class XWindowFontServers extends AddressListOption
 {
-    /**
-     * Creates a new instance of XWindowFontServers.
-     *
-     * @param xWindowFontServer
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public XWindowFontServers( byte[] xWindowFontServer )
+    public byte getTag()
     {
-        super( 48, xWindowFontServer );
+        return 48;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/DefaultIpTimeToLive.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/DefaultIpTimeToLive.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/DefaultIpTimeToLive.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/DefaultIpTimeToLive.java Mon Feb 18 14:14:09 2008
@@ -18,44 +18,29 @@
  *  
  */
 
-/**
- * This option specifies the default time-to-live that the client should
- * use on outgoing datagrams.  The TTL is specified as an octet with a
- * value between 1 and 255.
- * 
- * The code for this option is 23, and its length is 1.
- */
 package org.apache.directory.server.dhcp.options.perhost;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
+ * This option specifies the default time-to-live that the client should
+ * use on outgoing datagrams.  The TTL is specified as an octet with a
+ * value between 1 and 255.
+ * 
+ * The code for this option is 23, and its length is 1.
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class DefaultIpTimeToLive extends DhcpOption
+public class DefaultIpTimeToLive extends ByteOption
 {
-    private byte[] defaultIpTimeToLive;
-
-
-    /**
-     * Creates a new instance of DefaultIpTimeToLive.
-     *
-     * @param defaultIpTimeToLive
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public DefaultIpTimeToLive( byte[] defaultIpTimeToLive )
-    {
-        super( 23, 1 );
-        this.defaultIpTimeToLive = defaultIpTimeToLive;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( defaultIpTimeToLive );
+        return 23;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/IpForwarding.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/IpForwarding.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/IpForwarding.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/IpForwarding.java Mon Feb 18 14:14:09 2008
@@ -18,44 +18,29 @@
  *  
  */
 
-/**
- * This option specifies whether the client should configure its IP
- * layer for packet forwarding.  A value of 0 means disable IP
- * forwarding, and a value of 1 means enable IP forwarding.
- * 
- * The code for this option is 19, and its length is 1.
- */
 package org.apache.directory.server.dhcp.options.perhost;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
+ * This option specifies whether the client should configure its IP
+ * layer for packet forwarding.  A value of 0 means disable IP
+ * forwarding, and a value of 1 means enable IP forwarding.
+ * 
+ * The code for this option is 19, and its length is 1.
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class IpForwarding extends DhcpOption
+public class IpForwarding extends ByteOption
 {
-    private byte[] ipForwarding;
-
-
-    /**
-     * Creates a new instance of IpForwarding.
-     *
-     * @param ipForwarding
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public IpForwarding( byte[] ipForwarding )
-    {
-        super( 19, 1 );
-        this.ipForwarding = ipForwarding;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( ipForwarding );
+        return 19;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/MaximumDatagramSize.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/MaximumDatagramSize.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/MaximumDatagramSize.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/MaximumDatagramSize.java Mon Feb 18 14:14:09 2008
@@ -18,44 +18,29 @@
  *  
  */
 
-/**
- * This option specifies the maximum size datagram that the client
- * should be prepared to reassemble.  The size is specified as a 16-bit
- * unsigned integer.  The minimum value legal value is 576.
- * 
- * The code for this option is 22, and its length is 2.
- */
 package org.apache.directory.server.dhcp.options.perhost;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ShortOption;
 
 
 /**
+ * This option specifies the maximum size datagram that the client
+ * should be prepared to reassemble.  The size is specified as a 16-bit
+ * unsigned integer.  The minimum value legal value is 576.
+ * 
+ * The code for this option is 22, and its length is 2.
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MaximumDatagramSize extends DhcpOption
+public class MaximumDatagramSize extends ShortOption
 {
-    private byte[] maximumDatagramSize;
-
-
-    /**
-     * Creates a new instance of MaximumDatagramSize.
-     *
-     * @param maximumDatagramSize
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public MaximumDatagramSize( byte[] maximumDatagramSize )
-    {
-        super( 22, 2 );
-        this.maximumDatagramSize = maximumDatagramSize;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( maximumDatagramSize );
+        return 22;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/NonLocalSourceRouting.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/NonLocalSourceRouting.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/NonLocalSourceRouting.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/NonLocalSourceRouting.java Mon Feb 18 14:14:09 2008
@@ -18,6 +18,12 @@
  *  
  */
 
+package org.apache.directory.server.dhcp.options.perhost;
+
+
+import org.apache.directory.server.dhcp.options.ByteOption;
+
+
 /**
  * This option specifies whether the client should configure its IP
  * layer to allow forwarding of datagrams with non-local source routes.
@@ -25,38 +31,17 @@
  * of 1 means allow forwarding.
  * 
  * The code for this option is 20, and its length is 1.
- */
-package org.apache.directory.server.dhcp.options.perhost;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
-
-
-/**
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NonLocalSourceRouting extends DhcpOption
+public class NonLocalSourceRouting extends ByteOption
 {
-    private byte[] nonLocalSourceRouting;
-
-
-    /**
-     * Creates a new instance of NonLocalSourceRouting.
-     *
-     * @param nonLocalSourceRouting
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public NonLocalSourceRouting( byte[] nonLocalSourceRouting )
-    {
-        super( 20, 1 );
-        this.nonLocalSourceRouting = nonLocalSourceRouting;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( nonLocalSourceRouting );
+        return 20;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuAgingTimeout.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuAgingTimeout.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuAgingTimeout.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuAgingTimeout.java Mon Feb 18 14:14:09 2008
@@ -18,44 +18,29 @@
  *  
  */
 
-/**
- * This option specifies the timeout (in seconds) to use when aging Path
- * MTU values discovered by the mechanism defined in RFC 1191.  The
- * timeout is specified as a 32-bit unsigned integer.
- * 
- * The code for this option is 24, and its length is 4.
- */
 package org.apache.directory.server.dhcp.options.perhost;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.IntOption;
 
 
 /**
+ * This option specifies the timeout (in seconds) to use when aging Path
+ * MTU values discovered by the mechanism defined in RFC 1191.  The
+ * timeout is specified as a 32-bit unsigned integer.
+ * 
+ * The code for this option is 24, and its length is 4.
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class PathMtuAgingTimeout extends DhcpOption
+public class PathMtuAgingTimeout extends IntOption
 {
-    private byte[] pathMtuAgingTimeout;
-
-
-    /**
-     * Creates a new instance of PathMtuAgingTimeout.
-     *
-     * @param pathMtuAgingTimeout
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public PathMtuAgingTimeout( byte[] pathMtuAgingTimeout )
-    {
-        super( 24, 4 );
-        this.pathMtuAgingTimeout = pathMtuAgingTimeout;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( pathMtuAgingTimeout );
+        return 24;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuPlateauTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuPlateauTable.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuPlateauTable.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PathMtuPlateauTable.java Mon Feb 18 14:14:09 2008
@@ -18,6 +18,12 @@
  *  
  */
 
+package org.apache.directory.server.dhcp.options.perhost;
+
+
+import org.apache.directory.server.dhcp.options.DhcpOption;
+
+
 /**
  * This option specifies a table of MTU sizes to use when performing
  * Path MTU Discovery as defined in RFC 1191.  The table is formatted as
@@ -26,38 +32,17 @@
  * 
  * The code for this option is 25.  Its minimum length is 2, and the
  * length MUST be a multiple of 2.
- */
-package org.apache.directory.server.dhcp.options.perhost;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
-
-
-/**
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public class PathMtuPlateauTable extends DhcpOption
 {
-    private byte[] pathMtuPlateauTable;
-
-
-    /**
-     * Creates a new instance of PathMtuPlateauTable.
-     *
-     * @param pathMtuPlateauTable
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public PathMtuPlateauTable( byte[] pathMtuPlateauTable )
-    {
-        super( 25, 2 );
-        this.pathMtuPlateauTable = pathMtuPlateauTable;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( pathMtuPlateauTable );
+        return 25;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PolicyFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PolicyFilter.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PolicyFilter.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perhost/PolicyFilter.java Mon Feb 18 14:14:09 2008
@@ -18,6 +18,12 @@
  *  
  */
 
+package org.apache.directory.server.dhcp.options.perhost;
+
+
+import org.apache.directory.server.dhcp.options.AddressListOption;
+
+
 /**
  * This option specifies policy filters for non-local source routing.
  * The filters consist of a list of IP addresses and masks which specify
@@ -28,38 +34,17 @@
  * 
  * The code for this option is 21.  The minimum length of this option is
  * 8, and the length MUST be a multiple of 8.
- */
-package org.apache.directory.server.dhcp.options.perhost;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
-
-
-/**
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class PolicyFilter extends DhcpOption
+public class PolicyFilter extends AddressListOption
 {
-    private byte[] policyFilter;
-
-
-    /**
-     * Creates a new instance of PolicyFilter.
-     *
-     * @param policyFilter
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public PolicyFilter( byte[] policyFilter )
-    {
-        super( 21, 8 );
-        this.policyFilter = policyFilter;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( policyFilter );
+        return 21;
     }
 }

Modified: directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perinterface/AllSubnetsAreLocal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perinterface/AllSubnetsAreLocal.java?rev=628890&r1=628889&r2=628890&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perinterface/AllSubnetsAreLocal.java (original)
+++ directory/apacheds/branches/bigbang/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/perinterface/AllSubnetsAreLocal.java Mon Feb 18 14:14:09 2008
@@ -21,9 +21,7 @@
 package org.apache.directory.server.dhcp.options.perinterface;
 
 
-import java.nio.ByteBuffer;
-
-import org.apache.directory.server.dhcp.options.DhcpOption;
+import org.apache.directory.server.dhcp.options.ByteOption;
 
 
 /**
@@ -39,25 +37,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AllSubnetsAreLocal extends DhcpOption
+public class AllSubnetsAreLocal extends ByteOption
 {
-    private byte[] allSubnetsAreLocal;
-
-
-    /**
-     * Creates a new instance of AllSubnetsAreLocal.
-     *
-     * @param allSubnetsAreLocal
+    /*
+     * @see org.apache.directory.server.dhcp.options.DhcpOption#getTag()
      */
-    public AllSubnetsAreLocal( byte[] allSubnetsAreLocal )
-    {
-        super( 27, 1 );
-        this.allSubnetsAreLocal = allSubnetsAreLocal;
-    }
-
-
-    protected void valueToByteBuffer( ByteBuffer out )
+    public byte getTag()
     {
-        out.put( allSubnetsAreLocal );
+        return 27;
     }
 }



Mime
View raw message