|
From: <hag...@us...> - 2008-05-30 12:54:03
|
Revision: 4156
http://jnode.svn.sourceforge.net/jnode/?rev=4156&view=rev
Author: hagar-wize
Date: 2008-05-30 05:54:00 -0700 (Fri, 30 May 2008)
Log Message:
-----------
reformat code
Modified Paths:
--------------
trunk/net/src/driver/org/jnode/driver/net/NetDeviceAPI.java
trunk/net/src/driver/org/jnode/driver/net/NetDeviceEvent.java
trunk/net/src/driver/org/jnode/driver/net/NetDeviceListener.java
trunk/net/src/driver/org/jnode/driver/net/NetworkException.java
trunk/net/src/driver/org/jnode/driver/net/WirelessNetDeviceAPI.java
trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/AbstractEthernetDriver.java
trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/BasicEthernetDriver.java
trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/Flags.java
Modified: trunk/net/src/driver/org/jnode/driver/net/NetDeviceAPI.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/NetDeviceAPI.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/NetDeviceAPI.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net;
import org.jnode.driver.DeviceAPI;
@@ -28,71 +28,74 @@
/**
* Generic API for network devices.
- *
+ * <p/>
* <h3>Transmission</h3>
- * To transmit data, each network device should has a queue of Frame's.
+ * To transmit data, each network device should has a queue of Frame's.
* The transmit method is called to add a frame to this queue. The device
* should start a worker thread to process this queue.
* Once a frame has been transmitted, the notifyTransmission method of that
* frame must be called.
- *
+ * <p/>
* <h3>Reception</h3>
* On reception of a frame, a network device must call the receive
* method of the NetworkLayerManager.
- *
+ *
+ * @author epr
* @see org.jnode.net.NetworkLayerManager
- *
- * @author epr
*/
public interface NetDeviceAPI extends DeviceAPI {
- /**
- * Gets the hardware address of this device
- */
- public HardwareAddress getAddress();
+ /**
+ * Gets the hardware address of this device
+ */
+ public HardwareAddress getAddress();
- /**
- * Gets the maximum transfer unit, the number of bytes this device can
- * transmit at a time.
- */
- public int getMTU();
+ /**
+ * Gets the maximum transfer unit, the number of bytes this device can
+ * transmit at a time.
+ */
+ public int getMTU();
- /**
- * Add the given frame to the transmit queue of this device.
- * A client to this interface should use methods in Frame to checks for
- * errors and wait for the actual transmission.
- * After the frame has actually been transmitted by the device, the
- * Frame.notifyTransmission method must be called.
- *
- * @param packet The network packet to transmit. No linklayer header has
- * been added yet.
- * @param destination The destination address, or null for a broadcast.
- * @throws NetworkException
- */
- public void transmit(SocketBuffer packet, HardwareAddress destination)
- throws NetworkException;
+ /**
+ * Add the given frame to the transmit queue of this device.
+ * A client to this interface should use methods in Frame to checks for
+ * errors and wait for the actual transmission.
+ * After the frame has actually been transmitted by the device, the
+ * Frame.notifyTransmission method must be called.
+ *
+ * @param packet The network packet to transmit. No linklayer header has
+ * been added yet.
+ * @param destination The destination address, or null for a broadcast.
+ * @throws NetworkException
+ */
+ public void transmit(SocketBuffer packet, HardwareAddress destination)
+ throws NetworkException;
- /**
- * Gets the protocol address information for a given protocol.
- * @param protocolID
- * @return The protocol address information, or null if not found.
- */
- public ProtocolAddressInfo getProtocolAddressInfo(int protocolID);
+ /**
+ * Gets the protocol address information for a given protocol.
+ *
+ * @param protocolID
+ * @return The protocol address information, or null if not found.
+ */
+ public ProtocolAddressInfo getProtocolAddressInfo(int protocolID);
- /**
- * Sets the protocol address information for a given protocol.
- * @param protocolID
- */
- public void setProtocolAddressInfo(int protocolID, ProtocolAddressInfo addressInfo);
-
/**
- * Add a net device listener to this device.
+ * Sets the protocol address information for a given protocol.
+ *
+ * @param protocolID
+ */
+ public void setProtocolAddressInfo(int protocolID, ProtocolAddressInfo addressInfo);
+
+ /**
+ * Add a net device listener to this device.
+ *
* @param listener
*/
public void addEventListener(NetDeviceListener listener);
-
+
/**
- * Add a net device listener to this device.
+ * Add a net device listener to this device.
+ *
* @param listener
*/
public void removeEventListener(NetDeviceListener listener);
Modified: trunk/net/src/driver/org/jnode/driver/net/NetDeviceEvent.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/NetDeviceEvent.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/NetDeviceEvent.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net;
import java.util.EventObject;
@@ -27,14 +27,16 @@
/**
* Base class for all net device events.
- *
+ *
* @author Ewout Prangsma (ep...@us...)
*/
public abstract class NetDeviceEvent extends EventObject {
- /** Identification of the event */
+ /**
+ * Identification of the event
+ */
private final int id;
-
+
/**
* @param source
*/
@@ -45,14 +47,16 @@
/**
* Gets the device that it the source of this event.
+ *
* @return
*/
public final Device getDevice() {
- return (Device)getSource();
+ return (Device) getSource();
}
-
+
/**
* Gets the event ID.
+ *
* @return Returns the id.
*/
public final int getId() {
Modified: trunk/net/src/driver/org/jnode/driver/net/NetDeviceListener.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/NetDeviceListener.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/NetDeviceListener.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net;
import java.util.EventListener;
@@ -30,6 +30,7 @@
/**
* A net device has fired the given event.
+ *
* @param event
*/
public void processEvent(NetDeviceEvent event);
Modified: trunk/net/src/driver/org/jnode/driver/net/NetworkException.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/NetworkException.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/NetworkException.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net;
import java.net.SocketException;
@@ -28,34 +28,34 @@
*/
public class NetworkException extends SocketException {
- /**
- *
- */
- public NetworkException() {
- super();
- }
+ /**
+ *
+ */
+ public NetworkException() {
+ super();
+ }
- /**
- * @param message
- * @param cause
- */
- public NetworkException(String message, Throwable cause) {
- super(message);
- initCause(cause);
- }
+ /**
+ * @param message
+ * @param cause
+ */
+ public NetworkException(String message, Throwable cause) {
+ super(message);
+ initCause(cause);
+ }
- /**
- * @param cause
- */
- public NetworkException(Throwable cause) {
- super();
- initCause(cause);
- }
+ /**
+ * @param cause
+ */
+ public NetworkException(Throwable cause) {
+ super();
+ initCause(cause);
+ }
- /**
- * @param s
- */
- public NetworkException(String s) {
- super(s);
- }
+ /**
+ * @param s
+ */
+ public NetworkException(String s) {
+ super(s);
+ }
}
Modified: trunk/net/src/driver/org/jnode/driver/net/WirelessNetDeviceAPI.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/WirelessNetDeviceAPI.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/WirelessNetDeviceAPI.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,42 +18,46 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net;
import org.jnode.net.wireless.AuthenticationMode;
/**
* Device API for wireless network devices.
- *
+ *
* @author Ewout Prangsma (ep...@us...)
*/
public interface WirelessNetDeviceAPI extends NetDeviceAPI {
/**
* Gets the current authentication mode.
+ *
* @return
*/
public AuthenticationMode getAuthenticationMode();
-
+
/**
* Sets the current authentication mode.
+ *
* @param mode
*/
public void setAuthenticationMode(AuthenticationMode mode)
- throws NetworkException;
-
+ throws NetworkException;
+
/**
* Gets the current ESS ID.
+ *
* @return A valid ESSID, or null if not ESSID is present.
*/
public String getESSID();
/**
* Sets the current ESS ID.
+ *
* @param essid A valid ESSID, or null for any ESS.
*/
public void setESSID(String essid)
- throws NetworkException;
-
+ throws NetworkException;
+
}
Modified: trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/AbstractEthernetDriver.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/AbstractEthernetDriver.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/AbstractEthernetDriver.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net.ethernet.spi;
import org.jnode.driver.net.NetworkException;
@@ -34,7 +34,7 @@
* @author epr
*/
public abstract class AbstractEthernetDriver extends AbstractNetDriver
- implements EthernetConstants {
+ implements EthernetConstants {
/**
* Gets the maximum transfer unit, the number of bytes this device can
@@ -69,7 +69,7 @@
* org.jnode.net.HardwareAddress)
*/
protected final void doTransmit(SocketBuffer skbuf,
- HardwareAddress destination) throws NetworkException {
+ HardwareAddress destination) throws NetworkException {
skbuf.insert(ETH_HLEN);
if (destination == null) {
destination = EthernetAddress.BROADCAST;
@@ -91,5 +91,5 @@
* org.jnode.net.HardwareAddress)
*/
protected abstract void doTransmitEthernet(SocketBuffer skbuf, HardwareAddress destination)
- throws NetworkException;
+ throws NetworkException;
}
Modified: trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/BasicEthernetDriver.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/BasicEthernetDriver.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/BasicEthernetDriver.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net.ethernet.spi;
import org.apache.log4j.Logger;
@@ -112,7 +112,8 @@
/**
* Create a new RTL8139Core instance
*/
- protected abstract AbstractDeviceCore newCore(Device device, Flags flags) throws DriverException, ResourceNotFreeException;
+ protected abstract AbstractDeviceCore newCore(Device device, Flags flags)
+ throws DriverException, ResourceNotFreeException;
/**
* Get the flags for this device
Modified: trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/Flags.java
===================================================================
--- trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/Flags.java 2008-05-30 12:27:50 UTC (rev 4155)
+++ trunk/net/src/driver/org/jnode/driver/net/ethernet/spi/Flags.java 2008-05-30 12:54:00 UTC (rev 4156)
@@ -18,7 +18,7 @@
* along with this library; If not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
package org.jnode.driver.net.ethernet.spi;
/**
@@ -27,8 +27,7 @@
* @author Martin Husted Hartvig
*/
-public interface Flags
-{
- public String getName();
+public interface Flags {
+ public String getName();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|