com.dalsemi.tininet.ppp
Class Lcp

java.lang.Object
  |
  +--com.dalsemi.tininet.ppp.Protocol
        |
        +--com.dalsemi.tininet.ppp.Lcp

public class Lcp
extends Protocol
implements TimerEventListener

This class implements the Link Control Ptotocol (LCP). The LCP protocol is used to configure link parameters such as encapsulation format, packet size limits and authentication protocols.


Field Summary
protected static int LCP_PROTOCOL_NUMBER
          LCP protocol number as defined in RFC 1661
protected  boolean passive
          Contains current passive mode state.
 
Fields inherited from class com.dalsemi.tininet.ppp.Protocol
ACK_RCVD, ACK_SENT, CLOSED, CLOSING, CODE_POS, ID_POS, INITIAL, interfaceNumber, LENGTH_LSB_POS, LENGTH_MSB_POS, opened, OPENED, OPTION_START_POS, PACKET_OVERHEAD, packetID, PASSWORD_FILE, PROTOCOL_LSB_POS, PROTOCOL_MSB_POS, protocolNum, queue, REQ_SENT, STARTING, state, STOPPED, STOPPING, timeoutCount, timeoutCounter, timeoutInterval, timer
 
Constructor Summary
Lcp()
          Default constructor
 
Method Summary
 void close()
          Close event
 void down()
          Down event
 long getRemoteAccm()
           
 void newPacket(byte[] packet)
          LCP packets enter here.
 void open()
          Open event The following methods present the state machine with an event that is not generated by receiving a packet or timeout.
 void setAuthenticate(boolean value, boolean strong)
          Set true to authenticate remote peer
 void setRemoteAccm(long accm)
           
 void timeout()
          TimerEventListener interface
 void unknownProtocol(byte[] packet)
          This is to avoid complicating the packet type selector
 void up()
          Up event
 
Methods inherited from class com.dalsemi.tininet.ppp.Protocol
findPassword, formatMsg, formatMsg, formatMsg, queueAdd, queueAdd, queueAdd, sendPacket, startTimer, stopTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LCP_PROTOCOL_NUMBER

protected static final int LCP_PROTOCOL_NUMBER
LCP protocol number as defined in RFC 1661

passive

protected boolean passive
Contains current passive mode state. Passive mode effects the earliest phase of of connection establishment, Line Control Protocol (LCP) negotiation. By default passive mode is set to false and LCP attempts to initiate a connection by sending configuration request messages to the remote peer. If no response is received LCP times out and generates a stopped event. When passive mode is true LCP will time out but not generate as stopped event and will wait indefinitly for the remote peer to transmit a configuration request.
Constructor Detail

Lcp

public Lcp()
Default constructor
Method Detail

newPacket

public void newPacket(byte[] packet)
LCP packets enter here.
Overrides:
newPacket in class Protocol

open

public void open()
Open event The following methods present the state machine with an event that is not generated by receiving a packet or timeout.

close

public void close()
Close event

up

public void up()
Up event

down

public void down()
Down event

timeout

public void timeout()
TimerEventListener interface
Specified by:
timeout in interface TimerEventListener

unknownProtocol

public void unknownProtocol(byte[] packet)
This is to avoid complicating the packet type selector

setRemoteAccm

public void setRemoteAccm(long accm)

getRemoteAccm

public long getRemoteAccm()

setAuthenticate

public void setAuthenticate(boolean value,
                            boolean strong)
Set true to authenticate remote peer


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