|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.tininet.ppp.Protocol
Base class used to implement PPP protocols.
Field Summary | |
protected static int |
ACK_RCVD
Acknowledge received state constant. |
protected static int |
ACK_SENT
Acknowledge sent state constant. |
protected static int |
CLOSED
Closed state constant. |
protected static int |
CLOSING
Closing state constant. |
protected static int |
CODE_POS
Position of code octet within message. |
protected static int |
ID_POS
Position of message identifier octet within message. |
protected static int |
INITIAL
Initial state constant. |
protected static int |
interfaceNumber
Native interface index for this instance |
protected static int |
LENGTH_LSB_POS
Position of message length LSB within message. |
protected static int |
LENGTH_MSB_POS
Position of message length MSB within message. |
protected boolean |
opened
True if this protocol is opened |
protected static int |
OPENED
Opened state constant. |
protected static int |
OPTION_START_POS
Start position of message options. |
protected static int |
PACKET_OVERHEAD
Number of overhead bytes in a packet. |
protected int |
packetID
Packet ID |
protected static java.lang.String |
PASSWORD_FILE
Password file name |
protected static int |
PROTOCOL_LSB_POS
Position of protocol number LSB within message. |
protected static int |
PROTOCOL_MSB_POS
Position of protocol number MSB within message. |
protected int |
protocolNum
The protocol number |
protected static Queue |
queue
Queue object |
protected static int |
REQ_SENT
Request sent state constant. |
protected static int |
STARTING
Starting state constant. |
protected int |
state
State of protocol FSM |
protected static int |
STOPPED
Stopped state constant. |
protected static int |
STOPPING
Stopped state constant. |
protected int |
timeoutCount
Timeout count |
protected int |
timeoutCounter
Timeout counter |
protected int |
timeoutInterval
Timeout interval |
protected static Timer |
timer
Timer object |
Constructor Summary | |
Protocol()
|
Method Summary | |
protected java.lang.String |
findPassword(java.lang.String name)
Return password for name or null if not found or password file does not exist. |
protected byte[] |
formatMsg(int code,
int id)
Format a message with no options. |
protected byte[] |
formatMsg(int code,
int id,
byte[] optionData)
Format a message using a byte array for option data. |
protected byte[] |
formatMsg(int code,
int id,
java.util.Vector options)
Format a message using a vector for option data. |
abstract void |
newPacket(byte[] msg)
Invoked when this protocol has a new packet. |
protected void |
queueAdd(int event)
Add an event to the queue. |
protected void |
queueAdd(int event,
int data)
Add an event to the queue. |
protected void |
queueAdd(int event,
java.lang.String data)
Add an event to the queue. |
protected void |
sendPacket(byte[] buf)
Send a packet. |
protected void |
startTimer(TimerEventListener proto)
Start the timeout timer. |
protected void |
stopTimer(TimerEventListener proto)
Stop the timeout timer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int PROTOCOL_MSB_POS
protected static final int PROTOCOL_LSB_POS
protected static final int CODE_POS
protected static final int ID_POS
protected static final int LENGTH_MSB_POS
protected static final int LENGTH_LSB_POS
protected static final int OPTION_START_POS
protected static final int INITIAL
protected static final int STARTING
protected static final int CLOSED
protected static final int STOPPED
protected static final int CLOSING
protected static final int STOPPING
protected static final int REQ_SENT
protected static final int ACK_RCVD
protected static final int ACK_SENT
protected static final int OPENED
protected static final int PACKET_OVERHEAD
protected static final java.lang.String PASSWORD_FILE
protected int state
protected boolean opened
protected int packetID
protected static int interfaceNumber
protected static Timer timer
protected static Queue queue
protected int timeoutInterval
protected int timeoutCount
protected int timeoutCounter
protected int protocolNum
Constructor Detail |
public Protocol()
Method Detail |
public abstract void newPacket(byte[] msg)
protected void queueAdd(int event)
event
- encoded eventprotected void queueAdd(int event, int data)
event
- encoded eventdata
- event dataprotected void queueAdd(int event, java.lang.String data)
event
- encoded eventdata
- event dataprotected void sendPacket(byte[] buf)
buf
- packet to be sentprotected byte[] formatMsg(int code, int id)
code
- message codeid
- message identification numberprotected byte[] formatMsg(int code, int id, byte[] optionData)
code
- message codeid
- message identification numberoptionData
- message option dataprotected byte[] formatMsg(int code, int id, java.util.Vector options)
code
- message codeid
- message identification numberoptions
- message option dataprotected java.lang.String findPassword(java.lang.String name)
name
- name to search forprotected void startTimer(TimerEventListener proto)
proto
- protocol to receive notificationprotected void stopTimer(TimerEventListener proto)
proto
- protocol to receive notification
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |