diff options
author | Fritz Elfert <felfert@to.com> | 2002-03-16 23:10:52 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2002-03-16 23:10:52 +0000 |
commit | 193af441a127a0daabbd17c512e34817ddbcadfd (patch) | |
tree | deef4cbfdf258ae3c7d8cde2b43a611520f73632 /ncpd/link.h | |
parent | 7121719ec7f473c3d26873d688179a7d7f466026 (diff) | |
download | plptools-193af441a127a0daabbd17c512e34817ddbcadfd.tar.gz plptools-193af441a127a0daabbd17c512e34817ddbcadfd.tar.bz2 plptools-193af441a127a0daabbd17c512e34817ddbcadfd.zip |
- ncpd now works with both Series 3 and Series 5
- ncpd now has autobaud feature (default on), which cycles baudrate
- lib: added getSpeed() for retrieving current speed of connection
- plpftp: Use getSpeed()
- plpbackup: Ongoing work
- configure stuff: removed several entries from acconfig.h comments now
defined as 3rd arg to AC_DEFINE...
Diffstat (limited to 'ncpd/link.h')
-rw-r--r-- | ncpd/link.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/ncpd/link.h b/ncpd/link.h index 81732b6..25cd280 100644 --- a/ncpd/link.h +++ b/ncpd/link.h @@ -32,6 +32,7 @@ #include "bufferstore.h" #include "bufferarray.h" +#include "Enum.h" #include <vector> #define LNK_DEBUG_LOG 4 @@ -70,6 +71,12 @@ extern "C" { class Link { public: + enum link_type { + LINK_TYPE_UNKNOWN = 0, + LINK_TYPE_SIBO = 1, + LINK_TYPE_EPOC = 2, + }; + /** * Construct a new link instance. * @@ -141,6 +148,20 @@ public: */ unsigned short getVerbose(); + /** + * Get the current link type. + * + * @returns One of LINK_TYPE_... values. + */ + Enum<link_type> getLinkType(); + + /** + * Get current speed of the serial device + * + * @returns The current speed in baud. + */ + int getSpeed(); + private: friend class packet; friend void * expire_check(void *); @@ -148,11 +169,15 @@ private: void receive(bufferStore buf); void transmit(bufferStore buf); void sendAck(int seq); - void sendCon(); + void sendReqReq(); + void sendReqCon(); + void sendReq(); void multiAck(struct timeval); void retransmit(); void transmitHoldQueue(int channel); void transmitWaitQueue(); + void purgeAllQueues(); + unsigned long retransTimeout(); pthread_t checkthread; pthread_mutex_t queueMutex; @@ -163,10 +188,10 @@ private: int rxSequence; int seqMask; int maxOutstanding; - unsigned long retransTimeout; unsigned long conMagic; unsigned short verbose; bool failed; + Enum<link_type> linkType; vector<ackWaitQueueElement> ackWaitQueue; vector<bufferStore> holdQueue; |