com.dalsemi.tininet.ppp
Class Option
java.lang.Object
|
+--com.dalsemi.tininet.ppp.Option
- public class Option
- extends java.lang.Object
The LCP and IPCP protocols use an option format of Type|Length|Data.
This class helps in manipulating these options.
Constructor Summary |
Option()
Default constructor |
Option(int type,
int length,
byte[] data)
Constructor |
Method Summary |
static void |
copyOptionsToBuffer(byte[] buf,
java.util.Vector options)
Copy options from a vector to a byte array. |
static java.util.Vector |
getOptions(byte[] packet)
Return a vector of options from a packet. |
static int |
getOptionsLength(java.util.Vector options)
Get length of options in buffer |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Option
public Option()
- Default constructor
Option
public Option(int type,
int length,
byte[] data)
- Constructor
- Parameters:
type
- option typelength
- option lengthdata
- option data as byte array
getOptions
public static java.util.Vector getOptions(byte[] packet)
- Return a vector of options from a packet.
- Parameters:
packet
- packet to extract options from- Returns:
- Vector of options
copyOptionsToBuffer
public static void copyOptionsToBuffer(byte[] buf,
java.util.Vector options)
- Copy options from a vector to a byte array.
- Parameters:
buf
- byte array to receive optionsoptions
- options to copy
getOptionsLength
public static int getOptionsLength(java.util.Vector options)
- Get length of options in buffer
- Parameters:
options
- options to examine
Also see:
o TINI 1.16 API
o TINI Home Page
o 1-Wire API
o JDK 1.1
Last update Wed Jun 8 17:19:36 CDT 2005