From 193af441a127a0daabbd17c512e34817ddbcadfd Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sat, 16 Mar 2002 23:10:52 +0000 Subject: - 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... --- lib/rfsv.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/rfsv.cc') diff --git a/lib/rfsv.cc b/lib/rfsv.cc index 25bf91c..310d7c4 100644 --- a/lib/rfsv.cc +++ b/lib/rfsv.cc @@ -167,6 +167,22 @@ attr2String(const u_int32_t attr) return tmp; } +int rfsv:: +getSpeed() +{ + bufferStore a; + a.addStringT("NCP$GSPD"); + if (!skt->sendBufferStore(a)) + return -1; + if (skt->getBufferStore(a) != 1) + return -1; + if (a.getLen() != 5) + return -1; + if (a.getByte(0) != E_PSI_GEN_NONE) + return -1; + return a.getDWord(1); +} + /* * Local variables: * c-basic-offset: 4 -- cgit v1.2.3