hardwareaddress.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 53 行

JAVA
53
字号
/*
 * $Id: HardwareAddress.java,v 1.1 2003/11/25 11:52:21 epr Exp $
 */
package org.jnode.net;

/**
 * Interface for network hardware addresses, such as an ethernet address.
 * @author epr
 */
public interface HardwareAddress {

	/**
	 * Is this address equal to the given address.
	 * @param o
	 */
	public boolean equals(HardwareAddress o);
	
	/**
	 * Gets the length of this address in bytes
	 */
	public int getLength();
	
	/**
	 * Gets the address-byte at a given index
	 * @param index
	 */
	public byte get(int index);
	
	/**
	 * Write this address to a given offset in the given buffer
	 * @param skbuf
	 * @param skbufOffset
	 */
	public void writeTo(SocketBuffer skbuf, int skbufOffset);
	
	/**
	 * Is this a broadcast address?
	 */
	public boolean isBroadcast();

	/**
	 * Gets the default broadcast address for this kind of hardware address.
	 */
	public HardwareAddress getDefaultBroadcastAddress();
	
	/**
	 * Gets the type of this address.
	 * This type is used by (e.g.) ARP.
	 */
	public int getType();
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?