directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r124712 - incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface
Date Sun, 09 Jan 2005 07:08:21 GMT
Author: erodriguez
Date: Sat Jan  8 23:08:20 2005
New Revision: 124712

URL: http://svn.apache.org/viewcvs?view=rev&rev=124712
Log:
IP layer parameters per interface, per RFC 2132.
Added:
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/AllSubnetsAreLocal.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/BroadcastAddress.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/InterfaceMtu.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/MaskSupplier.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformMaskDiscovery.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformRouterDiscovery.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/RouterSolicitationAddress.java
   incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/StaticRoute.java

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/AllSubnetsAreLocal.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/AllSubnetsAreLocal.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/AllSubnetsAreLocal.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,49 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies whether or not the client may assume that all
+ * subnets of the IP network to which the client is connected use the
+ * same MTU as the subnet of that network to which the client is
+ * directly connected.  A value of 1 indicates that all subnets share
+ * the same MTU.  A value of 0 means that the client should assume that
+ * some subnets of the directly connected network may have smaller MTUs.
+ * 
+ * The code for this option is 27, and its length is 1.
+ */
+public class AllSubnetsAreLocal extends DhcpOption
+{
+	private byte[] allSubnetsAreLocal;
+	
+	public AllSubnetsAreLocal( byte[] allSubnetsAreLocal )
+	{
+		super( 27, 1 );
+		this.allSubnetsAreLocal = allSubnetsAreLocal;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( allSubnetsAreLocal );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/BroadcastAddress.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/BroadcastAddress.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/BroadcastAddress.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,45 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies the broadcast address in use on the client's
+ * subnet.
+ * 
+ * The code for this option is 28, and its length is 4.
+ */
+public class BroadcastAddress extends DhcpOption
+{
+	private byte[] broadcastAddress;
+	
+	public BroadcastAddress( byte[] broadcastAddress )
+	{
+		super( 28, 4 );
+		this.broadcastAddress = broadcastAddress;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( broadcastAddress );
+	}	
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/InterfaceMtu.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/InterfaceMtu.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/InterfaceMtu.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,46 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies the MTU to use on this interface.  The MTU is
+ * specified as a 16-bit unsigned integer.  The minimum legal value for
+ * the MTU is 68.
+ * 
+ * The code for this option is 26, and its length is 2.
+ */
+public class InterfaceMtu extends DhcpOption
+{
+	private byte[] interfaceMtu;
+	
+	public InterfaceMtu( byte[] interfaceMtu )
+	{
+		super( 26, 2 );
+		this.interfaceMtu = interfaceMtu;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( interfaceMtu );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/MaskSupplier.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/MaskSupplier.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/MaskSupplier.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,47 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies whether or not the client should respond to
+ * subnet mask requests using ICMP.  A value of 0 indicates that the
+ * client should not respond.  A value of 1 means that the client should
+ * respond.
+ * 
+ * The code for this option is 30, and its length is 1.
+ */
+public class MaskSupplier extends DhcpOption
+{
+	private byte[] maskSupplier;
+	
+	public MaskSupplier( byte[] maskSupplier )
+	{
+		super( 30, 1 );
+		this.maskSupplier = maskSupplier;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( maskSupplier );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformMaskDiscovery.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformMaskDiscovery.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformMaskDiscovery.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,47 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies whether or not the client should perform subnet
+ * mask discovery using ICMP.  A value of 0 indicates that the client
+ * should not perform mask discovery.  A value of 1 means that the
+ * client should perform mask discovery.
+ * 
+ * The code for this option is 29, and its length is 1.
+ */
+public class PerformMaskDiscovery extends DhcpOption
+{
+	private byte[] performMaskDiscovery;
+	
+	public PerformMaskDiscovery( byte[] performMaskDiscovery )
+	{
+		super( 29, 1 );
+		this.performMaskDiscovery = performMaskDiscovery;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( performMaskDiscovery );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformRouterDiscovery.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformRouterDiscovery.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/PerformRouterDiscovery.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,48 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies whether or not the client should solicit
+ * routers using the Router Discovery mechanism defined in RFC 1256.
+ * A value of 0 indicates that the client should not perform router
+ * discovery.  A value of 1 means that the client should perform
+ * router discovery.
+ * 
+ * The code for this option is 31, and its length is 1.
+ */
+public class PerformRouterDiscovery extends DhcpOption
+{
+	private byte[] performRouterDiscovery;
+	
+	public PerformRouterDiscovery( byte[] performRouterDiscovery )
+	{
+		super( 31, 1 );
+		this.performRouterDiscovery = performRouterDiscovery;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( performRouterDiscovery );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/RouterSolicitationAddress.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/RouterSolicitationAddress.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/RouterSolicitationAddress.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,45 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies the address to which the client should transmit
+ * router solicitation requests.
+ * 
+ * The code for this option is 32, and its length is 4.
+ */
+public class RouterSolicitationAddress extends DhcpOption
+{
+	private byte[] routerSolicitationAddress;
+	
+	public RouterSolicitationAddress( byte[] routerSolicitationAddress )
+	{
+		super( 32, 4 );
+		this.routerSolicitationAddress = routerSolicitationAddress;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( routerSolicitationAddress );
+	}
+}
+

Added: incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/StaticRoute.java
Url: http://svn.apache.org/viewcvs/incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/StaticRoute.java?view=auto&rev=124712
==============================================================================
--- (empty file)
+++ incubator/directory/dhcp/trunk/core/src/java/org/apache/dhcp/options/perinterface/StaticRoute.java
Sat Jan  8 23:08:20 2005
@@ -0,0 +1,55 @@
+/*
+ *   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.options.perinterface;
+
+import java.nio.ByteBuffer;
+
+import org.apache.dhcp.options.DhcpOption;
+
+/**
+ * This option specifies a list of static routes that the client should
+ * install in its routing cache.  If multiple routes to the same
+ * destination are specified, they are listed in descending order of
+ * priority.
+ * 
+ * The routes consist of a list of IP address pairs.  The first address
+ * is the destination address, and the second address is the router for
+ * the destination.
+ * 
+ * The default route (0.0.0.0) is an illegal destination for a static
+ * route.  See section 3.5 for information about the router option.
+ * 
+ * The code for this option is 33.  The minimum length of this option is
+ * 8, and the length MUST be a multiple of 8.
+ */
+public class StaticRoute extends DhcpOption
+{
+	private byte[] staticRoute;
+	
+	public StaticRoute( byte[] staticRoute )
+	{
+		super( 33, 8 );
+		this.staticRoute = staticRoute;
+	}
+	
+	protected void valueToByteBuffer( ByteBuffer out )
+	{
+		out.put( staticRoute );
+	}
+}
+

Mime
View raw message