linux-decnet-commit Mailing List for DECnet for Linux (Page 28)
Brought to you by:
chrissie_c,
ph3-der-loewe
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(20) |
Feb
(27) |
Mar
(25) |
Apr
(12) |
May
(2) |
Jun
(6) |
Jul
(36) |
Aug
(12) |
Sep
(12) |
Oct
(16) |
Nov
(5) |
Dec
(5) |
2003 |
Jan
(8) |
Feb
(9) |
Mar
(25) |
Apr
(18) |
May
(29) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(10) |
Oct
(5) |
Nov
(3) |
Dec
(9) |
2004 |
Jan
(17) |
Feb
|
Mar
(9) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(2) |
Aug
(21) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
(5) |
Feb
|
Mar
(13) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
(13) |
Oct
(83) |
Nov
(2) |
Dec
|
2006 |
Jan
(21) |
Feb
(1) |
Mar
(32) |
Apr
(31) |
May
(3) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(13) |
2007 |
Jan
(1) |
Feb
(7) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2008 |
Jan
(4) |
Feb
(13) |
Mar
(24) |
Apr
(18) |
May
(10) |
Jun
|
Jul
|
Aug
(40) |
Sep
(72) |
Oct
(61) |
Nov
(9) |
Dec
(2) |
2009 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(41) |
Aug
(28) |
Sep
(2) |
Oct
(5) |
Nov
(4) |
Dec
|
2011 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Patrick C. <pa...@us...> - 2004-03-24 17:45:20
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13621 Modified Files: NEWS Log Message: Copy of changelog Index: NEWS =================================================================== RCS file: /cvsroot/linux-decnet/latd/NEWS,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** NEWS 15 Mar 2003 16:36:21 -0000 1.24 --- NEWS 24 Mar 2004 17:34:39 -0000 1.25 *************** *** 1,2 **** --- 1,64 ---- + latd (1.21) unstable; urgency=low + + * Don't expect an ACK to an ACK. (duh) + * Cope with non-contiguous interface numbers in Linux + * Remove tcflow() calls as they slow things down and don't + achieve anything. This was particularly bad with DS90L servers + * Try harder to write all data to a PTY. + * Fix REQID message in moprc so it works with more servers. + + -- Patrick Caulfield <pa...@de...> Wed, 24 Mar 2004 17:34:44 +0000 + + latd (1.20) unstable; urgency=low + + * Loads of protocol fixes and speed enhancements, so many I've forgotten + them all now. Importantly I hope this version should be generally more + reliable and faster than previous ones. + NOTE: There are known problems with DECserver 90L terminal servers and + this release. + * Don't kill a circuit with outstanding data + * Add -b switch to moprc + * Add better support for DS90L servers reverse LAT + (belated) thanks to Dmitri Popov for this. + * (non-debian) Don't clobber /etc/latd.conf on "make install" + * Add --disable-defservice to ./configure + * Don't send out service multicasts if we have no services to advertise + * Don't keep retrying connects for ever + * Reduce delay between EOF and deleting a connection. + + -- Patrick Caulfield <pa...@de...> Sat, 31 Jan 2004 17:32:27 +0000 + + latd (1.19) unstable; urgency=low + + * Some Darwin bpf interface fixes. + * fix lat group on /dev/lat/ devices that was broken by my autoconf changes + in 1.17 + * Fix memory leak caused by latcp -d & llogin -d + (thanks to Sergei Gorbatov) + + -- Patrick Caulfield <pa...@de...> Sat, 20 Dec 2003 15:16:21 +0000 + + latd (1.18.1-1) unstable; urgency=low + + * include <cassert> + Closes: #195153 + + -- Patrick Caulfield <pa...@de...> Tue, 10 Jun 2003 08:21:04 +0100 + + + latd (1.18-1) unstable; urgency=low + + * Fix configure --enable-debug + * Fix configure --sysconfdir + * Don't send issue file if it exists but is empty. + * Add support for reverse-LAT services. you can now use LATSYM + to print to LAT printers on Linux (and probably many other things too!) + * Make sure node names are truncated at 16 characters + * Fix shell job control problems when connecting to some systems + * Send remote credit a little earlier in an attempt to avoid those + annoying pauses. + + -- Patrick Caulfield <pa...@de...> Sun, 20 Apr 2003 10:59:36 +0100 + latd (1.17-1) unstable; urgency=low |
From: Patrick C. <pa...@us...> - 2004-03-24 17:43:35
|
Update of /cvsroot/linux-decnet/latd/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13306 Modified Files: changelog Log Message: Changelog for 1.2.1 Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/latd/debian/changelog,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** changelog 23 Jan 2004 09:08:45 -0000 1.16 --- changelog 24 Mar 2004 17:32:55 -0000 1.17 *************** *** 1,2 **** --- 1,13 ---- + latd (1.21) unstable; urgency=low + + * Don't expect an ACK to an ACK. (duh) + * Cope with non-contiguous interface numbers in Linux + * Remove tcflow() calls as they slow things down and don't + achieve anything. This was particularly bad with DS90L servers + * Try harder to write all data to a PTY. + * Fix REQID message in moprc so it works with more servers. + + -- Patrick Caulfield <pa...@de...> Wed, 24 Mar 2004 17:34:44 +0000 + latd (1.20) unstable; urgency=low *************** *** 16,20 **** * Reduce delay between EOF and deleting a connection. ! -- Patrick Caulfield <pa...@de...> Mon, 19 Jan 2004 11:59:29 +0000 latd (1.19) unstable; urgency=low --- 27,31 ---- * Reduce delay between EOF and deleting a connection. ! -- Patrick Caulfield <pa...@de...> Sat, 31 Jan 2004 17:32:27 +0000 latd (1.19) unstable; urgency=low |
From: Patrick C. <pa...@us...> - 2004-03-24 17:04:32
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4436 Modified Files: interfaces-linux.cc Log Message: More brute-force interface finding Index: interfaces-linux.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-linux.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** interfaces-linux.cc 16 Mar 2004 13:07:09 -0000 1.8 --- interfaces-linux.cc 24 Mar 2004 16:53:53 -0000 1.9 *************** *** 92,102 **** { ifr.ifr_ifindex = iindex; ! ioctl(sock, SIOCGIFNAME, &ifr); ! // Only use ethernet interfaces ! ioctl(sock, SIOCGIFHWADDR, &ifr); ! if (ifr.ifr_hwaddr.sa_family == ARPHRD_ETHER) { ! debuglog(("interface %d: %d\n", num, iindex)); ! ifs[num++] = iindex; } } --- 92,104 ---- { ifr.ifr_ifindex = iindex; ! if (ioctl(sock, SIOCGIFNAME, &ifr) == 0) { ! // Only use ethernet interfaces ! ioctl(sock, SIOCGIFHWADDR, &ifr); ! if (ifr.ifr_hwaddr.sa_family == ARPHRD_ETHER) ! { ! debuglog(("interface %d: %d\n", num, iindex)); ! ifs[num++] = iindex; ! } } } *************** *** 155,173 **** ifr.ifr_ifindex = iindex; ! while (ioctl(sock, SIOCGIFNAME, &ifr) == 0) { ! if (strcmp(ifr.ifr_name, name) == 0) { ! // Also check it's ethernet while we are here ! ioctl(sock, SIOCGIFHWADDR, &ifr); ! if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) { ! syslog(LOG_ERR, "Device %s is not ethernet\n", name); ! return -1; } - close(sock); - return iindex; } - ifr.ifr_ifindex = ++iindex; } // Didn't find it --- 157,178 ---- ifr.ifr_ifindex = iindex; ! for (iindex = 1; iindex < 256; iindex++) { ! ifr.ifr_ifindex = iindex; ! if (ioctl(sock, SIOCGIFNAME, &ifr) == 0) { ! if (strcmp(ifr.ifr_name, name) == 0) { ! // Also check it's ethernet while we are here ! ioctl(sock, SIOCGIFHWADDR, &ifr); ! if (ifr.ifr_hwaddr.sa_family != ARPHRD_ETHER) ! { ! syslog(LOG_ERR, "Device %s is not ethernet\n", name); ! return -1; ! } ! close(sock); ! return iindex; } } } // Didn't find it |
From: Patrick C. <pa...@us...> - 2004-03-24 15:49:41
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22132 Modified Files: moprc.cc Log Message: Fix length of REQID message, Index: moprc.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/moprc.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** moprc.cc 4 Jan 2004 14:40:30 -0000 1.8 --- moprc.cc 24 Mar 2004 15:39:02 -0000 1.9 *************** *** 254,258 **** memset(buf, 0, sizeof(buf)); ! buf[0] = 4; buf[1] = 0; buf[2] = MOPRC_CMD_REQUESTID; --- 254,258 ---- memset(buf, 0, sizeof(buf)); ! buf[0] = 5; buf[1] = 0; buf[2] = MOPRC_CMD_REQUESTID; |
From: Patrick C. <pa...@us...> - 2004-03-16 13:22:45
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26299 Modified Files: session.cc session.h Log Message: comment out tcflow() calls cos they seem to make DS90L+ server go /really/ slowly. Make an effort to write ALL the data to a PTY rather than relying on write Index: session.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/session.cc,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** session.cc 31 Dec 2003 13:11:52 -0000 1.40 --- session.cc 16 Mar 2004 13:13:23 -0000 1.41 *************** *** 63,70 **** stopped = false; LATServer::Instance()->set_fd_state(master_fd, false); ! tcflow(master_fd, TCOON); } } /* Got some data from the terminal - send it to the PTY */ int LATSession::send_data_to_process(unsigned char *buf, int len) --- 63,94 ---- stopped = false; LATServer::Instance()->set_fd_state(master_fd, false); ! // tcflow(master_fd, TCOON); } } + #define REALLY_VERBOSE_DEBUGLOG + // Try to write all the data to the PTY + int LATSession::writeall(int fd, unsigned char *buf, int len) + { + int done = 0; + + while (done < len) + { + int count; + debuglog(("writeall::done = %d, len = %d\n", done, len)); + count = ::write(fd, buf+done, len-done); + if (count > 0) + { + done += count; + } + else + { + debuglog(("writeall: write returned %d, errno = %s\n", count, strerror(errno))); + return -1; + } + } + return len; + } + /* Got some data from the terminal - send it to the PTY */ int LATSession::send_data_to_process(unsigned char *buf, int len) *************** *** 88,96 **** crlf_to_lf(buf, len, newbuf, &newlen); ! write(master_fd, newbuf, newlen); } else { ! write(master_fd, buf, len); } } --- 112,120 ---- crlf_to_lf(buf, len, newbuf, &newlen); ! writeall(master_fd, newbuf, newlen); } else { ! writeall(master_fd, buf, len); } } *************** *** 126,130 **** LATServer::Instance()->set_fd_state(master_fd, true); stopped = true; ! tcflow(master_fd, TCOOFF); } return 0; // Not allowed! --- 150,154 ---- LATServer::Instance()->set_fd_state(master_fd, true); stopped = true; ! // tcflow(master_fd, TCOOFF); } return 0; // Not allowed! *************** *** 244,248 **** debuglog(("Out of credit...Stop\n")); stopped = true; ! tcflow(master_fd, TCOOFF); } --- 268,272 ---- debuglog(("Out of credit...Stop\n")); stopped = true; ! // tcflow(master_fd, TCOOFF); } Index: session.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/session.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** session.h 28 May 2003 15:56:08 -0000 1.13 --- session.h 16 Mar 2004 13:13:23 -0000 1.14 *************** *** 82,84 **** --- 82,85 ---- void add_slot(unsigned char *buf, int &ptr, int slotcmd, unsigned char *slotdata, int len); void crlf_to_lf(unsigned char *buf, int len, unsigned char *newbuf, int *newlen); + int writeall(int fd, unsigned char *buf, int len); }; |
From: Patrick C. <pa...@us...> - 2004-03-16 13:16:26
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25210 Modified Files: interfaces-linux.cc Log Message: Cater for non-sequential interface numbers Index: interfaces-linux.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-linux.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** interfaces-linux.cc 19 May 2003 13:16:01 -0000 1.7 --- interfaces-linux.cc 16 Mar 2004 13:07:09 -0000 1.8 *************** *** 1,4 **** /****************************************************************************** ! (c) 2002-2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,4 ---- /****************************************************************************** ! (c) 2002-2004 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify *************** *** 89,96 **** num = 0; ! ifr.ifr_ifindex = iindex; ! ! while (ioctl(sock, SIOCGIFNAME, &ifr) == 0) { // Only use ethernet interfaces ioctl(sock, SIOCGIFHWADDR, &ifr); --- 89,96 ---- num = 0; ! for (iindex = 1; iindex < 256; iindex++) { + ifr.ifr_ifindex = iindex; + ioctl(sock, SIOCGIFNAME, &ifr); // Only use ethernet interfaces ioctl(sock, SIOCGIFHWADDR, &ifr); *************** *** 100,104 **** ifs[num++] = iindex; } - ifr.ifr_ifindex = ++iindex; } --- 100,103 ---- |
From: Patrick C. <pa...@us...> - 2004-01-31 16:38:19
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21460 Modified Files: connection.cc Log Message: honour the .needs_ack field of a pending_msg. Fixes stupid bug that killed DS90L connections Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -r1.66 -r1.67 *** connection.cc 23 Jan 2004 09:08:20 -0000 1.66 --- connection.cc 31 Jan 2004 16:36:35 -0000 1.67 *************** *** 1,4 **** /****************************************************************************** ! (c) 2000-2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,4 ---- /****************************************************************************** ! (c) 2000-2004 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify *************** *** 859,863 **** retransmit_count = 0; ! need_ack = true; window_size++; --- 859,863 ---- retransmit_count = 0; ! need_ack = msg.needs_ack(); window_size++; |
From: Patrick C. <pa...@us...> - 2004-01-18 14:00:12
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv29624 Modified Files: TODO Log Message: Update Index: TODO =================================================================== RCS file: /cvsroot/linux-decnet/latd/TODO,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** TODO 28 May 2003 15:56:08 -0000 1.16 --- TODO 18 Jan 2004 14:00:09 -0000 1.17 *************** *** 1,10 **** TODO in no particular order ---- ! - Update to Debian policy 2.5.9 (see section 11.1 on DEB_BUILD_OPTIONS) - support limited reverse LAT connections (command-line already there) - - Test service responder. - - Find out we send so many more packets than Tru64. Probably related - to the second item below. THINGS I MAY NOT DO --- 1,7 ---- TODO in no particular order ---- ! - Find out why sending BREAKs can crash a DS90M (and fix it) - Update to Debian policy 2.5.9 (see section 11.1 on DEB_BUILD_OPTIONS) - support limited reverse LAT connections (command-line already there) THINGS I MAY NOT DO |
From: Patrick C. <pa...@us...> - 2004-01-18 13:59:33
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv29422 Modified Files: lat.h Log Message: Tidy Index: lat.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/lat.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** lat.h 28 May 2003 15:56:08 -0000 1.11 --- lat.h 18 Jan 2004 13:59:30 -0000 1.12 *************** *** 8,12 **** #define LAT_VERSION_ECO 2 ! #define MAX_LAT_MTU 1500 // max ethernet packet // Name of the /dev/lat directory for local "ports" --- 8,12 ---- #define LAT_VERSION_ECO 2 ! #define MAX_LAT_MTU 1500 // max ethernet packet // Name of the /dev/lat directory for local "ports" |
From: Patrick C. <pa...@us...> - 2004-01-18 13:55:52
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv28877 Modified Files: server.cc Log Message: Run the delete check after circuit timer ticks too. Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -r1.77 -r1.78 *** server.cc 6 Jan 2004 09:29:02 -0000 1.77 --- server.cc 18 Jan 2004 13:55:49 -0000 1.78 *************** *** 598,612 **** next_circuit_time.tv_sec = 0; #endif - continue; } ! ! // Unix will never scale while this is necessary ! std::list<fdinfo>::iterator fdl(fdlist.begin()); ! for (; fdl != fdlist.end(); fdl++) { ! if (fdl->active() && ! FD_ISSET(fdl->get_fd(), &fds)) { ! process_data(*fdl); } } --- 598,613 ---- next_circuit_time.tv_sec = 0; #endif } ! else { ! // Unix will never scale while this is necessary ! std::list<fdinfo>::iterator fdl(fdlist.begin()); ! for (; fdl != fdlist.end(); fdl++) { ! if (fdl->active() && ! FD_ISSET(fdl->get_fd(), &fds)) ! { ! process_data(*fdl); ! } } } |
From: Patrick C. <pa...@us...> - 2004-01-16 15:39:21
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv29405 Modified Files: connection.cc connection.h Log Message: Don't keep retrying connects indefinitely ! Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -r1.64 -r1.65 *** connection.cc 7 Jan 2004 14:37:31 -0000 1.64 --- connection.cc 16 Jan 2004 15:39:11 -0000 1.65 *************** *** 64,67 **** --- 64,68 ---- request_id(0), last_msg_type(0), + last_msg_retries(0), role(SERVER), send_ack(false) *************** *** 111,114 **** --- 112,116 ---- request_id(0), last_msg_type(0), + last_msg_retries(0), role(CLIENT), send_ack(false) *************** *** 321,324 **** --- 323,329 ---- (*master_conn)->last_msg_type = 0; + last_msg_retries= 0; + (*master_conn)->last_msg_retries = 0; + // Connect a new port session to it ClientSession *cs = (ClientSession *)(*master_conn)->sessions[1]; *************** *** 679,687 **** { time_t tt; ! tt = time(NULL); if (tt - last_msg_time > 5) { last_msg_time = tt; switch (last_msg_type) { --- 684,700 ---- { time_t tt; ! tt = time(NULL); if (tt - last_msg_time > 5) { last_msg_time = tt; + + // Too many retries ?? + if (++last_msg_retries >= 3) + { + LATServer::Instance()->delete_connection(num); + last_msg_type = 0; + return; + } switch (last_msg_type) { *************** *** 750,755 **** add_string(buf, &ptr, LATServer::Instance()->get_local_node()); buf[ptr++] = 0; // ASCIC source port ! add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! add_string(buf, &ptr, servicename); add_string(buf, &ptr, portname); --- 763,768 ---- add_string(buf, &ptr, LATServer::Instance()->get_local_node()); buf[ptr++] = 0; // ASCIC source port ! buf[ptr++] = 0; // add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! add_string(buf, &ptr, remnode); add_string(buf, &ptr, portname); *************** *** 1072,1077 **** add_string(buf, &ptr, LATServer::Instance()->get_local_node()); buf[ptr++] = 0; // ASCIC source port ! add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! add_string(buf, &ptr, servicename); add_string(buf, &ptr, portname); --- 1085,1090 ---- add_string(buf, &ptr, LATServer::Instance()->get_local_node()); buf[ptr++] = 0; // ASCIC source port ! buf[ptr++] = 0; // add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! add_string(buf, &ptr, remnode); // woz servicename add_string(buf, &ptr, portname); *************** *** 1080,1083 **** --- 1093,1097 ---- last_msg_time = time(NULL); last_msg_type = msg->cmd; + last_msg_retries = 0; // Send it raw. *************** *** 1116,1119 **** --- 1130,1134 ---- last_msg_time = time(NULL); last_msg_type = msg->header.cmd; + last_msg_retries = 0; return send_message(buf, ptr, DATA); *************** *** 1168,1171 **** --- 1183,1187 ---- last_msg_time = time(NULL); last_msg_type = msg->header.cmd; + last_msg_retries = 0; return send_message(buf, ptr, DATA); *************** *** 1182,1185 **** --- 1198,1202 ---- { last_msg_type = 0; + last_msg_retries = 0; ClientSession *s = (ClientSession *)sessions[1]; s->show_status(node, entry); *************** *** 1292,1295 **** --- 1309,1313 ---- last_msg_type = 0; // Not waiting anymore + last_msg_retries = 0; debuglog(("got connect ack. seq: %d, ack: %d\n", Index: connection.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** connection.h 31 Dec 2003 13:11:54 -0000 1.29 --- connection.h 16 Jan 2004 15:39:14 -0000 1.30 *************** *** 88,91 **** --- 88,92 ---- time_t last_msg_time; int last_msg_type; + int last_msg_retries; int next_session_number(); |
From: Patrick C. <pa...@us...> - 2004-01-07 14:37:34
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv23639 Modified Files: connection.cc Log Message: Don't automatically ACK data_b messages Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** connection.cc 2 Jan 2004 14:28:37 -0000 1.63 --- connection.cc 7 Jan 2004 14:37:31 -0000 1.64 *************** *** 418,427 **** if (session) session->set_port((unsigned char *)slotcmd); - - reply[num_replies]->remote_session = slotcmd->local_session; - reply[num_replies]->local_session = slotcmd->remote_session; - reply[num_replies]->length = 0; - reply[num_replies]->cmd = 0; - num_replies++; break; --- 418,421 ---- |
From: Patrick C. <pa...@us...> - 2004-01-06 15:37:01
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv24568 Modified Files: latcp.cc latcp.8 Log Message: Rename latcp -dvld to -dvln as the duplicate d is confusing and -n means "nodes" Update man page to include new switch Index: latcp.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcp.cc,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -r1.41 -r1.42 *** latcp.cc 4 Jan 2004 15:49:04 -0000 1.41 --- latcp.cc 6 Jan 2004 15:36:58 -0000 1.42 *************** *** 109,113 **** printf (" -m multicast timer (100ths/sec)\n"); printf (" -k keepalive timer (seconds)\n"); ! printf (" -d [ [-l [-v] ] ]\n"); printf (" -z \n"); --- 109,113 ---- printf (" -m multicast timer (100ths/sec)\n"); printf (" -k keepalive timer (seconds)\n"); ! printf (" -d [ [-l [-v] [-n] ] ]\n"); printf (" -z \n"); *************** *** 217,221 **** if (!open_socket(false)) return; ! while ((opt=getopt(argc,argv,"lvd")) != EOF) { switch(opt) --- 217,221 ---- if (!open_socket(false)) return; ! while ((opt=getopt(argc,argv,"lvn")) != EOF) { switch(opt) *************** *** 229,238 **** break; ! case 'd': show_nodes = true; break; default: ! fprintf(stderr, "only -v or -l valid with -d flag\n"); exit(2); } --- 229,238 ---- break; ! case 'n': show_nodes = true; break; default: ! fprintf(stderr, "only -v, -n or -l valid with -d flag\n"); exit(2); } Index: latcp.8 =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcp.8,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** latcp.8 10 Sep 2002 12:20:59 -0000 1.12 --- latcp.8 6 Jan 2004 15:36:58 -0000 1.13 *************** *** 168,171 **** --- 168,174 ---- .B -v will show the learned service table in a verbose manner. + .B -n + will show the nodes (with MAC addresses) that are associated with + serviceless ports (eg reverse LAT ports to DS90L+ servers). .TP |
From: Patrick C. <pa...@us...> - 2004-01-06 15:20:15
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv21327 Removed Files: latd.conf Log Message: Renamed latd.conf.sample --- latd.conf DELETED --- |
From: Patrick C. <pa...@us...> - 2004-01-06 09:29:05
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv11473 Modified Files: configure.in server.cc Log Message: Add configure option to disable the default login service. Don't send out service multicasts if we have no services to advertise. Index: configure.in =================================================================== RCS file: /cvsroot/linux-decnet/latd/configure.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** configure.in 5 Jan 2004 13:13:47 -0000 1.9 --- configure.in 6 Jan 2004 09:29:02 -0000 1.10 *************** *** 147,150 **** --- 147,159 ---- AC_DEFINE_UNQUOTED(LLOGIN_SOCKNAME, "$LLOGINSOCK") + + dnl Disable default login service + AC_ARG_ENABLE(defservice, + [ --disable-defservice disable default login service], + [ ], [enable_defservice=yes]) + if test "x$enable_defservice" = "xyes"; then + CXXFLAGS="${CXXFLAGS-} -DENABLE_DEFAULT_SERVICE" + fi + dnl Configure debugging and/or warnings. AC_ARG_ENABLE(debug, Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -r1.76 -r1.77 *** server.cc 5 Jan 2004 13:13:47 -0000 1.76 --- server.cc 6 Jan 2004 09:29:02 -0000 1.77 *************** *** 204,332 **** char *myname; ! LAT_ServiceAnnounce *announce = (LAT_ServiceAnnounce *)packet; ! ptr = sizeof(LAT_ServiceAnnounce); ! ! announce->cmd = LAT_CCMD_SERVICE; ! announce->circuit_timer = circuit_timer; ! announce->hiver = LAT_VERSION; ! announce->lover = LAT_VERSION; ! announce->latver = LAT_VERSION; ! announce->latver_eco = LAT_VERSION_ECO; ! announce->incarnation = --multicast_incarnation; ! announce->flags = 0x1f; ! announce->mtu = dn_htons(1500); ! announce->multicast_timer = multicast_timer; ! if (do_shutdown) ! { ! announce->node_status = 3; // Not accepting connections ! } ! else ! { ! announce->node_status = 2; // Accepting connections ! } ! ! // Send group codes ! if (groups_set) ! { ! announce->group_length = 32; ! memcpy(&packet[ptr], groups, 32); ! ptr += 32; ! announce->flags |= 1; ! } ! else { ! announce->group_length = 1; ! packet[ptr++] = 01; ! } ! ! /* Get host info */ ! uname(&uinfo); ! // Node name ! myname = (char*)get_local_node(); ! packet[ptr++] = strlen(myname); ! strcpy((char*)packet+ptr, myname); ! ptr += strlen(myname); ! ! // Greeting ! packet[ptr++] = strlen((char*)greeting); ! strcpy((char*)packet+ptr, (char*)greeting); ! ptr += strlen((char*)greeting); ! ! // Number of services ! packet[ptr++] = servicelist.size(); ! std::list<serviceinfo>::iterator i(servicelist.begin()); ! for (; i != servicelist.end(); i++) ! { ! // Service rating ! unsigned char real_rating; ! if (i->get_static()) { ! real_rating = i->get_rating(); } else { ! /* Calculate dynamic rating */ ! real_rating = (unsigned char)(i->get_rating() / (get_loadavg()+1.0)); ! debuglog(("Dynamic service rating is %d\n", real_rating)); ! } ! packet[ptr++] = real_rating; ! ! // Service name ! const std::string name = i->get_name(); ! packet[ptr++] = name.length(); ! strcpy((char *)packet+ptr, i->get_name().c_str()); ! ptr += name.length(); ! ! // Service Identification ! std::string id = i->get_id(); ! if (id.length() == 0) ! { ! // Default service identification string ! char stringbuf[1024]; ! sprintf(stringbuf, "%s %s", uinfo.sysname, uinfo.release); ! id = std::string(stringbuf); ! } ! ! packet[ptr++] = id.length(); ! strcpy((char *)packet+ptr, id.c_str()); ! ptr += id.length(); ! ! // Make sure the service table knows about all our services ! unsigned char dummy_macaddr[6]; ! memset(dummy_macaddr, 0, sizeof(dummy_macaddr)); ! if (!do_shutdown) ! LATServices::Instance()->add_service(std::string((char*)get_local_node()), ! name, ! id, real_rating, 0, dummy_macaddr); ! } ! ! // Not sure what node service classes are ! // probably somthing to do with port services and stuff. ! packet[ptr++] = 0x01; // Node service classes length ! packet[ptr++] = 0x01; // Node service classes ! packet[ptr++] = 0x00; ! packet[ptr++] = 0x00; ! ! unsigned char addr[6]; ! /* This is the LAT multicast address */ ! addr[0] = 0x09; ! addr[1] = 0x00; ! addr[2] = 0x2b; ! addr[3] = 0x00; ! addr[4] = 0x00; ! addr[5] = 0x0f; ! for (int i=0; i<num_interfaces;i++) ! { ! if (iface->send_packet(interface_num[i], addr, packet, ptr) < 0) { ! debuglog(("sending service announcement, send error: %d\n", errno)); ! interface_error(interface_num[i], errno); } else ! interface_errs[interface_num[i]] = 0; // Clear errors ! } /* Send it every minute */ signal(SIGALRM, &alarm_signal); --- 204,335 ---- char *myname; ! // Only send it if we have some services ! if (servicelist.size()) { ! LAT_ServiceAnnounce *announce = (LAT_ServiceAnnounce *)packet; ! ptr = sizeof(LAT_ServiceAnnounce); ! announce->cmd = LAT_CCMD_SERVICE; ! announce->circuit_timer = circuit_timer; ! announce->hiver = LAT_VERSION; ! announce->lover = LAT_VERSION; ! announce->latver = LAT_VERSION; ! announce->latver_eco = LAT_VERSION_ECO; ! announce->incarnation = --multicast_incarnation; ! announce->flags = 0x1f; ! announce->mtu = dn_htons(1500); ! announce->multicast_timer = multicast_timer; ! if (do_shutdown) { ! announce->node_status = 3; // Not accepting connections } else { ! announce->node_status = 2; // Accepting connections ! } ! // Send group codes ! if (groups_set) { ! announce->group_length = 32; ! memcpy(&packet[ptr], groups, 32); ! ptr += 32; ! announce->flags |= 1; } else ! { ! announce->group_length = 1; ! packet[ptr++] = 01; ! } ! ! /* Get host info */ ! uname(&uinfo); ! ! // Node name ! myname = (char*)get_local_node(); ! packet[ptr++] = strlen(myname); ! strcpy((char*)packet+ptr, myname); ! ptr += strlen(myname); ! ! // Greeting ! packet[ptr++] = strlen((char*)greeting); ! strcpy((char*)packet+ptr, (char*)greeting); ! ptr += strlen((char*)greeting); ! ! // Number of services ! packet[ptr++] = servicelist.size(); ! std::list<serviceinfo>::iterator i(servicelist.begin()); ! for (; i != servicelist.end(); i++) ! { ! // Service rating ! unsigned char real_rating; ! if (i->get_static()) ! { ! real_rating = i->get_rating(); ! } ! else ! { ! /* Calculate dynamic rating */ ! real_rating = (unsigned char)(i->get_rating() / (get_loadavg()+1.0)); ! debuglog(("Dynamic service rating is %d\n", real_rating)); ! } ! packet[ptr++] = real_rating; ! ! // Service name ! const std::string name = i->get_name(); ! packet[ptr++] = name.length(); ! strcpy((char *)packet+ptr, i->get_name().c_str()); ! ptr += name.length(); ! ! // Service Identification ! std::string id = i->get_id(); ! if (id.length() == 0) ! { ! // Default service identification string ! char stringbuf[1024]; ! sprintf(stringbuf, "%s %s", uinfo.sysname, uinfo.release); ! id = std::string(stringbuf); ! } ! ! packet[ptr++] = id.length(); ! strcpy((char *)packet+ptr, id.c_str()); ! ptr += id.length(); ! ! // Make sure the service table knows about all our services ! unsigned char dummy_macaddr[6]; ! memset(dummy_macaddr, 0, sizeof(dummy_macaddr)); ! if (!do_shutdown) ! LATServices::Instance()->add_service(std::string((char*)get_local_node()), ! name, ! id, real_rating, 0, dummy_macaddr); ! } ! ! // Not sure what node service classes are ! // probably somthing to do with port services and stuff. ! packet[ptr++] = 0x01; // Node service classes length ! packet[ptr++] = 0x01; // Node service classes ! packet[ptr++] = 0x00; ! packet[ptr++] = 0x00; ! ! unsigned char addr[6]; ! /* This is the LAT multicast address */ ! addr[0] = 0x09; ! addr[1] = 0x00; ! addr[2] = 0x2b; ! addr[3] = 0x00; ! addr[4] = 0x00; ! addr[5] = 0x0f; + for (int i=0; i<num_interfaces;i++) + { + if (iface->send_packet(interface_num[i], addr, packet, ptr) < 0) + { + debuglog(("sending service announcement, send error: %d\n", errno)); + interface_error(interface_num[i], errno); + } + else + interface_errs[interface_num[i]] = 0; // Clear errors + } + } /* Send it every minute */ signal(SIGALRM, &alarm_signal); *************** *** 1037,1044 **** --- 1040,1049 ---- } + #ifdef ENABLE_DEFAULT_SERVICE // Add the default session servicelist.push_back(serviceinfo(_service, _rating, _static_rating)); + #endif strcpy((char *)greeting, _greeting); |
From: Patrick C. <pa...@us...> - 2004-01-05 16:20:03
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv16804 Added Files: latd.conf.sample Log Message: Show how to disable the default login service --- NEW FILE: latd.conf.sample --- # /etc/latd.conf # This is a sample configuration file for latd # it is run as s shell script from latcp -s with a minimal # environment and PATH. latcp should be called using the environment # variable $LATCP to make sure you get the right one. # # You can fiddle with all the latd parameters you like in here, the first # service announcement will not be made until this script completes. # # Here are some (I hope) useful exampes: # # Set the multicast timeout to 30 seconds # $LATCP -m 30 # Add another login service # $LATCP -A -a LINUX -r 100 # Add a reverse LAT service to a printer on a DECserver # $LATCP -A -p /dev/lat/printer -Vdecserver # Disable the default login service # $LATCP -D -a `uname -n` exit |
From: Patrick C. <pa...@us...> - 2004-01-05 15:22:07
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv6020 Modified Files: interfaces-bpf.cc Log Message: Add <assert.h>, as recommended by BSD ports committer Index: interfaces-bpf.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-bpf.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** interfaces-bpf.cc 19 May 2003 13:16:01 -0000 1.9 --- interfaces-bpf.cc 5 Jan 2004 15:22:04 -0000 1.10 *************** *** 3,7 **** Some modifications: ! (c) 2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 3,7 ---- Some modifications: ! (c) 2003-2004 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify *************** *** 26,29 **** --- 26,30 ---- #include <sys/socket.h> #include <sys/uio.h> + #include <assert.h> #include <net/if.h> |
From: Patrick C. <pa...@us...> - 2004-01-05 13:13:50
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv14989 Modified Files: Makefile.am configure.in mkrpm.sh rpm.spec server.cc Log Message: Don't clobber /etc/latd.conf on "make install" Index: Makefile.am =================================================================== RCS file: /cvsroot/linux-decnet/latd/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** Makefile.am 5 Apr 2003 10:01:23 -0000 1.8 --- Makefile.am 5 Jan 2004 13:13:47 -0000 1.9 *************** *** 9,13 **** sbin_PROGRAMS = latd latcp moprc bin_PROGRAMS = llogin ! sysconf_DATA = latd.conf man_MANS = latd.8 latcp.8 llogin.1 moprc.8 latd.conf.5 latd_SOURCES = main.cc \ --- 9,13 ---- sbin_PROGRAMS = latd latcp moprc bin_PROGRAMS = llogin ! sysconf_DATA = latd.conf.sample man_MANS = latd.8 latcp.8 llogin.1 moprc.8 latd.conf.5 latd_SOURCES = main.cc \ Index: configure.in =================================================================== RCS file: /cvsroot/linux-decnet/latd/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** configure.in 20 Dec 2003 16:36:31 -0000 1.8 --- configure.in 5 Jan 2004 13:13:47 -0000 1.9 *************** *** 3,7 **** dnl Checks that we are given a good source directory. AC_INIT(latcp.cc) ! AM_INIT_AUTOMAKE(latd, 1.50) dnl Checks for programs. --- 3,7 ---- dnl Checks that we are given a good source directory. AC_INIT(latcp.cc) ! AM_INIT_AUTOMAKE(latd, 1.20) dnl Checks for programs. Index: mkrpm.sh =================================================================== RCS file: /cvsroot/linux-decnet/latd/mkrpm.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** mkrpm.sh 22 Apr 2003 18:34:36 -0000 1.3 --- mkrpm.sh 5 Jan 2004 13:13:47 -0000 1.4 *************** *** 24,28 **** install -d rpmbuild/etc install -d rpmbuild/usr/doc/${PACKAGE}-${VERSION} ! install latd.conf rpmbuild/etc/latd.conf install -Dm 0700 startlat.sh rpmbuild/etc/rc.d/init.d/lat install -d rpmbuild/etc/rc.d/rc3.d --- 24,28 ---- install -d rpmbuild/etc install -d rpmbuild/usr/doc/${PACKAGE}-${VERSION} ! install latd.conf.sample rpmbuild/etc/latd.conf.sample install -Dm 0700 startlat.sh rpmbuild/etc/rc.d/init.d/lat install -d rpmbuild/etc/rc.d/rc3.d Index: rpm.spec =================================================================== RCS file: /cvsroot/linux-decnet/latd/rpm.spec,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** rpm.spec 15 Mar 2003 16:36:21 -0000 1.5 --- rpm.spec 5 Jan 2004 13:13:47 -0000 1.6 *************** *** 21,25 **** %%PREFIX%%/man/man8/moprc.8 %%PREFIX%%/man/man8/latd.8 ! /etc/latd.conf /etc/rc.d/init.d/lat /etc/rc.d/rc3.d/S79lat --- 21,25 ---- %%PREFIX%%/man/man8/moprc.8 %%PREFIX%%/man/man8/latd.8 ! /etc/latd.conf.sample /etc/rc.d/init.d/lat /etc/rc.d/rc3.d/S79lat Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -r1.75 -r1.76 *** server.cc 4 Jan 2004 15:49:04 -0000 1.75 --- server.cc 5 Jan 2004 13:13:47 -0000 1.76 *************** *** 1439,1443 **** default: ! debuglog(("Unknown LAT message: %d, 0x%X\n", header->cmd, header->cmd)); break; } --- 1439,1443 ---- default: ! debuglog(("Unknown socket type: %d\n", dsl.get_type())); break; } |
From: Patrick C. <pa...@us...> - 2004-01-05 13:13:50
|
Update of /cvsroot/linux-decnet/latd/debian In directory sc8-pr-cvs1:/tmp/cvs-serv14989/debian Modified Files: rules Log Message: Don't clobber /etc/latd.conf on "make install" Index: rules =================================================================== RCS file: /cvsroot/linux-decnet/latd/debian/rules,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** rules 20 Apr 2003 10:06:19 -0000 1.8 --- rules 5 Jan 2004 13:13:47 -0000 1.9 *************** *** 33,36 **** --- 33,37 ---- install -d debian/tmp/usr/share make install DESTDIR=`pwd`/debian/tmp + mv debian/tmp/etc/latd.conf.sample debian/tmp/etc/latd.conf mv debian/tmp/usr/man debian/tmp/usr/share dh_installdirs |
From: Patrick C. <pa...@us...> - 2004-01-05 13:09:04
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv14079 Modified Files: latcpcircuit.cc Log Message: Add missing SHOWNODES command Index: latcpcircuit.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcpcircuit.cc,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** latcpcircuit.cc 24 May 2003 13:26:11 -0000 1.22 --- latcpcircuit.cc 5 Jan 2004 13:08:59 -0000 1.23 *************** *** 121,124 **** --- 121,137 ---- break; + case LATCP_SHOWNODES: + { + int verbose = cmdbuf[0]; + std::ostrstream st; + + debuglog(("latcp: shownodes\n")); + + LATServer::Instance()->show_nodes(verbose?true:false, st); + send_reply(LATCP_SHOWNODES, st.str(), st.pcount()); + st.freeze(false); + } + break; + case LATCP_SETRESPONDER: |
From: Patrick C. <pa...@us...> - 2004-01-04 15:49:14
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv24550 Modified Files: latcp.cc latcp.h localport.cc server.cc server.h services.cc services.h utils.h Log Message: (finally) add Dmitri Popov's code to better cope with servers that do not send service broadcasts. Index: latcp.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcp.cc,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -r1.40 -r1.41 *** latcp.cc 26 May 2003 11:19:57 -0000 1.40 --- latcp.cc 4 Jan 2004 15:49:04 -0000 1.41 *************** *** 1,4 **** /****************************************************************************** ! (c) 2000-2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,5 ---- /****************************************************************************** ! (c) 2000-2004 Patrick Caulfield pa...@de... ! (c) 2003 Dmitri Popov This program is free software; you can redistribute it and/or modify *************** *** 212,219 **** signed char opt; bool show_services = false; if (!open_socket(false)) return; ! while ((opt=getopt(argc,argv,"lv")) != EOF) { switch(opt) --- 213,221 ---- signed char opt; bool show_services = false; + bool show_nodes = false; if (!open_socket(false)) return; ! while ((opt=getopt(argc,argv,"lvd")) != EOF) { switch(opt) *************** *** 227,230 **** --- 229,236 ---- break; + case 'd': + show_nodes = true; + break; + default: fprintf(stderr, "only -v or -l valid with -d flag\n"); *************** *** 233,236 **** --- 239,256 ---- } + if (show_nodes) + { + send_msg(latcp_socket, LATCP_SHOWNODES, verboseflag, 1); + unsigned char *result; + int len; + int cmd; + if (!read_reply(latcp_socket, cmd, result, len)) + { + cout << result; + + delete[] result; + } + return; + } if (show_services) *************** *** 246,254 **** int len; int cmd; - read_reply(latcp_socket, cmd, result, len); ! cout << result; ! delete[] result; } --- 266,276 ---- int len; int cmd; ! if (!read_reply(latcp_socket, cmd, result, len)) ! { ! cout << result; ! delete[] result; ! } } *************** *** 951,956 **** // Send our version send_msg(latcp_socket, LATCP_VERSION, VERSION, strlen(VERSION)+1); ! read_reply(latcp_socket, cmd, result, len); // Read version number back ! delete[] result; return true; --- 973,979 ---- // Send our version send_msg(latcp_socket, LATCP_VERSION, VERSION, strlen(VERSION)+1); ! ! if (!read_reply(latcp_socket, cmd, result, len)) // Read version number back ! delete[] result; return true; Index: latcp.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcp.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** latcp.h 10 Feb 2001 12:22:49 -0000 1.7 --- latcp.h 4 Jan 2004 15:49:04 -0000 1.8 *************** *** 1,4 **** /****************************************************************************** ! (c) 2000 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,4 ---- /****************************************************************************** ! (c) 2000-2004 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify *************** *** 40,43 **** --- 40,44 ---- const int LATCP_UNSETUSERGROUPS = 25; const int LATCP_TERMINALSESSION = 26; + const int LATCP_SHOWNODES = 27; const int LATCP_ERRORMSG = 99; // Fatal Index: localport.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/localport.cc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** localport.cc 28 May 2003 15:56:08 -0000 1.11 --- localport.cc 4 Jan 2004 15:49:04 -0000 1.12 *************** *** 1,4 **** /****************************************************************************** ! (c) 2001 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,4 ---- /****************************************************************************** ! (c) 2001-2004 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify *************** *** 84,89 **** // send a request for the service if we are queued so that // by the time the user comes to use this port, we know about it. if (service == "") ! LATServer::Instance()->send_enq((unsigned char *)remnode.c_str()); // Set terminal characteristics --- 84,96 ---- // send a request for the service if we are queued so that // by the time the user comes to use this port, we know about it. + if (service == "") + { + debuglog(("Dummy service NODE: %s\n", remnode.c_str())); + LATServer::Instance()->add_slave_node(remnode.c_str()); + // PJC ??? wot's this ?? LATServer::Instance()->send_enq(remnode.c_str()); + } + if (service == "") ! LATServer::Instance()->send_enq(remnode.c_str()); // Set terminal characteristics Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -r1.74 -r1.75 *** server.cc 28 May 2003 15:56:08 -0000 1.74 --- server.cc 4 Jan 2004 15:49:04 -0000 1.75 *************** *** 1,4 **** /****************************************************************************** ! (c) 2001-2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,5 ---- /****************************************************************************** ! (c) 2001-2004 Patrick Caulfield pa...@de... ! (c) 2003 Dmitri Popov This program is free software; you can redistribute it and/or modify *************** *** 118,124 **** return local_name; } void LATServer::alarm_signal(int sig) { ! Instance()->send_service_announcement(sig); } --- 119,130 ---- return local_name; } + void LATServer::alarm_signal(int sig) { ! if (Instance()->alarm_mode == 0) ! { ! Instance()->send_service_announcement(sig); ! } ! Instance()->send_solicit_messages(sig); } *************** *** 127,131 **** // Send ENQUIRY for a node - mainly needed for DS90L servers that // don't advertise. ! void LATServer::send_enq(unsigned char *node) { unsigned char packet[1600]; --- 133,137 ---- // Send ENQUIRY for a node - mainly needed for DS90L servers that // don't advertise. ! void LATServer::send_enq(const char *node) { unsigned char packet[1600]; *************** *** 144,148 **** enqmsg->retrans_timer = 75; // * 10ms - give it more time to respond ! add_string(packet, &ptr, node); packet[ptr++] = 1; /* Length of group data */ packet[ptr++] = 1; /* Group mask */ --- 150,154 ---- enqmsg->retrans_timer = 75; // * 10ms - give it more time to respond ! add_string(packet, &ptr, (const unsigned char *)node); packet[ptr++] = 1; /* Length of group data */ packet[ptr++] = 1; /* Group mask */ *************** *** 157,164 **** --- 163,173 ---- static unsigned char addr[6] = { 0x09, 0x00, 0x2b, 0x00, 0x00, 0x0f }; + debuglog(("send_enq : node: %s, local_name: %s\n", node, local_name)); + for (int i=0; i<num_interfaces;i++) { if (iface->send_packet(interface_num[i], addr, packet, ptr) < 0) { + debuglog(("Error send packet\n")); interface_error(interface_num[i], errno); } *************** *** 168,171 **** --- 177,197 ---- } } + + LATServices::Instance()->touch_dummy_node_respond_counter(node); + } + + void LATServer::add_slave_node(const char *node_name) + { + sig_blk_t _block(SIGALRM); + for (std::list<std::string>::iterator iter = slave_nodes.begin(); + iter != slave_nodes.end(); + iter++) + { + if (*iter == node_name) { + // do not duplicate nodes + return; + } + } + slave_nodes.push_front(node_name); } *************** *** 308,311 **** --- 334,395 ---- } + // Send solicit messages to slave nodes + void LATServer::send_solicit_messages(int sig) + { + static int counter = 0; + static int last_list_size = 0; + if (alarm_mode == 0) + { + counter = 0; + alarm_mode = 1; + debuglog(("set alarm_mode to 1\n")); + + if (!known_slave_nodes.empty()) + { + std::string known_node = known_slave_nodes.front(); + known_slave_nodes.pop_front(); + slave_nodes.push_back(known_node); + debuglog(("known(%d) => slave(%d) : %s\n", known_slave_nodes.size(), + slave_nodes.size(), known_node.c_str())); + if (slave_nodes.size() == 1) + { + alarm_mode = 0; + debuglog(("set alarm_mode to 0 - one slave\n")); + send_enq(slave_nodes.front().c_str()); + // alarm() is already charged by send_service_announcement() + return; + } + } + } + else + { + if (slave_nodes.size() < last_list_size) + { + counter -= last_list_size - slave_nodes.size(); + } + } + + if (slave_nodes.size() > counter && !slave_nodes.empty()) + { + std::string node_name = slave_nodes.front(); + slave_nodes.pop_front(); + slave_nodes.push_back(node_name); + + send_enq(node_name.c_str()); + + alarm(1); + counter++; + last_list_size = slave_nodes.size(); + } + else + { + alarm_mode = 0; + + //well, it's not quite correct, I know... + alarm(counter >= multicast_timer ? 1 : multicast_timer - counter); + debuglog(("set alarm_mode to 0, timer %d\n", counter >= multicast_timer ? 1 : multicast_timer - counter)); + } + } + // Log an error against an interface. If we get three of these // then we remove it. *************** *** 1061,1079 **** void LATServer::got_enqreply(unsigned char *buf, int len, int interface, unsigned char *macaddr) { ! int ptr = 23; ! // Don't know the format of this packet before this... ! ptr += buf[ptr++]; /* Skip group codes; */ ! unsigned char nodename[32]; ! get_string(buf, &ptr, nodename); // Add it to the dummy service. ! LATServices::Instance()->add_service(std::string((char*)nodename), ! std::string((char*)""), // Dummy service name ! std::string((char*)"Dummy Service for DS90L servers"), 0, ! interface, macaddr); } --- 1145,1213 ---- void LATServer::got_enqreply(unsigned char *buf, int len, int interface, unsigned char *macaddr) { ! int off = 14; ! unsigned char node_addr[6]; ! char node_description[256]; ! char node_name[256]; ! memset(node_addr, 0x00, sizeof(node_addr)); ! if (0 == memcmp(node_addr, buf + off, sizeof(node_addr))) ! { ! return; ! } ! ! memset(node_addr, 0xFF, sizeof(node_addr)); ! if (0 == memcmp(node_addr, buf + off, sizeof(node_addr))) ! { ! return; ! } ! // Node MAC address ! memcpy(node_addr, buf + off, sizeof(node_addr)); ! // Skip destination node name ! off = 22; ! off += buf[off] + 1; ! ! // Skip node groups ! off += buf[off] + 1; ! ! get_string(buf, &off, (unsigned char*)node_name); ! get_string(buf, &off, (unsigned char*)node_description); ! ! #if defined(debuglog) ! if (memcmp(node_addr, macaddr, sizeof(node_addr))) { ! debuglog(("got_enqreply : macaddr is different : %02hhX-%02hhX-%02hhX-%02hhX-%02hhX-%02hhX\n", ! macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5])); ! } ! #endif // Add it to the dummy service. ! debuglog(("got_enqreply : node: '%s' : %02hhX-%02hhX-%02hhX-%02hhX-%02hhX-%02hhX\n", ! node_name, ! node_addr[0], node_addr[1], node_addr[2], node_addr[3], node_addr[4], node_addr[5])); ! LATServices::Instance()->add_service(std::string(node_name), ! std::string(""), // Dummy service name ! std::string(node_description), 0, ! interface, node_addr); ! ! { ! sig_blk_t _block(SIGALRM); ! std::list<std::string>::iterator sl_iter; ! sl_iter = find(slave_nodes.begin(), slave_nodes.end(), node_name); ! if (sl_iter != slave_nodes.end()) { ! debuglog(("got_enqreply : to remove from slave(%d), node: '%s'\n", ! slave_nodes.size(), sl_iter->c_str())); ! slave_nodes.erase(sl_iter); ! } ! ! sl_iter = find(known_slave_nodes.begin(), known_slave_nodes.end(), node_name); ! if (sl_iter == known_slave_nodes.end()) { ! known_slave_nodes.push_back(node_name); ! debuglog(("got_enqreply : added to known(%d), node: '%s'\n", ! known_slave_nodes.size(), ! node_name)); ! } ! } } *************** *** 1142,1146 **** int ptr = sizeof(LAT_ServiceAnnounce); unsigned char service_groups[32]; ! unsigned char nodename[32]; unsigned char greeting[255]; unsigned char service[255]; --- 1276,1280 ---- int ptr = sizeof(LAT_ServiceAnnounce); unsigned char service_groups[32]; ! unsigned char nodename[256]; unsigned char greeting[255]; unsigned char service[255]; *************** *** 1303,1306 **** --- 1437,1444 ---- connections[dsl.get_conn()]->remove_session(dsl.get_id()); break; + + default: + debuglog(("Unknown LAT message: %d, 0x%X\n", header->cmd, header->cmd)); + break; } } *************** *** 1536,1539 **** --- 1674,1678 ---- void LATServer::unlock() { + sig_blk_t _block(SIGALRM); locked = false; alarm_signal(SIGALRM); *************** *** 1555,1558 **** --- 1694,1698 ---- if (node[0] == '\0') { + debuglog(("make_connection : no node, use highest\n")); if (!LATServices::Instance()->get_highest(std::string((char*)service), servicenode, macaddr, *************** *** 1566,1569 **** --- 1706,1710 ---- else { + debuglog(("make_connection : node : %s\n", node)); // Try to find the node if (!LATServices::Instance()->get_node(std::string((char*)service), *************** *** 1633,1636 **** --- 1774,1779 ---- int ret; int connid; + debuglog(("LATServer::make_port_connection : fd %d, lport '0x%X', service '%s', rnode '%s', port '%s', localport '%s', pwd '%s'\n", + fd, lport, service, rnode, port, localport, password)); connid = make_connection(fd, service, rnode, port, localport, password, queued); *************** *** 1748,1751 **** --- 1891,1899 ---- return true; + } + + bool LATServer::show_nodes(bool verbose, std::ostrstream &output) + { + return LATServices::Instance()->list_dummy_nodes(verbose, output); } Index: server.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** server.h 27 May 2003 15:48:15 -0000 1.43 --- server.h 4 Jan 2004 15:49:04 -0000 1.44 *************** *** 54,58 **** const unsigned char *get_user_groups() { return user_groups; } int find_connection_by_node(const char *node); ! void send_enq(unsigned char *); static unsigned char greeting[255]; --- 54,59 ---- const unsigned char *get_user_groups() { return user_groups; } int find_connection_by_node(const char *node); ! void send_enq(const char *); ! void add_slave_node(const char *); static unsigned char greeting[255]; *************** *** 67,70 **** --- 68,72 ---- static_rating(false), rating(12), + alarm_mode(0), num_interfaces(0), multicast_incarnation(0), *************** *** 85,88 **** --- 87,92 ---- int rating; + int alarm_mode; // For slave solicit .. PJC investigate + unsigned char local_name[256]; // Node name int interface_num[MAX_INTERFACES]; *************** *** 106,109 **** --- 110,114 ---- void forward_status_messages(unsigned char *inbuf, int len); void send_service_announcement(int sig); + void send_solicit_messages(int sig); int make_new_connection(unsigned char *buf, int len, int interface, LAT_Header *header, unsigned char *macaddr); *************** *** 261,264 **** --- 266,273 ---- std::list<LocalPort> portlist; + // Slave Nodes or Dummy Nodes. Well, no-self-advertised nodes + std::list<std::string> slave_nodes; + std::list<std::string> known_slave_nodes; + // Connections indexed by ID LATConnection *connections[MAX_CONNECTIONS]; *************** *** 292,295 **** --- 301,305 ---- void unlock(); bool show_characteristics(bool verbose, std::ostrstream &output); + bool show_nodes(bool verbose, std::ostrstream &output); int create_local_port(unsigned char *, unsigned char *, unsigned char *, unsigned char *, bool, bool, Index: services.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/services.cc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** services.cc 19 Dec 2003 20:23:09 -0000 1.15 --- services.cc 4 Jan 2004 15:49:04 -0000 1.16 *************** *** 1,4 **** /****************************************************************************** ! (c) 2000-2003 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,5 ---- /****************************************************************************** ! (c) 2000-2004 Patrick Caulfield pa...@de... ! (c) 2003 Dmitri Popov This program is free software; you can redistribute it and/or modify *************** *** 99,106 **** --- 100,122 ---- { std::map<std::string, serviceinfo, std::less<std::string> >::iterator test = servicelist.find(service); + std::map<std::string, serviceinfo, std::less<std::string> >::iterator c = + servicelist.begin(); + int i =0; + for(;c != servicelist.end();c++) { + i++; + debuglog(("LATServices::get_node : service %2d '%s' \n", + i, c->first.c_str())); + } + if (test != servicelist.end()) { + // std::map<std::string, serviceinfo, std::less<std::string> >::iterator c = test; + // int i =0; + // for(;c != servicelist.end();c++) { i++; }; + debuglog(("LATServices::get_node : service found '%s', number: %d \n", service.c_str(), i)); return servicelist[test->first].get_node(node, macaddr, interface); } + debuglog(("LATServices::get_node : no service '%s' \n", service.c_str())); + return false; // Not found } *************** *** 111,114 **** --- 127,144 ---- { std::map<std::string, nodeinfo, std::less<std::string> >::iterator test = nodes.find(node); + + std::map<std::string, nodeinfo, std::less<std::string> >::iterator c = + nodes.begin(); + int i =0; + for(;c != nodes.end();c++) { + i++; + debuglog(("LATServices::serinfo::get_node :node %2d '%s' \n", + i, c->first.c_str())); + } + + debuglog(("LATServices::serinfo::get_node looking for '%s' \n", + node.c_str())); + + if (test != nodes.end()) { *************** *** 119,122 **** --- 149,153 ---- else { + debuglog(("LATServices::serviceinfo::get_node : no node '%s' \n", node.c_str())); return false; } *************** *** 210,213 **** --- 241,321 ---- } } + + void LATServices::serviceinfo::list_nodes(std::ostrstream &output) + { + std::map<std::string, nodeinfo, std::less<std::string> >::iterator n(nodes.begin()); + const unsigned char *addr = NULL; + + output << "Node Name Status Address Identification" << std::endl; + for (; n != nodes.end(); n++) + { + addr = n->second.get_macaddr(); + output.width(17); + output.setf(std::ios::left, std::ios::adjustfield); + output << n->first.c_str() << + (n->second.check_respond_counter()?"Reachable ":"Unreachable") << " "; + + output.setf(std::ios::hex, std::ios::basefield); + + output << setiosflags(std::ios::right | std::ios::uppercase) << std::setfill('0') + << std::setw(2) << (int)addr[0] << '-' + << std::setw(2) << (int)addr[1] << '-' + << std::setw(2) << (int)addr[2] << '-' + << std::setw(2) << (int)addr[3] << '-' + << std::setw(2) << (int)addr[4] << '-' + << std::setw(2) << (int)addr[5] + << resetiosflags(std::ios::right | std::ios::uppercase) << std::setfill(' '); + + output.setf(std::ios::right, std::ios::adjustfield); + output << " " << n->second.get_ident() << std::endl; + } + } + + bool LATServices::list_dummy_nodes(bool verbose, std::ostrstream &output) + { + std::map<std::string, serviceinfo, std::less<std::string> >::iterator dummies = + servicelist.find(""); + + if ( dummies == servicelist.end()) { + output << "No dummy nodes available." << std::endl; + return true; + } + + output << std::endl; + output << "Service Name: " << "Slave nodes" << std::endl; + output << "Service Status: " << (servicelist[dummies->first].is_available()?"Available ":"Unavailable") << " " << std::endl; + output << "Service Ident: " << servicelist[dummies->first].get_ident() << std::endl << std::endl; + dummies->second.list_nodes(output); + output << "--------------------------------------------------------------------------------" << std::endl; + + + return true; + } + + bool LATServices::touch_dummy_node_respond_counter(const std::string &str_name) + { + std::map<std::string, serviceinfo, std::less<std::string> >::iterator dummies = + servicelist.find(""); + + if ( dummies == servicelist.end()) { + return false; // no node + } + + return dummies->second.touch_dummy_node_respond_counter(str_name); + } + + bool LATServices::serviceinfo::touch_dummy_node_respond_counter(const std::string &str_name) + { + std::map<std::string, nodeinfo, std::less<std::string> >::iterator n = nodes.find(str_name); + + if (n == nodes.end()) { + return false; // no node + } + + debuglog(("touch_respond() : node: %s ", n->first.c_str())); + n->second.touch_respond_counter(); + return true; + } + // List all known services Index: services.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/services.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** services.h 14 Oct 2002 14:45:15 -0000 1.9 --- services.h 4 Jan 2004 15:49:04 -0000 1.10 *************** *** 1,4 **** /****************************************************************************** ! (c) 2000 Patrick Caulfield pa...@de... This program is free software; you can redistribute it and/or modify --- 1,5 ---- /****************************************************************************** ! (c) 2000-2004 Patrick Caulfield pa...@de... ! (c) 2003 Dmitri Popov This program is free software; you can redistribute it and/or modify *************** *** 42,45 **** --- 43,49 ---- void purge() {servicelist.clear(); } void expire_nodes(); + bool list_dummy_nodes(bool verbose, std::ostrstream &output); + bool touch_dummy_node_respond_counter(const std::string &str_name); + private: *************** *** 67,77 **** nodes[node] = nodeinfo(macaddr, rating, ident, interface); } ! bool get_highest(std::string &node, unsigned char *macaddr, int *interface); ! bool get_node(const std::string &node, unsigned char *macaddr, int *interface); const std::string get_ident() { return ident; } ! bool is_available(); ! bool remove_node(const std::string &node); ! void serviceinfo::list_service(std::ostrstream &output); ! void expire_nodes(time_t); private: --- 71,83 ---- nodes[node] = nodeinfo(macaddr, rating, ident, interface); } ! bool get_highest(std::string &node, unsigned char *macaddr, int *interface); ! bool get_node(const std::string &node, unsigned char *macaddr, int *interface); const std::string get_ident() { return ident; } ! bool is_available(); ! bool remove_node(const std::string &node); ! void serviceinfo::list_service(std::ostrstream &output); ! void expire_nodes(time_t); ! void list_nodes(std::ostrstream &output); ! bool touch_dummy_node_respond_counter(const std::string &str_name); private: *************** *** 83,87 **** rating(_rating), interface(_interface), ! available(true) { memcpy(macaddr, _macaddr, 6); --- 89,94 ---- rating(_rating), interface(_interface), ! available(true), ! slave_reachable(5) // if it doesn't respond five times... { memcpy(macaddr, _macaddr, 6); *************** *** 101,104 **** --- 108,123 ---- std::string get_ident() { return ident; } + int touch_respond_counter() + { + if (slave_reachable > 0) + { + slave_reachable--; + } + debuglog(("touch_respond_counter() %d\n", slave_reachable)); + return slave_reachable; + } + + bool check_respond_counter() { return slave_reachable > 0; } + private: unsigned char macaddr[6]; *************** *** 108,111 **** --- 127,133 ---- std::string ident; time_t updated; + + // for slave nodes + int slave_reachable; };// class LATServices::service::nodeinfo Index: utils.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/utils.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** utils.h 21 Feb 2003 15:18:54 -0000 1.7 --- utils.h 4 Jan 2004 15:49:04 -0000 1.8 *************** *** 48,57 **** #endif #ifdef VERBOSE_DEBUG #define debuglog(x) pjc_debuglog x ! #include <stdarg.h> ! extern void pjc_debuglog(char *,...); #else #define debuglog(x) #endif --- 48,83 ---- #endif + #if defined(VERBOSE_DEBUG) + #include <stdarg.h> + extern void pjc_debuglog(char *,...); + #endif + #ifdef VERBOSE_DEBUG #define debuglog(x) pjc_debuglog x ! //#include <stdarg.h> ! //extern void pjc_debuglog(char *,...); #else #define debuglog(x) #endif + + #include <signal.h> + + class sig_blk_t { + public: + sig_blk_t(int sig_num) + { + sigset_t new_set; + + sigemptyset(&new_set); + sigaddset(&new_set, sig_num); + sigprocmask(SIG_BLOCK, &new_set, &saved_set); + } + virtual ~sig_blk_t() + { + sigprocmask(SIG_SETMASK, &saved_set, NULL); + } + + private: + sigset_t saved_set; + }; |
From: Patrick C. <pa...@us...> - 2004-01-04 14:40:41
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv9284 Modified Files: moprc.cc Log Message: Add -b switch to make ^H send DEL (useful on *BSDs) Index: moprc.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/moprc.cc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** moprc.cc 19 May 2003 13:16:01 -0000 1.7 --- moprc.cc 4 Jan 2004 14:40:30 -0000 1.8 *************** *** 60,64 **** static int last_message_len; static int show_info = 0; ! static int do_moprc(u_int8_t *, int); static int send_boot(u_int8_t *macaddr, int interface); static LATinterfaces *iface; --- 60,64 ---- static int last_message_len; static int show_info = 0; ! static int do_moprc(u_int8_t *, int, int); static int send_boot(u_int8_t *macaddr, int interface); static LATinterfaces *iface; *************** *** 73,76 **** --- 73,77 ---- fprintf(f, " -i Ethernet interface to use (default to first found)\n"); fprintf(f, " -t Trigger (reboot) the server\n"); + fprintf(f, " -b Make ^H send DEL\n"); fprintf(f, " -v Show target information\n"); fprintf(f, "\n"); *************** *** 110,113 **** --- 111,115 ---- int interface = -1; int trigger=0; + int convert_bs = 0; char ifname_buf[255]; char *ifname; *************** *** 124,128 **** /* Get command-line options */ opterr = 0; ! while ((opt=getopt(argc,argv,"?hVvti:")) != EOF) { switch(opt) --- 126,130 ---- /* Get command-line options */ opterr = 0; ! while ((opt=getopt(argc,argv,"?hVvtbi:")) != EOF) { switch(opt) *************** *** 142,145 **** --- 144,151 ---- break; + case 'b': + convert_bs++; + break; + case 'i': strcpy(ifname_buf, optarg); *************** *** 207,211 **** } ! return do_moprc(addr.ether_addr_octet, interface); } --- 213,217 ---- } ! return do_moprc(addr.ether_addr_octet, interface, convert_bs); } *************** *** 364,368 **** } ! static int do_moprc(u_int8_t *macaddr, int interface) { enum {STARTING, CONNECTED} state=STARTING; --- 370,374 ---- } ! static int do_moprc(u_int8_t *macaddr, int interface, int convert_bs) { enum {STARTING, CONNECTED} state=STARTING; *************** *** 512,515 **** --- 518,522 ---- if (buf[i] == 4) goto finished; if (buf[i] == '\n') buf[i] = '\r'; + if (convert_bs && buf[i] == '\b') buf[i] = 127; } waiting_ack = 1; |
From: Patrick C. <pa...@us...> - 2004-01-02 14:28:45
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv13518 Modified Files: connection.cc Log Message: Fix error in debuglog Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** connection.cc 31 Dec 2003 13:11:46 -0000 1.62 --- connection.cc 2 Jan 2004 14:28:37 -0000 1.63 *************** *** 921,925 **** LAT_Header msg; ! debuglog("Deleting pending connection\n"); msg.local_connid = remote_connid; msg.remote_connid = num; --- 921,925 ---- LAT_Header msg; ! debuglog(("Deleting pending connection\n")); msg.local_connid = remote_connid; msg.remote_connid = num; |
From: Patrick C. <pa...@us...> - 2003-12-31 13:11:58
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv15489 Modified Files: connection.cc session.cc connection.h Log Message: If we get EOF on a PTY, queue the disconnect so we don't loose data that is waiting to be sent. Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** connection.cc 28 May 2003 15:56:08 -0000 1.61 --- connection.cc 31 Dec 2003 13:11:46 -0000 1.62 *************** *** 61,64 **** --- 61,65 ---- eightbitclean(false), connected(false), + delete_pending(false), request_id(0), last_msg_type(0), *************** *** 107,110 **** --- 108,112 ---- connected(false), connecting(false), + delete_pending(false), request_id(0), last_msg_type(0), *************** *** 339,342 **** --- 341,347 ---- sessions[newsessionnum] = newsession; newsession->set_master_conn(master_conn); + + // If we were pending a delete, we aren't now + delete_pending = false; } } *************** *** 396,399 **** --- 401,406 ---- { sessions[newsessionnum] = newsession; + // If we were pending a delete, we aren't now + delete_pending = false; } } *************** *** 908,911 **** --- 915,933 ---- } } + // Delete us if delete_pending is set and no more data to send + if (delete_pending && pending_data.empty() && + slots_pending.empty()) + { + LAT_Header msg; + + debuglog("Deleting pending connection\n"); + msg.local_connid = remote_connid; + msg.remote_connid = num; + msg.sequence_number = ++last_sent_seq; + msg.ack_number = last_recv_ack; + LATServer::Instance()->send_connect_error(3, &msg, interface, macaddr); + LATServer::Instance()->delete_connection(num); + } + } *************** *** 952,965 **** } ! // Disconnect & Remove connection if no sessions active... if (num_clients() == 0) { ! LAT_Header msg; ! msg.local_connid = remote_connid; ! msg.remote_connid = num; ! msg.sequence_number = ++last_sent_seq; ! msg.ack_number = last_recv_ack; ! LATServer::Instance()->send_connect_error(3, &msg, interface, macaddr); ! LATServer::Instance()->delete_connection(num); } } --- 974,998 ---- } ! // Disconnect & remove connection if no sessions active... ! // and no messages pending on circuit timer.... if (num_clients() == 0) { ! ! if (pending_data.empty() && slots_pending.empty()) ! { ! LAT_Header msg; ! ! msg.local_connid = remote_connid; ! msg.remote_connid = num; ! msg.sequence_number = ++last_sent_seq; ! msg.ack_number = last_recv_ack; ! LATServer::Instance()->send_connect_error(3, &msg, interface, macaddr); ! LATServer::Instance()->delete_connection(num); ! } ! else ! { ! // Otherwise just delete us when it's all calmed down. ! delete_pending = true; ! } } } Index: session.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/session.cc,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** session.cc 28 May 2003 15:56:08 -0000 1.39 --- session.cc 31 Dec 2003 13:11:52 -0000 1.40 *************** *** 171,177 **** local_session=s; // Restore it for our benefit. ! // Must send this now or the connection could get deleted ! // before the circuit timer goes off. ! parent.send_message(buf, ptr, LATConnection::DATA); disconnect_session(1); // User requested --- 171,175 ---- local_session=s; // Restore it for our benefit. ! parent.queue_message(buf, ptr); disconnect_session(1); // User requested Index: connection.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** connection.h 28 May 2003 15:56:08 -0000 1.28 --- connection.h 31 Dec 2003 13:11:54 -0000 1.29 *************** *** 82,85 **** --- 82,86 ---- bool connected; bool connecting; + bool delete_pending; unsigned short request_id; // For incoming reverse-LATs |
From: Patrick C. <pa...@us...> - 2003-12-20 16:36:38
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv13923 Modified Files: aclocal.m4 clientsession.cc configure.in Log Message: automake update Index: aclocal.m4 =================================================================== RCS file: /cvsroot/linux-decnet/latd/aclocal.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** aclocal.m4 17 Mar 2003 08:17:11 -0000 1.2 --- aclocal.m4 20 Dec 2003 16:36:31 -0000 1.3 *************** *** 1,3 **** ! # generated automatically by aclocal 1.7.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 --- 1,3 ---- ! # generated automatically by aclocal 1.7.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 *************** *** 4069,4073 **** # your package does certain things. But this isn't really a big deal. ! # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. --- 4069,4073 ---- # your package does certain things. But this isn't really a big deal. ! # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. *************** *** 4087,4098 **** # 02111-1307, USA. ! # serial 9 ! ! # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ! # written in clear, in which case automake, when reading aclocal.m4, ! # will think it sees a *use*, and therefore will trigger all it's ! # C support machinery. Also note that it means that autoscan, seeing ! # CC etc. in the Makefile, will ask for an AC_PROG_CC use... ! AC_PREREQ([2.54]) --- 4087,4091 ---- # 02111-1307, USA. ! # serial 10 AC_PREREQ([2.54]) *************** *** 4223,4227 **** # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ! [AM_AUTOMAKE_VERSION([1.7.3])]) # Helper functions for option handling. -*- Autoconf -*- --- 4216,4220 ---- # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ! [AM_AUTOMAKE_VERSION([1.7.9])]) # Helper functions for option handling. -*- Autoconf -*- *************** *** 4605,4608 **** --- 4598,4608 ---- cp "$am_depcomp" conftest.dir cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub am_cv_$1_dependencies_compiler_type=none *************** *** 4611,4620 **** fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. ! echo '#include "conftest.h"' > conftest.c ! echo 'int i;' > conftest.h ! echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in --- 4611,4627 ---- fi for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. ! : > sub/conftest.c ! for i in 1 2 3 4 5 6; do ! echo '#include "conftst'$i'.h"' >> sub/conftest.c ! : > sub/conftst$i.h ! done ! echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in *************** *** 4634,4642 **** # handle `-M -o', and we need to detect this. if depmode=$depmode \ ! source=conftest.c object=conftest.o \ ! depfile=conftest.Po tmpdepfile=conftest.TPo \ ! $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ >/dev/null 2>conftest.err && ! grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings --- 4641,4650 ---- # handle `-M -o', and we need to detect this. if depmode=$depmode \ ! source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ! depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ! $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && ! grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ! grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings *************** *** 4773,4777 **** # Check to see how 'make' treats includes. -*- Autoconf -*- ! # Copyright (C) 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 4781,4785 ---- # Check to see how 'make' treats includes. -*- Autoconf -*- ! # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 4798,4803 **** [am_make=${MAKE-make} cat > confinc << 'END' ! doit: @echo done END # If we don't find an include directive, just comment out the code. --- 4806,4812 ---- [am_make=${MAKE-make} cat > confinc << 'END' ! am__doit: @echo done + .PHONY: am__doit END # If we don't find an include directive, just comment out the code. *************** *** 4827,4833 **** fi fi ! AC_SUBST(am__include) ! AC_SUBST(am__quote) ! AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) --- 4836,4842 ---- fi fi ! AC_SUBST([am__include]) ! AC_SUBST([am__quote]) ! AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) Index: clientsession.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/clientsession.cc,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** clientsession.cc 5 Apr 2003 10:01:20 -0000 1.26 --- clientsession.cc 20 Dec 2003 16:36:31 -0000 1.27 *************** *** 20,23 **** --- 20,24 ---- #include <termios.h> #include <list> + #include <cassert> #include <queue> #include <string> Index: configure.in =================================================================== RCS file: /cvsroot/linux-decnet/latd/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** configure.in 28 May 2003 15:56:08 -0000 1.7 --- configure.in 20 Dec 2003 16:36:31 -0000 1.8 *************** *** 3,7 **** dnl Checks that we are given a good source directory. AC_INIT(latcp.cc) ! AM_INIT_AUTOMAKE(latd, 1.19) dnl Checks for programs. --- 3,7 ---- dnl Checks that we are given a good source directory. AC_INIT(latcp.cc) ! AM_INIT_AUTOMAKE(latd, 1.50) dnl Checks for programs. |