Author: erodriguez
Date: Fri Jan  7 21:34:19 2005
New Revision: 124627

URL: http://svn.apache.org/viewcvs?view=rev&rev=124627
Log:
DHCP export package.
Added:
   
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpException.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpService.java
Modified:
   
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java
   
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java

Added: 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpException.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpException.java?view=auto&rev=124627
==============================================================================
--- (empty file)
+++ 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpException.java 
    Fri Jan  7 21:34:19 2005
@@ -0,0 +1,28 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed 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.dhcp;
+
+
+public class DhcpException extends Exception
+{
+       public DhcpException(String name)
+       {
+               super(name);
+       }
+}
+

Added: 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpService.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpService.java?view=auto&rev=124627
==============================================================================
--- (empty file)
+++ 
incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/DhcpService.java   
    Fri Jan  7 21:34:19 2005
@@ -0,0 +1,29 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed 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.dhcp;
+
+import org.apache.dhcp.messages.DhcpMessage;
+
+/**
+ * DHCP Protocol (RFC 2131, RFC 2132)
+ */
+public interface DhcpService
+{
+       public DhcpMessage getReplyFor( DhcpMessage request );
+}
+

Modified: 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java?view=diff&rev=124627&p1=incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java&r1=124626&p2=incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java&r2=124627
==============================================================================
--- 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java
    (original)
+++ 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpMessageDecoderTest.java
    Fri Jan  7 21:34:19 2005
@@ -20,7 +20,7 @@
 import java.nio.ByteBuffer;
 
 import org.apache.dhcp.io.DhcpMessageDecoder;
-import org.apache.dhcp.messages.AbstractDhcpMessage;
+import org.apache.dhcp.messages.DhcpMessage;
 
 
 public class DhcpMessageDecoderTest extends DhcpTestCase
@@ -32,7 +32,7 @@
                requestByteBuffer = getByteBufferFromFile( "DHCPDISCOVER.pdu" );
                
                DhcpMessageDecoder decoder = new DhcpMessageDecoder();
-               AbstractDhcpMessage dhcpRequest = decoder.decode( 
requestByteBuffer );
+               DhcpMessage dhcpRequest = decoder.decode( requestByteBuffer );
                
                print( dhcpRequest );
        }
@@ -42,7 +42,7 @@
                requestByteBuffer = getByteBufferFromFile( "DHCPOFFER.pdu" );
                
                DhcpMessageDecoder decoder = new DhcpMessageDecoder();
-               AbstractDhcpMessage dhcpRequest = decoder.decode( 
requestByteBuffer );
+               DhcpMessage dhcpRequest = decoder.decode( requestByteBuffer );
                
                print( dhcpRequest );
        }

Modified: 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java
Url: 
http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java?view=diff&rev=124627&p1=incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java&r1=124626&p2=incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java&r2=124627
==============================================================================
--- 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java  
    (original)
+++ 
incubator/directory/dhcp/trunk/core/src/test/org/apache/dhcp/DhcpTestCase.java  
    Fri Jan  7 21:34:19 2005
@@ -23,19 +23,19 @@
 
 import junit.framework.TestCase;
 
-import org.apache.dhcp.messages.AbstractDhcpMessage;
+import org.apache.dhcp.messages.DhcpMessage;
 
 
 public abstract class DhcpTestCase extends TestCase
 {
        protected static final int MINIMUM_DHCP_DATAGRAM_SIZE = 576;
        
-       protected void print( AbstractDhcpMessage message )
+       protected void print( DhcpMessage message )
        {
                System.out.println( message.getMessageType() );
                System.out.println( message.getHardwareAddressType() );
                System.out.println( message.getHardwareAddressLength() );
-               System.out.println( message.getHops() );
+               System.out.println( message.getHardwareOptions() );
                System.out.println( message.getTransactionId() );
                System.out.println( message.getSeconds() );
                System.out.println( message.getFlags() );

Reply via email to