linux-decnet-commit Mailing List for DECnet for Linux (Page 30)
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...> - 2003-07-26 09:49:41
|
Update of /cvsroot/linux-decnet/dnprogs/dnroute In directory sc8-pr-cvs1:/tmp/cvs-serv32003 Modified Files: get_neigh.c Log Message: #include <sys/types.h> Index: get_neigh.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/get_neigh.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** get_neigh.c 5 May 2003 08:29:06 -0000 1.4 --- get_neigh.c 26 Jul 2003 09:45:43 -0000 1.5 *************** *** 12,15 **** --- 12,16 ---- */ + #include <sys/types.h> #include <stdio.h> #include <stdlib.h> |
From: Patrick C. <pa...@us...> - 2003-06-06 12:02:36
|
Update of /cvsroot/linux-decnet/dnprogs/debian In directory sc8-pr-cvs1:/tmp/cvs-serv13096/debian Modified Files: changelog Log Message: changelog for 2.24 Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/changelog,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** changelog 6 May 2003 09:57:56 -0000 1.25 --- changelog 6 Jun 2003 12:02:33 -0000 1.26 *************** *** 1,2 **** --- 1,8 ---- + dnprogs (2.24-1) unstable; urgency=low + + * support for large files. + + -- Patrick Caulfield <pa...@de...> Fri, 6 Jun 2003 12:03:39 +0100 + dnprogs (2.23.2-1) unstable; urgency=low |
From: Patrick C. <pa...@us...> - 2003-06-06 12:02:36
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv13096 Modified Files: Makefile Makefile.common Log Message: changelog for 2.24 Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** Makefile 5 May 2003 08:48:16 -0000 1.20 --- Makefile 6 Jun 2003 12:02:33 -0000 1.21 *************** *** 91,95 **** mkdir -p BUILD RPMS/$(ARCH) cp README NEWS Documentation/*.README BUILD ! rpmbuild -bb --target $(ARCH) --buildroot `pwd`/rpmbuild -v --rcfile .rpmrc $(PKGNAME).spec rm -f $(PKGNAME).spec .rpmrc .rpmmacros --- 91,95 ---- mkdir -p BUILD RPMS/$(ARCH) cp README NEWS Documentation/*.README BUILD ! fakeroot rpmbuild -bb --target $(ARCH) --buildroot `pwd`/rpmbuild -v --rcfile .rpmrc $(PKGNAME).spec rm -f $(PKGNAME).spec .rpmrc .rpmmacros Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** Makefile.common 5 Jun 2003 13:12:54 -0000 1.23 --- Makefile.common 6 Jun 2003 12:02:33 -0000 1.24 *************** *** 54,58 **** MAJOR_VERSION=2 ! MINOR_VERSION=23 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) --- 54,58 ---- MAJOR_VERSION=2 ! MINOR_VERSION=24 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) |
From: Patrick C. <pa...@us...> - 2003-06-05 13:12:58
|
Update of /cvsroot/linux-decnet/dnprogs/dncopy In directory sc8-pr-cvs1:/tmp/cvs-serv24323/dncopy Modified Files: dncopy.cc Log Message: Handle files >2gig Index: dncopy.cc =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dncopy/dncopy.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** dncopy.cc 10 Oct 2002 14:26:14 -0000 1.4 --- dncopy.cc 5 Jun 2003 13:12:54 -0000 1.5 *************** *** 61,65 **** char opt; struct timeval start_tv; ! unsigned long bytes_copied = 0; if (argc < 2) --- 61,65 ---- char opt; struct timeval start_tv; ! unsigned long long bytes_copied = 0; if (argc < 2) *************** *** 322,326 **** rate = (double)(bytes_copied/1024) / (double)centi_seconds * 100.0; ! printf("Sent %ld bytes in %1.2f seconds: %4.2fK/s\n", bytes_copied, show_secs, rate); } --- 322,326 ---- rate = (double)(bytes_copied/1024) / (double)centi_seconds * 100.0; ! printf("Sent %lld bytes in %1.2f seconds: %4.2fK/s\n", bytes_copied, show_secs, rate); } |
From: Patrick C. <pa...@us...> - 2003-06-05 13:12:58
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv24323 Modified Files: Makefile.common Log Message: Handle files >2gig Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** Makefile.common 5 May 2003 08:48:16 -0000 1.22 --- Makefile.common 5 Jun 2003 13:12:54 -0000 1.23 *************** *** 110,114 **** # CC=gcc ! CDEFS+=-D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -D_SVID_SOURCE INCLUDES=-I../libdap -I../include CXXFLAGS+=-pipe -fdollars-in-identifiers -fsigned-char -Wstrict-prototypes -Wall -Wno-unused -Wno-uninitialized $(INCLUDES) -DVERSION=\"$(VERSION)\" $(CDEFS) $(SHADOWDEFS) $(PTSDEFS) $(DFLAGS) --- 110,114 ---- # CC=gcc ! CDEFS+=-D_XOPEN_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 INCLUDES=-I../libdap -I../include CXXFLAGS+=-pipe -fdollars-in-identifiers -fsigned-char -Wstrict-prototypes -Wall -Wno-unused -Wno-uninitialized $(INCLUDES) -DVERSION=\"$(VERSION)\" $(CDEFS) $(SHADOWDEFS) $(PTSDEFS) $(DFLAGS) |
From: <Dir...@Vi...> - 2003-05-28 16:28:42
|
This is an automatic reply message from Dirk Gablenz. I will be on vacation until May, 30th. I'll check my email only from time to time. If you have urgent issues or questions contact Andreas Schneider (+49) 4821 17 4411. |
From: Patrick C. <pa...@us...> - 2003-05-28 15:56:13
|
Update of /cvsroot/linux-decnet/latd/debian In directory sc8-pr-cvs1:/tmp/cvs-serv16781/debian Modified Files: changelog control Log Message: Oh, lots of changes in an attempt to fix some of the worst protocol violations, not send too many packets and general not crash so much. The old stuff is on BRANCH_LATD_1_18 just in case this all ends up in a big heap. Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/latd/debian/changelog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** changelog 20 Apr 2003 10:07:05 -0000 1.14 --- changelog 28 May 2003 15:56:09 -0000 1.15 *************** *** 1,2 **** --- 1,12 ---- + latd (1.19-1) 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) + + -- + latd (1.18-1) unstable; urgency=low Index: control =================================================================== RCS file: /cvsroot/linux-decnet/latd/debian/control,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** control 14 Aug 2002 09:02:20 -0000 1.8 --- control 28 May 2003 15:56:09 -0000 1.9 *************** *** 4,8 **** Maintainer: Patrick Caulfield <pa...@de...> Build-Depends: debhelper(>=2.0), liblockdev1-dev ! Standards-Version: 3.5.0 Package: latd --- 4,8 ---- Maintainer: Patrick Caulfield <pa...@de...> Build-Depends: debhelper(>=2.0), liblockdev1-dev ! Standards-Version: 3.5.9 Package: latd |
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv16781 Modified Files: TODO configure.in connection.cc connection.h lat.h localport.cc server.cc serversession.cc session.cc session.h Log Message: Oh, lots of changes in an attempt to fix some of the worst protocol violations, not send too many packets and general not crash so much. The old stuff is on BRANCH_LATD_1_18 just in case this all ends up in a big heap. Index: TODO =================================================================== RCS file: /cvsroot/linux-decnet/latd/TODO,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** TODO 5 Apr 2003 11:13:39 -0000 1.15 --- TODO 28 May 2003 15:56:08 -0000 1.16 *************** *** 2,6 **** ---- ! - Support queued reverse-LAT connections - support limited reverse LAT connections (command-line already there) - Test service responder. --- 2,6 ---- ---- ! - 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. Index: configure.in =================================================================== RCS file: /cvsroot/linux-decnet/latd/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** configure.in 20 Apr 2003 10:07:05 -0000 1.6 --- configure.in 28 May 2003 15:56:08 -0000 1.7 *************** *** 3,7 **** dnl Checks that we are given a good source directory. AC_INIT(latcp.cc) ! AM_INIT_AUTOMAKE(latd, 1.18) 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.19) dnl Checks for programs. Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** connection.cc 19 May 2003 13:16:01 -0000 1.60 --- connection.cc 28 May 2003 15:56:08 -0000 1.61 *************** *** 57,67 **** last_recv_ack(_ack), last_time(0L), ! queued_slave(false), eightbitclean(false), connected(false), - master_conn(NULL), request_id(0), last_msg_type(0), ! role(SERVER) { memcpy(macaddr, (char *)_macaddr, 6); --- 57,68 ---- last_recv_ack(_ack), last_time(0L), ! need_ack(false), ! queued(false), eightbitclean(false), connected(false), request_id(0), last_msg_type(0), ! role(SERVER), ! send_ack(false) { memcpy(macaddr, (char *)_macaddr, 6); *************** *** 101,113 **** last_recv_ack(0xff), last_time(0L), queued(queued), - queued_slave(false), eightbitclean(clean), connected(false), - master_conn(NULL), connecting(false), request_id(0), last_msg_type(0), ! role(CLIENT) { debuglog(("New client connection for %s created\n", _remnode)); --- 102,114 ---- last_recv_ack(0xff), last_time(0L), + need_ack(false), queued(queued), eightbitclean(clean), connected(false), connecting(false), request_id(0), last_msg_type(0), ! role(CLIENT), ! send_ack(false) { debuglog(("New client connection for %s created\n", _remnode)); *************** *** 301,305 **** if (is_queued_reconnect(buf, len, &queued_connection)) { ! master_conn = LATServer::Instance()->get_connection(queued_connection); if (!(*master_conn)) { --- 302,306 ---- if (is_queued_reconnect(buf, len, &queued_connection)) { ! LATConnection **master_conn = LATServer::Instance()->get_connection(queued_connection); if (!(*master_conn)) { *************** *** 337,340 **** --- 338,342 ---- { sessions[newsessionnum] = newsession; + newsession->set_master_conn(master_conn); } } *************** *** 429,436 **** case 0xd0: // Disconnect if (session) session->disconnect_session(credits); - if (queued_slave) - { - queued_slave = false; - } // If we have no sessions left then disconnect --- 431,434 ---- *************** *** 463,473 **** } ! // See if there is any data we can send in this reply ! // This doesn't work if we are a server for some reason I don't understand ! // if (role == CLIENT) ! //num_replies = add_data_slots(num_replies, reply); // Send any replies ! if (replyhere || num_replies) { debuglog(("Sending %d slots in reply\n", num_replies)); --- 461,471 ---- } ! // If the reply is just an ack then just set a flag ! // Then in circuit_timer, we send an ACK only if there is no DATA to send. ! if (replyhere && num_replies == 0) ! send_ack = true; // Send any replies ! if (replyhere && num_replies) { debuglog(("Sending %d slots in reply\n", num_replies)); *************** *** 489,505 **** } ! if (window_size < max_window_size) ! { ! send_message(replybuf, ptr, REPLY); ! } ! else ! { ! header->local_connid = num; ! header->remote_connid = remote_connid; ! header->sequence_number = ++last_sent_seq; ! header->ack_number = last_recv_seq; ! pending.push(pending_msg(replybuf, len, false)); ! } return true; --- 487,494 ---- } ! header->local_connid = num; ! header->remote_connid = remote_connid; ! pending_data.push(pending_msg(replybuf, ptr, false)); return true; *************** *** 537,542 **** reply[ptr++] = '\0'; ! send_message(reply, ptr, DATA); ! keepalive_timer = 0; } --- 526,530 ---- reply[ptr++] = '\0'; ! queue_message(reply, ptr); } *************** *** 546,555 **** LAT_Header *response = (LAT_Header *)buf; - if (type == DATA) - { - need_ack = true; - window_size++; - } - response->local_connid = num; response->remote_connid = remote_connid; --- 534,537 ---- *************** *** 566,578 **** if (type == DATA) last_message = pending_msg(buf, len, true); else ! last_ack_message = pending_msg(buf, len, false); return LATServer::Instance()->send_message(buf, len, interface, macaddr); } ! ! // Send a message on this connection when we can int LATConnection::queue_message(unsigned char *buf, int len) { --- 548,566 ---- if (type == DATA) + { + need_ack = true; last_message = pending_msg(buf, len, true); + window_size++; + } else ! { ! need_ack = false; ! last_ack_message = pending_msg(buf, len, false); ! } return LATServer::Instance()->send_message(buf, len, interface, macaddr); } ! // Queue up a reply message int LATConnection::queue_message(unsigned char *buf, int len) { *************** *** 583,589 **** // SEQ and ACK filled in when we send it ! debuglog(("Queued messsge for connid %d\n", num)); ! pending.push(pending_msg(buf, len, true)); return 0; } --- 571,577 ---- // SEQ and ACK filled in when we send it ! debuglog(("Queued data messsge for connid %d\n", num)); ! pending_data.push(pending_msg(buf, len, true)); return 0; } *************** *** 600,621 **** debuglog(("LATConnection dtor: %d\n", num)); ! // Do we need to notify our master? ! if (queued_slave) ! { ! if((*master_conn)) { ! ClientSession *cs = (ClientSession *)(*master_conn)->sessions[1]; ! if (cs) cs->restart_pty(); ! } ! } ! else { ! // Delete all server sessions ! for (unsigned int i=1; i<=highest_session; i++) { ! if (sessions[i]) { ! delete sessions[i]; ! sessions[i] = NULL; } } } --- 588,604 ---- debuglog(("LATConnection dtor: %d\n", num)); ! // Delete server sessions ! for (unsigned int i=1; i<=highest_session; i++) { ! if (sessions[i]) { ! LATConnection *master = sessions[i]->get_master_conn(); ! if (master) { ! ClientSession *cs = (ClientSession *)master->sessions[1]; ! if (cs) cs->restart_pty(); } + delete sessions[i]; + sessions[i] = NULL; } } *************** *** 667,671 **** int ptr = sizeof(LAT_Header); ! header->cmd = LAT_CCMD_DISCON; header->num_slots = 0; header->local_connid = num; --- 650,656 ---- int ptr = sizeof(LAT_Header); ! header->cmd = LAT_CCMD_CONREF; ! if (role == CLIENT) ! header->cmd |= 2; header->num_slots = 0; header->local_connid = num; *************** *** 703,707 **** case LAT_CCMD_CONNECT: { - // Send another connect command int ptr; --- 688,691 ---- *************** *** 730,734 **** add_string(buf, &ptr, LATServer::Instance()->get_local_node()); add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! send_message(buf, ptr, LATConnection::DATA); return; } --- 714,718 ---- add_string(buf, &ptr, LATServer::Instance()->get_local_node()); add_string(buf, &ptr, (unsigned char *)LATServer::greeting); ! send_message(buf, ptr, DATA); return; } *************** *** 774,835 **** } break; default: break; } } } retransmit_count = 0; - // Increment keepalive timer and trigger it if we are getting too close. - // Keepalive timer is held in milli-seconds. - - // Of course, we needn't send keepalive messages when we are a - // disconnected client. - if (role == SERVER || - (role == CLIENT && connected)) - { - struct timeval tv; - long time_in_msec; - - // Initialise last_time for the first time - if (last_time == 0) - { - gettimeofday(&tv, NULL); - last_time = tv.tv_sec*1000 + tv.tv_usec/1000; - } - - gettimeofday(&tv, NULL); - time_in_msec = tv.tv_sec*1000 + tv.tv_usec/1000; - - keepalive_timer += time_in_msec - last_time; - last_time = time_in_msec; - - if (keepalive_timer > (LATServer::Instance()->get_keepalive_timer()-3)*1000 ) - { - // Send an empty message that needs an ACK. - // If we don't get a response to this then we abort the circuit. - debuglog(("keepalive timer expired: %d: limit: %d\n", keepalive_timer, - LATServer::Instance()->get_keepalive_timer()*1000)); - - // If we get into this block then there is no chance that there is - // an outstanding ack (or if there is then it's all gone horribly wrong anyway) - // so it's safe to just send a NULL message out. - // If we do exqueued properly this may need revisiting. - unsigned char replybuf[1600]; - LAT_SessionReply *reply = (LAT_SessionReply *)replybuf; - - reply->header.cmd = LAT_CCMD_SDATA; - reply->header.num_slots = 0; - reply->slot.remote_session = 0; - reply->slot.local_session = 0; - reply->slot.length = 0; - reply->slot.cmd = 0; - - if (role == CLIENT) reply->header.cmd = LAT_CCMD_SESSION; - send_message(replybuf, sizeof(LAT_SessionReply), DATA); - return; - } - } // Poll our sessions --- 758,771 ---- } break; + default: break; } } + return; } retransmit_count = 0; // Poll our sessions *************** *** 857,864 **** while ( (header->num_slots < max_slots_per_packet && !slots_pending.empty())) { - header->num_slots++; - slot_cmd &cmd(slots_pending.front()); memcpy(buf+len, cmd.get_buf(), cmd.get_len()); len += cmd.get_len(); --- 793,804 ---- while ( (header->num_slots < max_slots_per_packet && !slots_pending.empty())) { slot_cmd &cmd(slots_pending.front()); + // make sure it fits + // do we really need max_slots_per_packet ? + if ((len + cmd.get_len()) > 1500) + break; + header->num_slots++; + memcpy(buf+len, cmd.get_buf(), cmd.get_len()); len += cmd.get_len(); *************** *** 870,911 **** if (header->num_slots) { header->local_connid = num; header->remote_connid = remote_connid; ! // SEQ and ACK filled in when we send it ! ! debuglog(("Collected %d slots on circuit timer\n", header->num_slots)); ! pending.push(pending_msg(buf, len, true)); } } ! #ifdef VERBOSE_DEBUG ! if (!pending.empty()) { ! debuglog(("Pending messages. Window size: %d, max %d. last_ack=%d, last_seq=%d\n", ! window_size, max_window_size, last_recv_ack, last_sent_seq)); } ! #endif ! // Send a pending message (if we can) ! if (!pending.empty() && window_size < max_window_size) { // Send the top message ! pending_msg &msg(pending.front()); retransmit_count = 0; need_ack = true; LAT_Header *header = msg.get_header(); header->sequence_number = ++last_sent_seq; header->ack_number = last_recv_seq; ! debuglog(("Sending message on circuit timer: seq: %d, ack: %d\n", last_sent_seq, last_recv_seq)); msg.send(interface, macaddr); last_message = msg; // Save it in case it gets lost on the wire; ! pending.pop(); keepalive_timer = 0; } } --- 810,911 ---- if (header->num_slots) { + debuglog(("Collected %d slots on circuit timer\n", header->num_slots)); header->local_connid = num; header->remote_connid = remote_connid; ! pending_data.push(pending_msg(buf, len, true)); } } ! // Send a reply if there are no data messages and the remote ! // end needs an ACK. ! if (send_ack && ! (pending_data.empty() || window_size >= max_window_size)) { ! debuglog(("Sending ACK reply\n")); ! unsigned char replybuf[1600]; ! ! memset(replybuf, 0, sizeof(replybuf)); ! LAT_Header *header = (LAT_Header *)replybuf; ! int len = sizeof(LAT_Header); ! ! header->cmd = LAT_CCMD_SREPLY; ! header->num_slots = 0; ! if (role == CLIENT) header->cmd |= 2; // To Host ! ! header->local_connid = num; ! header->remote_connid = remote_connid; ! ! header->sequence_number = last_sent_seq; ! header->ack_number = last_recv_seq; ! ! send_message(replybuf, len, REPLY); } ! send_ack = false; ! // Send a pending data message (if we can) ! if (!pending_data.empty() && window_size < max_window_size) { // Send the top message ! pending_msg &msg(pending_data.front()); retransmit_count = 0; need_ack = true; + window_size++; LAT_Header *header = msg.get_header(); + + header->local_connid = num; + header->remote_connid = remote_connid; header->sequence_number = ++last_sent_seq; header->ack_number = last_recv_seq; ! debuglog(("Sending data message on circuit timer: seq: %d, ack: %d\n", last_sent_seq, last_recv_seq)); msg.send(interface, macaddr); last_message = msg; // Save it in case it gets lost on the wire; ! pending_data.pop(); keepalive_timer = 0; } + + // Increment keepalive timer and trigger it if we are getting too close. + // Keepalive timer is held in milli-seconds. + + // Of course, we needn't send keepalive messages when we are a + // disconnected client. + if (role == SERVER || + (role == CLIENT && connected)) + { + struct timeval tv; + long time_in_msec; + + // Initialise last_time for the first time + if (last_time == 0) + { + gettimeofday(&tv, NULL); + last_time = tv.tv_sec*1000 + tv.tv_usec/1000; + } + + gettimeofday(&tv, NULL); + time_in_msec = tv.tv_sec*1000 + tv.tv_usec/1000; + + keepalive_timer += time_in_msec - last_time; + last_time = time_in_msec; + + if (keepalive_timer > (LATServer::Instance()->get_keepalive_timer()-3)*1000 ) + { + // Send an empty message that needs an ACK. + // If we don't get a response to this then we abort the circuit. + debuglog(("keepalive timer expired: %d: limit: %d\n", keepalive_timer, + LATServer::Instance()->get_keepalive_timer()*1000)); + + // If we get into this block then there is no chance that there is + // an outstanding ack (or if there is then it's all gone horribly wrong anyway) + // so it's safe to just send a NULL message out. + // If we do exqueued properly this may need revisiting. + send_ack = true; + return; + } + } } *************** *** 1090,1094 **** last_msg_type = msg->header.cmd; ! return send_message(buf, ptr, LATConnection::DATA); } } --- 1090,1094 ---- last_msg_type = msg->header.cmd; ! return send_message(buf, ptr, DATA); } } *************** *** 1142,1146 **** last_msg_type = msg->header.cmd; ! return send_message(buf, ptr, LATConnection::DATA); } --- 1142,1146 ---- last_msg_type = msg->header.cmd; ! return send_message(buf, ptr, DATA); } *************** *** 1262,1266 **** max_window_size = 1; // PJC All we can manage window_size = 0; ! need_ack = false; last_msg_type = 0; // Not waiting anymore --- 1262,1266 ---- max_window_size = 1; // PJC All we can manage window_size = 0; ! // need_ack = false; last_msg_type = 0; // Not waiting anymore *************** *** 1311,1316 **** if (ptr >= len) return false; - queued_slave = false; - // Do parameters -- look for a 2 while (ptr < len) --- 1311,1314 ---- *************** *** 1324,1328 **** debuglog(("found Parameter 2: request ID is %d\n", param)); *conn = param; - queued_slave = true; ptr +=2; return true; --- 1322,1325 ---- Index: connection.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** connection.h 5 Apr 2003 10:01:22 -0000 1.27 --- connection.h 28 May 2003 15:56:08 -0000 1.28 *************** *** 77,86 **** LATSession *sessions[256]; ! bool need_ack; bool queued; // Client for queued connection. - bool queued_slave; // We are a slave connection for a queued client bool eightbitclean; bool connected; - LATConnection **master_conn; // Client connection we are slave to bool connecting; unsigned short request_id; // For incoming reverse-LATs --- 77,84 ---- LATSession *sessions[256]; ! bool need_ack; // The message we last sent requires an ACK bool queued; // Client for queued connection. bool eightbitclean; bool connected; bool connecting; unsigned short request_id; // For incoming reverse-LATs *************** *** 91,95 **** int next_session_number(); - void send_a_reply(unsigned char local_session, unsigned char remote_session); bool is_queued_reconnect(unsigned char *buf, int len, int *conn); --- 89,92 ---- *************** *** 146,150 **** }; ! std::queue<pending_msg> pending; // This class & queue is for the slot messages. we coalesce these --- 143,148 ---- }; ! // Queue of pending DATA messages ! std::queue<pending_msg> pending_data; // This class & queue is for the slot messages. we coalesce these *************** *** 189,191 **** --- 187,193 ---- // name of client device to create char lta_name[255]; + + // Whether we need to send an ACK if there are no data messages + // available at the next circuit timer tick + bool send_ack; }; Index: lat.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/lat.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** lat.h 13 Feb 2002 16:59:13 -0000 1.10 --- lat.h 28 May 2003 15:56:08 -0000 1.11 *************** *** 8,11 **** --- 8,13 ---- #define LAT_VERSION_ECO 2 + #define MAX_LAT_MTU 1500 // max ethernet packet + // Name of the /dev/lat directory for local "ports" #define LAT_DIRECTORY "/dev/lat" *************** *** 52,55 **** --- 54,72 ---- } LAT_Enquiry; + + typedef struct + { + unsigned char cmd __attribute__ ((packed)); + unsigned char dummy __attribute__ ((packed)); + unsigned char hiver __attribute__ ((packed)); // Highest protocol version + unsigned char lover __attribute__ ((packed)); // Lowest protocol version + unsigned char latver __attribute__ ((packed)); // LAT version No. (5) + unsigned char latver_eco __attribute__ ((packed)); // LAT version No. (LSB) + unsigned short mtu __attribute__ ((packed)); // 1500 + unsigned short id __attribute__ ((packed)); + unsigned short retrans_timer __attribute__ ((packed)); + + } LAT_Enqreply; + // Service Announcement message Index: localport.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/localport.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** localport.cc 22 May 2003 15:56:00 -0000 1.10 --- localport.cc 28 May 2003 15:56:08 -0000 1.11 *************** *** 137,142 **** void LocalPort::close_and_delete() { ! if (slave_fd_open) close (slave_fd); close (master_fd); LATServer::Instance()->remove_fd(master_fd); unlink(devname.c_str()); --- 137,148 ---- void LocalPort::close_and_delete() { ! if (slave_fd_open) ! { ! close (slave_fd); ! slave_fd = -1; ! slave_fd_open = false; ! } close (master_fd); + master_fd = -1; LATServer::Instance()->remove_fd(master_fd); unlink(devname.c_str()); Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -r1.73 -r1.74 *** server.cc 19 May 2003 13:16:01 -0000 1.73 --- server.cc 28 May 2003 15:56:08 -0000 1.74 *************** *** 130,133 **** --- 130,134 ---- { unsigned char packet[1600]; + static unsigned char id = 1; LAT_Enquiry *enqmsg = (LAT_Enquiry *)packet; int ptr = sizeof(LAT_Enquiry); *************** *** 135,145 **** enqmsg->cmd = LAT_CCMD_ENQUIRE; enqmsg->dummy = 0; ! enqmsg->hiver = 5; ! enqmsg->lover = 5; ! enqmsg->latver = 5; ! enqmsg->latver_eco = 2; enqmsg->mtu = dn_htons(1500); ! enqmsg->id = 1; /* Something here */ ! enqmsg->retrans_timer = 2; add_string(packet, &ptr, node); --- 136,146 ---- enqmsg->cmd = LAT_CCMD_ENQUIRE; enqmsg->dummy = 0; ! enqmsg->hiver = LAT_VERSION; ! enqmsg->lover = LAT_VERSION; ! enqmsg->latver = LAT_VERSION; ! enqmsg->latver_eco = LAT_VERSION_ECO; enqmsg->mtu = dn_htons(1500); ! enqmsg->id = id++; ! enqmsg->retrans_timer = 75; // * 10ms - give it more time to respond add_string(packet, &ptr, node); *************** *** 148,160 **** add_string(packet, &ptr, local_name); - 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++) --- 149,159 ---- add_string(packet, &ptr, local_name); + packet[ptr++] = 0x00; + packet[ptr++] = 0x00; + packet[ptr++] = 0x00; + packet[ptr++] = 0x00; /* This is the LAT multicast address */ ! static unsigned char addr[6] = { 0x09, 0x00, 0x2b, 0x00, 0x00, 0x0f }; for (int i=0; i<num_interfaces;i++) *************** *** 593,597 **** // we will spin until latcp unlocks us. if (locked) ! continue; // Parse & dispatch it. --- 592,596 ---- // we will spin until latcp unlocks us. if (locked) ! continue; // Parse & dispatch it. Index: serversession.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/serversession.cc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** serversession.cc 13 Apr 2003 12:11:40 -0000 1.18 --- serversession.cc 28 May 2003 15:56:08 -0000 1.19 *************** *** 94,98 **** reply->slot.local_session = 0; reply->slot.remote_session = 0; ! parent.send_message(buf,sizeof(LAT_Header),LATConnection::REPLY); --- 94,98 ---- reply->slot.local_session = 0; reply->slot.remote_session = 0; ! parent.send_message(buf,sizeof(LAT_Header), LATConnection::REPLY); Index: session.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/session.cc,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** session.cc 5 Apr 2003 11:13:39 -0000 1.38 --- session.cc 28 May 2003 15:56:08 -0000 1.39 *************** *** 465,469 **** reply->slot.cmd = 0x9f; ! parent.send_message(buf, ptr, LATConnection::DATA); } --- 465,469 ---- reply->slot.cmd = 0x9f; ! parent.queue_message(buf, ptr); } *************** *** 506,513 **** } ! if (parent.isClient()) ! parent.queue_message(buf, ptr); ! else ! parent.send_message(buf, ptr, LATConnection::REPLY); connected = true; --- 506,510 ---- } ! parent.queue_message(buf, ptr); connected = true; Index: session.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/session.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** session.h 5 Apr 2003 11:13:39 -0000 1.12 --- session.h 28 May 2003 15:56:08 -0000 1.13 *************** *** 14,18 **** request_id(0), stopped(false), ! remote_credit(0) {} virtual ~LATSession(); --- 14,19 ---- request_id(0), stopped(false), ! remote_credit(0), ! master_conn(NULL) {} virtual ~LATSession(); *************** *** 36,39 **** --- 37,53 ---- virtual void connect(); + // These two are for queuedsession really, but we don't + // know what type of session we have in the connection dtor + void set_master_conn(LATConnection **master) + { + master_conn = master; + } + LATConnection *get_master_conn() + { + if (master_conn) + return *master_conn; + else + return NULL; + } protected: *************** *** 59,63 **** bool stopped; int remote_credit; ! --- 73,77 ---- bool stopped; int remote_credit; ! LATConnection **master_conn; |
From: Patrick C. <pa...@us...> - 2003-05-27 15:48:21
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv25506 Modified Files: server.h Log Message: Add some initialisers and remove unused variable. Index: server.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** server.h 7 Apr 2003 12:36:26 -0000 1.42 --- server.h 27 May 2003 15:48:15 -0000 1.43 *************** *** 64,68 **** retransmit_limit(20), keepalive_timer(20), ! responder(false) {}; // Private constructor to force singleton static LATServer *instance; // Singleton instance --- 64,81 ---- retransmit_limit(20), keepalive_timer(20), ! responder(false), ! static_rating(false), ! rating(12), ! num_interfaces(0), ! multicast_incarnation(0), ! verbosity(0), ! latcp_socket(-1), ! llogin_socket(-1), ! do_shutdown(false), ! locked(true), ! next_connection(1), ! lat_group(0), ! groups_set(false), ! iface(0) {}; // Private constructor to force singleton static LATServer *instance; // Singleton instance *************** *** 78,82 **** unsigned char multicast_incarnation; int verbosity; - int lat_socket; int latcp_socket; int llogin_socket; --- 91,94 ---- |
From: Patrick C. <pa...@us...> - 2003-05-26 11:20:00
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv11264 Modified Files: llogin.cc latcp.cc Log Message: Fix some small memory leaks Index: llogin.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/llogin.cc,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** llogin.cc 15 Mar 2003 12:54:34 -0000 1.20 --- llogin.cc 26 May 2003 11:19:56 -0000 1.21 *************** *** 229,233 **** send_msg(latcp_socket, LATCP_SHOWSERVICE, verboseflag, 1); ! unsigned char *result; int len; int cmd; --- 229,233 ---- send_msg(latcp_socket, LATCP_SHOWSERVICE, verboseflag, 1); ! unsigned char *result = NULL; int len; int cmd; *************** *** 255,259 **** send_msg(latcp_socket, LATCP_TERMINALSESSION, msg, ptr); ! unsigned char *result; int len; int cmd; --- 255,259 ---- send_msg(latcp_socket, LATCP_TERMINALSESSION, msg, ptr); ! unsigned char *result = NULL; int len; int cmd; *************** *** 263,266 **** --- 263,268 ---- return ret; + delete[] result; + // If the reply was good then go into terminal mode. terminal(latcp_socket, quit_char, crlf, bsdel, lfvt); *************** *** 284,288 **** cmd = head[0]; cmdbuf = new unsigned char[len]; ! // Read the message buffer if (read(fd, cmdbuf, len) != len) --- 286,291 ---- cmd = head[0]; cmdbuf = new unsigned char[len]; ! if (cmdbuf == NULL) ! return -1; // Read the message buffer if (read(fd, cmdbuf, len) != len) *************** *** 320,324 **** } ! unsigned char *result; int len; int cmd; --- 323,327 ---- } ! unsigned char *result = NULL; int len; int cmd; *************** *** 328,331 **** --- 331,335 ---- read_reply(latcp_socket, cmd, result, len); // Read version number back + delete[] result; return true; } Index: latcp.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcp.cc,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -r1.39 -r1.40 *** latcp.cc 15 Mar 2003 14:08:45 -0000 1.39 --- latcp.cc 26 May 2003 11:19:57 -0000 1.40 *************** *** 243,247 **** } ! unsigned char *result; int len; int cmd; --- 243,247 ---- } ! unsigned char *result = NULL; int len; int cmd; *************** *** 303,307 **** // Wait for ACK or error ! unsigned char *result; int len; int cmd; --- 303,307 ---- // Wait for ACK or error ! unsigned char *result = NULL; int len; int cmd; *************** *** 348,352 **** // Wait for ACK or error ! unsigned char *result; int len; int cmd; --- 348,352 ---- // Wait for ACK or error ! unsigned char *result = NULL; int len; int cmd; *************** *** 389,393 **** // Wait for ACK or error ! unsigned char *result; int len; exit(read_reply(latcp_socket, cmd, result, len)); --- 389,393 ---- // Wait for ACK or error ! unsigned char *result = NULL; int len; exit(read_reply(latcp_socket, cmd, result, len)); *************** *** 429,433 **** // Wait for ACK or error ! unsigned char *result; int len; exit(read_reply(latcp_socket, cmd, result, len)); --- 429,433 ---- // Wait for ACK or error ! unsigned char *result = NULL; int len; exit(read_reply(latcp_socket, cmd, result, len)); *************** *** 628,632 **** // Variables for ACK message ! unsigned char *result; int len; int cmd; --- 628,632 ---- // Variables for ACK message ! unsigned char *result = NULL; int len; int cmd; *************** *** 724,728 **** send_msg(latcp_socket, LATCP_REMPORT, message, ptr); ! unsigned char *result; int len; int cmd; --- 724,728 ---- send_msg(latcp_socket, LATCP_REMPORT, message, ptr); ! unsigned char *result = NULL; int len; int cmd; *************** *** 907,910 **** --- 907,912 ---- cmd = head[0]; cmdbuf = new unsigned char[len]; + if (cmdbuf == NULL) + return -1; // Read the message buffer *************** *** 943,947 **** } ! unsigned char *result; int len; int cmd; --- 945,949 ---- } ! unsigned char *result = NULL; int len; int cmd; *************** *** 950,953 **** --- 952,956 ---- 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; |
From: Patrick C. <pa...@us...> - 2003-05-24 13:26:15
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv24241 Modified Files: latcpcircuit.cc llogincircuit.cc Log Message: Fix memory leak in st.str(). Index: latcpcircuit.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/latcpcircuit.cc,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** latcpcircuit.cc 21 Feb 2003 15:18:54 -0000 1.21 --- latcpcircuit.cc 24 May 2003 13:26:11 -0000 1.22 *************** *** 104,107 **** --- 104,108 ---- LATServices::Instance()->list_services(verbose?true:false, st); send_reply(LATCP_SHOWSERVICE, st.str(), st.pcount()); + st.freeze(false); } break; *************** *** 116,119 **** --- 117,121 ---- LATServer::Instance()->show_characteristics(verbose?true:false, st); send_reply(LATCP_SHOWCHAR, st.str(), st.pcount()); + st.freeze(false); } break; Index: llogincircuit.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/llogincircuit.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** llogincircuit.cc 12 Mar 2003 17:12:26 -0000 1.8 --- llogincircuit.cc 24 May 2003 13:26:11 -0000 1.9 *************** *** 106,109 **** --- 106,110 ---- LATServices::Instance()->list_services(verbose?true:false, st); send_reply(LATCP_SHOWSERVICE, st.str(), st.pcount()); + st.freeze(false); } break; |
From: Patrick C. <pa...@us...> - 2003-05-22 15:56:04
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv1364 Modified Files: localport.cc Log Message: USE_OPENPTY is now HAVE_PTY Index: localport.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/localport.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** localport.cc 12 Mar 2003 17:12:26 -0000 1.9 --- localport.cc 22 May 2003 15:56:00 -0000 1.10 *************** *** 114,118 **** fcntl(master_fd, F_SETFL, fcntl(master_fd, F_GETFL, 0) | O_NONBLOCK); ! #ifdef USE_OPENPTY // Set it owned by "lat" if it exists. We only do this for // /dev/pts PTYs. --- 114,118 ---- fcntl(master_fd, F_SETFL, fcntl(master_fd, F_GETFL, 0) | O_NONBLOCK); ! #ifdef HAVE_OPENPTY // Set it owned by "lat" if it exists. We only do this for // /dev/pts PTYs. |
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv8797 Modified Files: connection.cc interfaces-bpf.cc interfaces-linux.cc moprc.cc server.cc interfaces-bpf.h interfaces-linux.h interfaces.h Log Message: An attempt to fix the odd pauses on Darwin. Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/connection.cc,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -r1.59 -r1.60 *** connection.cc 24 Apr 2003 09:18:11 -0000 1.59 --- connection.cc 19 May 2003 13:16:01 -0000 1.60 *************** *** 319,331 **** // Connect a new port session to it ! ClientSession *cs = (ClientSession *)(*master_conn)->sessions[1]; newsessionnum = next_session_number(); newsession = new QueuedSession(*this, ! (LAT_SessionStartCmd *)buf, ! cs, ! slotcmd->remote_session, ! newsessionnum, ! (*master_conn)->eightbitclean); if (newsession->new_session(remnode, "","", credits) == -1) --- 319,331 ---- // Connect a new port session to it ! ClientSession *cs = (ClientSession *)(*master_conn)->sessions[1]; newsessionnum = next_session_number(); newsession = new QueuedSession(*this, ! (LAT_SessionStartCmd *)buf, ! cs, ! slotcmd->remote_session, ! newsessionnum, ! (*master_conn)->eightbitclean); if (newsession->new_session(remnode, "","", credits) == -1) Index: interfaces-bpf.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-bpf.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** interfaces-bpf.cc 25 Apr 2003 19:24:13 -0000 1.8 --- interfaces-bpf.cc 19 May 2003 13:16:01 -0000 1.9 *************** *** 1,8 **** /****************************************************************************** (c) 2002 Matthew Fredette fre...@ne... ! Some modifications: (c) 2003 Patrick Caulfield pa...@de... ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,8 ---- /****************************************************************************** (c) 2002 Matthew Fredette fre...@ne... ! Some modifications: (c) 2003 Patrick Caulfield pa...@de... ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 382,388 **** /* write this packet: */ ! iov[0].iov_base = (unsigned char* )ðer_packet; iov[0].iov_len = sizeof(ether_packet); ! iov[1].iov_base = data; iov[1].iov_len = len; if (writev(_latd_bpf_fd, iov, 2) < 0) { --- 382,388 ---- /* write this packet: */ ! iov[0].iov_base = (char* )ðer_packet; iov[0].iov_len = sizeof(ether_packet); ! iov[1].iov_base = (char *)data; iov[1].iov_len = len; if (writev(_latd_bpf_fd, iov, 2) < 0) { *************** *** 396,406 **** #define CONT_OR_RET() \ ! if (_latd_bpf_buffer_offset < _latd_bpf_buffer_end) \ continue;\ ! else \ ! return 0; // Receive a packet from a given interface ! int BPFInterfaces::recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen) { ssize_t buffer_end; --- 396,409 ---- #define CONT_OR_RET() \ ! if (_latd_bpf_buffer_offset < _latd_bpf_buffer_end) {\ continue;\ ! } else {\ ! if (_latd_bpf_buffer_offset_next <= _latd_bpf_buffer_end) \ ! more = true; \ ! return 0; \ ! } // Receive a packet from a given interface ! int BPFInterfaces::recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen, bool &more) { ssize_t buffer_end; *************** *** 408,411 **** --- 411,416 ---- unsigned int _latd_bpf_buffer_offset_next; + more = false; + /* loop until we have something to return: */ for(;;) { *************** *** 416,419 **** --- 421,431 ---- >= _latd_bpf_buffer_end) { + // Is there really anything to read? we really don't want to + // block here. + int bytes; + if (ioctl(sockfd, FIONREAD, &bytes) == 0 && + bytes == 0) { + return 0; + } /* read the BPF socket: */ debuglog(("bpf: calling read\n")); *************** *** 437,441 **** debuglog(("bpf: flushed garbage BPF header bytes\n")); _latd_bpf_buffer_end = 0; ! CONT_OR_RET(); } --- 449,453 ---- debuglog(("bpf: flushed garbage BPF header bytes\n")); _latd_bpf_buffer_end = 0; ! return 0; } *************** *** 506,509 **** --- 518,523 ---- ETHER_ADDR_LEN); _latd_bpf_buffer_offset = _latd_bpf_buffer_offset_next; + if (_latd_bpf_buffer_offset < _latd_bpf_buffer_end) + more = true; return (the_bpf_header.bh_datalen - sizeof(struct ether_header)); *************** *** 655,659 **** return -1; } ! /* set the filter on the BPF device: */ program.bf_len = sizeof(moprc_bpf_filter) / sizeof(moprc_bpf_filter[0]); --- 669,673 ---- return -1; } ! /* set the filter on the BPF device: */ program.bf_len = sizeof(moprc_bpf_filter) / sizeof(moprc_bpf_filter[0]); Index: interfaces-linux.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-linux.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** interfaces-linux.cc 12 Mar 2003 17:12:22 -0000 1.6 --- interfaces-linux.cc 19 May 2003 13:16:01 -0000 1.7 *************** *** 210,214 **** // Receive a packet from a given interface ! int LinuxInterfaces::recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen) { struct msghdr msg; --- 210,214 ---- // Receive a packet from a given interface ! int LinuxInterfaces::recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen, bool &more) { struct msghdr msg; *************** *** 216,219 **** --- 216,222 ---- struct sockaddr_ll sock_info; int len; + + /* Linux only returns 1 packet at a time */ + more = false; memset(&msg, 0, sizeof(msg)); Index: moprc.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/moprc.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** moprc.cc 17 Mar 2003 09:03:43 -0000 1.6 --- moprc.cc 19 May 2003 13:16:01 -0000 1.7 *************** *** 214,219 **** int ifn; unsigned char macaddr[6]; ! return iface->recv_packet(mop_socket, ifn, macaddr, buf, buflen); } --- 214,220 ---- int ifn; unsigned char macaddr[6]; + bool more; ! return iface->recv_packet(mop_socket, ifn, macaddr, buf, buflen, more); } Index: server.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/server.cc,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -r1.72 -r1.73 *** server.cc 13 Apr 2003 10:54:34 -0000 1.72 --- server.cc 19 May 2003 13:16:01 -0000 1.73 *************** *** 572,600 **** int i; int ifn; LAT_Header *header = (LAT_Header *)buf; ! len = iface->recv_packet(sock, ifn, macaddr, buf, sizeof(buf)); ! if (len == 0) ! return; // Probably a rogue packet ! ! if (len < 0) { ! if (errno != EINTR && errno != EAGAIN) { ! syslog(LOG_ERR, "recvmsg: %m"); ! return; } - } ! // Not listening yet, but we must read the message otherwise we ! // we will spin until latcp unlocks us. ! if (locked) return; ! // Parse & dispatch it. ! switch(header->cmd) ! { ! case LAT_CCMD_SREPLY: ! case LAT_CCMD_SDATA: ! case LAT_CCMD_SESSION: { debuglog(("session cmd for connid %d\n", header->remote_connid)); --- 572,604 ---- int i; int ifn; + bool more = true; LAT_Header *header = (LAT_Header *)buf; ! while (more) { ! len = iface->recv_packet(sock, ifn, macaddr, buf, sizeof(buf), more); ! if (len == 0) ! continue; // Probably a rogue packet ! ! if (len < 0) { ! if (errno != EINTR && errno != EAGAIN) ! { ! syslog(LOG_ERR, "recvmsg: %m"); ! return; ! } } ! // Not listening yet, but we must read the message otherwise we ! // we will spin until latcp unlocks us. ! if (locked) ! continue; ! // Parse & dispatch it. ! switch(header->cmd) ! { ! case LAT_CCMD_SREPLY: ! case LAT_CCMD_SDATA: ! case LAT_CCMD_SESSION: { debuglog(("session cmd for connid %d\n", header->remote_connid)); *************** *** 617,621 **** break; ! case LAT_CCMD_CONNECT: { // Make a new connection --- 621,625 ---- break; ! case LAT_CCMD_CONNECT: { // Make a new connection *************** *** 632,636 **** // How the &?* did that happen? send_connect_error(2, header, ifn, macaddr); ! return; } --- 636,640 ---- // How the &?* did that happen? send_connect_error(2, header, ifn, macaddr); ! continue; } *************** *** 644,648 **** break; ! case LAT_CCMD_CONACK: { LATConnection *conn = NULL; --- 648,652 ---- break; ! case LAT_CCMD_CONACK: { LATConnection *conn = NULL; *************** *** 665,670 **** break; ! case LAT_CCMD_CONREF: ! case LAT_CCMD_DISCON: { debuglog(("Disconnecting connection %d: status %x(%s)\n", --- 669,674 ---- break; ! case LAT_CCMD_CONREF: ! case LAT_CCMD_DISCON: { debuglog(("Disconnecting connection %d: status %x(%s)\n", *************** *** 702,726 **** break; ! case LAT_CCMD_SERVICE: ! // Keep a list of known services ! add_services(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_ENQUIRE: ! reply_to_enq(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_ENQREPLY: ! got_enqreply(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_STATUS: ! forward_status_messages(buf, len); ! break; ! ! // Request for a reverse-LAT connection. ! case LAT_CCMD_COMMAND: ! process_command_msg(buf, len, ifn, macaddr); ! break; } } --- 706,731 ---- break; ! case LAT_CCMD_SERVICE: ! // Keep a list of known services ! add_services(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_ENQUIRE: ! reply_to_enq(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_ENQREPLY: ! got_enqreply(buf, len, ifn, macaddr); ! break; ! ! case LAT_CCMD_STATUS: ! forward_status_messages(buf, len); ! break; ! ! // Request for a reverse-LAT connection. ! case LAT_CCMD_COMMAND: ! process_command_msg(buf, len, ifn, macaddr); ! break; ! } } } Index: interfaces-bpf.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-bpf.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** interfaces-bpf.h 15 Mar 2003 14:08:45 -0000 1.3 --- interfaces-bpf.h 19 May 2003 13:16:01 -0000 1.4 *************** *** 45,49 **** // Receive a packet from a given interface ! virtual int recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen); // Open a connection on an interface --- 45,49 ---- // Receive a packet from a given interface ! virtual int recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen, bool &more); // Open a connection on an interface Index: interfaces-linux.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-linux.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** interfaces-linux.h 15 Feb 2003 12:59:13 -0000 1.2 --- interfaces-linux.h 19 May 2003 13:16:01 -0000 1.3 *************** *** 46,50 **** // Receive a packet from a given interface ! virtual int recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen); // Enable reception of LAT multicast messages --- 46,50 ---- // Receive a packet from a given interface ! virtual int recv_packet(int sockfd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen, bool &more); // Enable reception of LAT multicast messages Index: interfaces.h =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** interfaces.h 12 Mar 2003 17:12:21 -0000 1.5 --- interfaces.h 19 May 2003 13:16:01 -0000 1.6 *************** *** 58,62 **** // Receive a packet from a given FD (note FD not iface) ! virtual int recv_packet(int fd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen)=0; // Enable reception of LAT multicast messages --- 58,62 ---- // Receive a packet from a given FD (note FD not iface) ! virtual int recv_packet(int fd, int &ifn, unsigned char macaddr[], unsigned char *data, int maxlen, bool &more)=0; // Enable reception of LAT multicast messages |
From: Patrick C. <pa...@us...> - 2003-05-06 10:37:12
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1:/tmp/cvs-serv27229 Added Files: rclat Log Message: System startup file for SuSE Linux --- NEW FILE: rclat --- #! /bin/sh # # # # init.d/lat # # and symbolic its link # # /sbin/rclat # # System startup script for the LAT daemon on SuSE Linux # ### BEGIN INIT INFO # Provides: LAT # Required-Start: $network $remote_fs $syslog # Required-Stop: # Default-Start: 3 5 # Default-Stop: # Description: Start LAT. ### END INIT INFO # Source SuSE config .. /etc/rc.config # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} # Force execution if not called by a runlevel directory. test $link = $base && START_LAT=yes test "$START_LAT" = yes || exit 0 # # Look for LATCP binary # LATCP="" [ -x /usr/sbin/latcp ] && LATCP="/usr/sbin/latcp" [ -x /usr/local/sbin/latcp ] && LATCP="/usr/local/sbin/latcp" if [ -z "$LATCP" ] then echo "Cannot find latcp at $LATCP" exit 5 fi # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status .. /etc/rc.status # First reset status of this service rc_reset # Return values acc. to LSB for all commands but status: # 0 - success # 1 - misc error # 2 - invalid or excess args # 3 - unimplemented feature (e.g. reload) # 4 - insufficient privilege # 5 - program not installed # 6 - program not configured # 7 - program is not running # # Note that starting an already running service, stopping # or restarting a not-running service as well as the restart # with force-reload (in case signalling is not supported) are # considered a success. case "$1" in start) echo -n "Starting LAT " $LATCP -s # Remember status and be verbose rc_status -v ;; stop) echo -n "Stopping LAT " $LATCP -h # Remember status and be verbose rc_status -v ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop && $0 start # Remember status and be quiet rc_status ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac rc_exit |
From: Patrick C. <pa...@us...> - 2003-05-06 09:58:00
|
Update of /cvsroot/linux-decnet/dnprogs/debian In directory sc8-pr-cvs1:/tmp/cvs-serv11341 Modified Files: changelog dnet-common.init.d dnet-progs.init.d Log Message: Don't return 1 from init.d in non-fatal circumstances Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/changelog,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** changelog 5 May 2003 08:31:40 -0000 1.24 --- changelog 6 May 2003 09:57:56 -0000 1.25 *************** *** 1,3 **** ! dnprogs (2.24-1) unstable; urgency=low * Add library path to dnroute link. --- 1,11 ---- ! dnprogs (2.23.2-1) unstable; urgency=low ! ! * Always return 0 from init scripts in case someone installs DECnet ! when they don't actually want it. ! Closes: #192052 ! ! -- Patrick Caulfield <pa...@de...> Tue, 6 May 2003 08:14:29 +0100 ! ! dnprogs (2.23.1-1) unstable; urgency=low * Add library path to dnroute link. Index: dnet-common.init.d =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/dnet-common.init.d,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** dnet-common.init.d 4 May 2003 12:29:03 -0000 1.6 --- dnet-common.init.d 6 May 2003 09:57:57 -0000 1.7 *************** *** 66,70 **** then echo "DECnet not started as it is not configured." ! exit 1 fi --- 66,70 ---- then echo "DECnet not started as it is not configured." ! exit 0 fi *************** *** 76,80 **** then echo "DECnet not started as it is not in the kernel." ! exit 1 fi fi --- 76,80 ---- then echo "DECnet not started as it is not in the kernel." ! exit 0 fi fi Index: dnet-progs.init.d =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/dnet-progs.init.d,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** dnet-progs.init.d 4 May 2003 12:29:03 -0000 1.7 --- dnet-progs.init.d 6 May 2003 09:57:57 -0000 1.8 *************** *** 17,21 **** if [ ! -f /etc/decnet.conf -o ! -f /proc/net/decnet ] then ! exit 1 fi --- 17,21 ---- if [ ! -f /etc/decnet.conf -o ! -f /proc/net/decnet ] then ! exit 0 fi |
From: Patrick C. <pa...@us...> - 2003-05-05 08:48:20
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv15179 Modified Files: Makefile Makefile.common Log Message: Don't leave dnlogin binaries in Debian source. Don't make minor fix into 2.24 - use 2.23.1 instead Tidy up "make snap" Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** Makefile 4 May 2003 11:56:48 -0000 1.19 --- Makefile 5 May 2003 08:48:16 -0000 1.20 *************** *** 7,10 **** --- 7,11 ---- # PKGNAME=dnprogs + DATE="$(shell date +'%Y%m%d')" SUBDIRS=include libdnet libdaemon libdap librms fal dndir dnsubmit dndel \ *************** *** 57,62 **** # Make a snapshot release # ! snap: DATE = $(shell date +'%Y%m%d') ! snap: for i in $(SUBDIRS); do cd $$i; rm -f .depend; cd ..; done if [ -L ../$(PKGNAME)-$(DATE) ]; then rm ../$(PKGNAME)-$(DATE); fi --- 58,62 ---- # Make a snapshot release # ! snap: for i in $(SUBDIRS); do cd $$i; rm -f .depend; cd ..; done if [ -L ../$(PKGNAME)-$(DATE) ]; then rm ../$(PKGNAME)-$(DATE); fi *************** *** 99,102 **** --- 99,103 ---- deb: rm -f Documentation/*~ Documentation/*.bak + rm -f dnlogin/*.o dnlogin/dnlogin dpkg-buildpackage -rfakeroot Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** Makefile.common 5 May 2003 08:31:39 -0000 1.21 --- Makefile.common 5 May 2003 08:48:16 -0000 1.22 *************** *** 54,58 **** MAJOR_VERSION=2 ! MINOR_VERSION=24 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) --- 54,58 ---- MAJOR_VERSION=2 ! MINOR_VERSION=23 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) |
From: Patrick C. <pa...@us...> - 2003-05-05 08:31:43
|
Update of /cvsroot/linux-decnet/dnprogs/debian In directory sc8-pr-cvs1:/tmp/cvs-serv9470/debian Modified Files: changelog dnet-progs.files rules Log Message: Minor tweaks for debian build fixes Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/changelog,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -r1.23 -r1.24 *** changelog 4 May 2003 12:29:03 -0000 1.23 --- changelog 5 May 2003 08:31:40 -0000 1.24 *************** *** 1,2 **** --- 1,10 ---- + dnprogs (2.24-1) unstable; urgency=low + + * Add library path to dnroute link. + Closes: #191946 + * Get rid of C++ism in dnroute + + -- Patrick Caulfield <pa...@de...> Mon, 5 May 2003 09:26:55 +0100 + dnprogs (2.23-1) unstable; urgency=low Index: dnet-progs.files =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/dnet-progs.files,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** dnet-progs.files 8 Feb 2001 09:33:54 -0000 1.2 --- dnet-progs.files 5 May 2003 08:31:40 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- ./usr/sbin/phoned ./usr/sbin/dnetd + ./usr/sbin/dnroute ./usr/bin/dndir ./usr/bin/dnsubmit *************** *** 27,30 **** --- 28,32 ---- ./usr/share/man/man8/fal.8 ./usr/share/man/man8/vmsmaild.8 + ./usr/share/man/man8/dnroute.8 ./usr/share/man/man5/vmsmail.conf.5 ./usr/share/man/man1/dndel.1 Index: rules =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/rules,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** rules 4 May 2003 12:29:03 -0000 1.15 --- rules 5 May 2003 08:31:40 -0000 1.16 *************** *** 31,35 **** echo "DNET_DAEMONS=\"dnetd phoned #dnroute\"" >> debian/tmp/etc/default/decnet echo "#" >> debian/tmp/etc/default/decnet ! echo "#The following two lines enable routing, note that if you are" >> debian/tmp/etc/default/decnet echo "# being a router, then add dnroute to the DNET_DAEMONS too" >> debian/tmp/etc/default/decnet echo "#ROUTING=1" >> debian/tmp/etc/default/decnet --- 31,35 ---- echo "DNET_DAEMONS=\"dnetd phoned #dnroute\"" >> debian/tmp/etc/default/decnet echo "#" >> debian/tmp/etc/default/decnet ! echo "# The following two lines enable routing, note that if you are" >> debian/tmp/etc/default/decnet echo "# being a router, then add dnroute to the DNET_DAEMONS too" >> debian/tmp/etc/default/decnet echo "#ROUTING=1" >> debian/tmp/etc/default/decnet |
From: Patrick C. <pa...@us...> - 2003-05-05 08:31:43
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv9470 Modified Files: Makefile.common Log Message: Minor tweaks for debian build fixes Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** Makefile.common 4 May 2003 12:29:02 -0000 1.20 --- Makefile.common 5 May 2003 08:31:39 -0000 1.21 *************** *** 54,58 **** MAJOR_VERSION=2 ! MINOR_VERSION=23 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) --- 54,58 ---- MAJOR_VERSION=2 ! MINOR_VERSION=24 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) |
From: Patrick C. <pa...@us...> - 2003-05-05 08:29:10
|
Update of /cvsroot/linux-decnet/dnprogs/dnroute In directory sc8-pr-cvs1:/tmp/cvs-serv7873 Modified Files: get_neigh.c Log Message: get rid of C++ism (how did this ever compile?? Index: get_neigh.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/get_neigh.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** get_neigh.c 4 May 2003 12:48:10 -0000 1.3 --- get_neigh.c 5 May 2003 08:29:06 -0000 1.4 *************** *** 242,245 **** --- 242,247 ---- { pid_t pid; + int devnull; + switch ( pid=fork() ) { *************** *** 257,261 **** // Detach ourself from the calling environment ! int devnull = open("/dev/null", O_RDWR); close(0); close(1); --- 259,263 ---- // Detach ourself from the calling environment ! devnull = open("/dev/null", O_RDWR); close(0); close(1); |
From: Patrick C. <pa...@us...> - 2003-05-05 08:28:19
|
Update of /cvsroot/linux-decnet/dnprogs/dnroute In directory sc8-pr-cvs1:/tmp/cvs-serv7587 Modified Files: Makefile Log Message: Add link path to libdnet Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** Makefile 4 May 2003 12:04:48 -0000 1.5 --- Makefile 5 May 2003 08:28:16 -0000 1.6 *************** *** 8,12 **** $(DNROUTE): get_neigh.c send_route.c routing_msg.c csum.c netlink/libnetlink.a ! $(CC) $(CFLAGS) -o $@ $^ -Lnetlink -ldnet -lnetlink netlink/libnetlink.a: --- 8,12 ---- $(DNROUTE): get_neigh.c send_route.c routing_msg.c csum.c netlink/libnetlink.a ! $(CC) $(CFLAGS) -o $@ $^ -L../libdnet -Lnetlink -ldnet -lnetlink netlink/libnetlink.a: |
From: Patrick C. <pa...@us...> - 2003-05-04 12:48:13
|
Update of /cvsroot/linux-decnet/dnprogs/dnroute In directory sc8-pr-cvs1:/tmp/cvs-serv25077 Modified Files: TODO get_neigh.c send_route.c Log Message: Don't add route for the local address as it breaks things. Index: TODO =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TODO 4 May 2003 11:55:34 -0000 1.1 --- TODO 4 May 2003 12:48:10 -0000 1.2 *************** *** 2,3 **** --- 2,5 ---- - Add routes based on incoming routing messages - Check outgoing routing messages are still correct + - Cope with the node having more than one address + - Cope with the node being in more than one area (or an area router) \ No newline at end of file Index: get_neigh.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/get_neigh.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** get_neigh.c 4 May 2003 11:53:31 -0000 1.2 --- get_neigh.c 4 May 2003 12:48:10 -0000 1.3 *************** *** 98,101 **** --- 98,105 ---- struct ndmsg *r = NLMSG_DATA(n); struct rtattr * tb[NDA_MAX+1]; + struct dn_naddr *exec_addr; + + /* Get our node address */ + exec_addr = getnodeadd(); memset(tb, 0, sizeof(tb)); *************** *** 146,152 **** /* TODO remove old nodes */ ! /* Set route using netlink */ ! if (add_route(faddr, interface) < 0) ! printf("Add route failed\n"); } } --- 150,160 ---- /* TODO remove old nodes */ ! ! /* Set route using netlink for other nodes, not us */ ! if ( (addr[0] != exec_addr->a_addr[0]) || ! (addr[1] != exec_addr->a_addr[1])) ! { ! add_route(faddr, interface); ! } } } Index: send_route.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnroute/send_route.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** send_route.c 4 May 2003 10:46:45 -0000 1.4 --- send_route.c 4 May 2003 12:48:10 -0000 1.5 *************** *** 155,159 **** struct dn_naddr *addr; ! /* Get out node address */ addr = getnodeadd(); dnet_socket = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_DNA_RT)); --- 155,159 ---- struct dn_naddr *addr; ! /* Get our node address */ addr = getnodeadd(); dnet_socket = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_DNA_RT)); |
From: Patrick C. <pa...@us...> - 2003-05-04 12:29:06
|
Update of /cvsroot/linux-decnet/dnprogs/debian In directory sc8-pr-cvs1:/tmp/cvs-serv17255/debian Modified Files: changelog control dnet-common.init.d dnet-progs.init.d rules Log Message: Add routing support to the Debian scripts Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/changelog,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** changelog 4 Nov 2002 11:20:33 -0000 1.22 --- changelog 4 May 2003 12:29:03 -0000 1.23 *************** *** 1,2 **** --- 1,12 ---- + dnprogs (2.23-1) unstable; urgency=low + + * sethost no longer gets stuck in a tight loop after shutting down + a node. + * Move libdnet-dev to libdevel section. + * dnroute is now included. + * Add routing support to init scripts + + -- Patrick Caulfield <pa...@de...> Sun, 4 May 2003 13:14:33 +0100 + dnprogs (2.22-1) unstable; urgency=low Index: control =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/control,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** control 1 Apr 2003 07:14:10 -0000 1.24 --- control 4 May 2003 12:29:03 -0000 1.25 *************** *** 8,12 **** Package: dnet-common Architecture: all ! Depends: debconf(>=0.5.00), debianutils(>=1.13), mawk | awk Priority: extra Section: net --- 8,12 ---- Package: dnet-common Architecture: all ! Depends: debconf(>=0.5.00), debianutils(>=1.13) Priority: extra Section: net Index: dnet-common.init.d =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/dnet-common.init.d,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dnet-common.init.d 15 Jul 2002 08:07:43 -0000 1.5 --- dnet-common.init.d 4 May 2003 12:29:03 -0000 1.6 *************** *** 19,25 **** --- 19,31 ---- # program you must do it some other way. # + # ROUTING specifies whether we should be a endnode (0), level 1 router (1) + # or aread router (2) + # + # PRIORITY specifies the routing priority. Defaults to 32. Note VMS defaults + # to 64, max is 127. [ ! -f /sbin/setether ] && exit 0 + . /etc/default/decnet *************** *** 30,33 **** --- 36,64 ---- setether="/sbin/setether $ADDR $interfaces" + + set_routing() + { + + # Enable routing if required + if [ -n "$ROUTING" ] + then + + # Set a default priority lower than VMS + if [ -z "$PRIORITY" ] + then + PRIORITY=32 + fi + + for i in /proc/sys/net/decnet/conf/eth* + do + echo $1 > $i/forwarding + echo $PRIORITY > $i/priority + done + fi + + } + + + case $1 in start) *************** *** 52,59 **** --- 83,92 ---- $setether echo "$ADDR" > /proc/sys/net/decnet/node_address + set_routing $ROUTING echo "done." ;; stop) + set_routing 0 ;; Index: dnet-progs.init.d =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/dnet-progs.init.d,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** dnet-progs.init.d 15 Jul 2002 08:07:43 -0000 1.6 --- dnet-progs.init.d 4 May 2003 12:29:03 -0000 1.7 *************** *** 8,12 **** # # ! # Daemons to start are defined in /etc/default/dnet-progs # --- 8,12 ---- # # ! # Daemons to start are defined in /etc/default/decnet # Index: rules =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/rules,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** rules 22 Jul 2002 16:14:53 -0000 1.14 --- rules 4 May 2003 12:29:03 -0000 1.15 *************** *** 29,33 **** echo "DNET_INTERFACES=\"all\"" >> debian/tmp/etc/default/decnet echo '# DNET_DAEMONS lists the daemons to start when dnet-progs is installed.' >> debian/tmp/etc/default/decnet ! echo "DNET_DAEMONS=\"dnetd phoned\"" >> debian/tmp/etc/default/decnet cp README debian/tmp/usr/share/doc/dnet-common cp Documentation/*README debian/tmp/usr/share/doc/dnet-common --- 29,38 ---- echo "DNET_INTERFACES=\"all\"" >> debian/tmp/etc/default/decnet echo '# DNET_DAEMONS lists the daemons to start when dnet-progs is installed.' >> debian/tmp/etc/default/decnet ! echo "DNET_DAEMONS=\"dnetd phoned #dnroute\"" >> debian/tmp/etc/default/decnet ! echo "#" >> debian/tmp/etc/default/decnet ! echo "#The following two lines enable routing, note that if you are" >> debian/tmp/etc/default/decnet ! echo "# being a router, then add dnroute to the DNET_DAEMONS too" >> debian/tmp/etc/default/decnet ! echo "#ROUTING=1" >> debian/tmp/etc/default/decnet ! echo "PRIORITY=32" >> debian/tmp/etc/default/decnet cp README debian/tmp/usr/share/doc/dnet-common cp Documentation/*README debian/tmp/usr/share/doc/dnet-common |
From: Patrick C. <pa...@us...> - 2003-05-04 12:29:06
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv17255 Modified Files: Makefile.common Log Message: Add routing support to the Debian scripts Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** Makefile.common 17 Oct 2002 13:50:26 -0000 1.19 --- Makefile.common 4 May 2003 12:29:02 -0000 1.20 *************** *** 54,58 **** MAJOR_VERSION=2 ! MINOR_VERSION=22 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) --- 54,58 ---- MAJOR_VERSION=2 ! MINOR_VERSION=23 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) |
From: Patrick C. <pa...@us...> - 2003-05-04 12:29:06
|
Update of /cvsroot/linux-decnet/dnprogs/dncopy In directory sc8-pr-cvs1:/tmp/cvs-serv17255/dncopy Modified Files: unixfile.cc Log Message: Add routing support to the Debian scripts Index: unixfile.cc =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dncopy/unixfile.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** unixfile.cc 27 Oct 2000 16:05:26 -0000 1.2 --- unixfile.cc 4 May 2003 12:29:03 -0000 1.3 *************** *** 1,5 **** /****************************************************************************** ! (c) 1998-1999 P.J. Caulfield pa...@ty... ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 1,5 ---- /****************************************************************************** ! (c) 1998-2003 P.J. Caulfield pa...@ty... ! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 22,26 **** #include "unixfile.h" ! // basename() is in libc but not in my header files extern "C" char *basename(const char *); --- 22,26 ---- #include "unixfile.h" ! // basename() is in libc but not in my header files extern "C" char *basename(const char *); *************** *** 69,73 **** { if (transfer_mode == MODE_RECORD) ! { char *out = buf; char *in = record_buffer + record_ptr; --- 69,73 ---- { if (transfer_mode == MODE_RECORD) ! { char *out = buf; char *in = record_buffer + record_ptr; *************** *** 82,86 **** record_buflen = ::fread(record_buffer, 1, RECORD_BUFSIZE, stream); record_ptr = 0; ! if (record_buflen <= 0) { if (reclen) --- 82,86 ---- record_buflen = ::fread(record_buffer, 1, RECORD_BUFSIZE, stream); record_ptr = 0; ! if (record_buflen <= 0) { if (reclen) *************** *** 122,126 **** if (reclen <= 0) return -1; ! // For block-mode we pad out the block to the // full block size. We never return a partial block. --- 122,126 ---- if (reclen <= 0) return -1; ! // For block-mode we pad out the block to the // full block size. We never return a partial block. *************** *** 172,176 **** } ! int unixfile::setup_link(unsigned int bufsize, int rfm, int rat, int xfer_mode) { // Save these for later --- 172,176 ---- } ! int unixfile::setup_link(unsigned int bufsize, int rfm, int rat, int xfer_mode) { // Save these for later *************** *** 185,193 **** record_buffer = (char *)malloc(RECORD_BUFSIZE); } ! return 0; }; ! int unixfile::next() { return FALSE; --- 185,193 ---- record_buffer = (char *)malloc(RECORD_BUFSIZE); } ! return 0; }; ! int unixfile::next() { return FALSE; *************** *** 206,210 **** static char realname[MAX_PATH]; static char tmpname[MAX_PATH]; ! strcpy(tmpname, this->filename); strcat(tmpname, "/"); --- 206,210 ---- static char realname[MAX_PATH]; static char tmpname[MAX_PATH]; ! strcpy(tmpname, this->filename); strcat(tmpname, "/"); *************** *** 277,281 **** unixfile::unixfile(char *name) { ! strcpy(filename, name); record_buffer = NULL; record_ptr = record_buflen = 0; --- 277,281 ---- unixfile::unixfile(char *name) { ! strcpy(filename, name); record_buffer = NULL; record_ptr = record_buflen = 0; |
From: Patrick C. <pa...@us...> - 2003-05-04 12:15:45
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1:/tmp/cvs-serv12461 Modified Files: rpm.spec Log Message: Add dnroute to RPM Index: rpm.spec =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/rpm.spec,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** rpm.spec 23 Jan 2001 16:37:19 -0000 1.5 --- rpm.spec 4 May 2003 12:15:42 -0000 1.6 *************** *** 35,38 **** --- 35,39 ---- %%PREFIX%%/sbin/dnetd %%PREFIX%%/sbin/fal + %%PREFIX%%/sbin/dnroute %%PREFIX%%/sbin/startnet %%PREFIX%%/sbin/decnetconf *************** *** 64,67 **** --- 65,69 ---- %%PREFIX%%/man/man5/vmsmail.conf.5 %%PREFIX%%/man/man8/fal.8 + %%PREFIX%%/man/man8/dnroute.8 %%PREFIX%%/man/man8/phoned.8 %%PREFIX%%/man/man8/dnetd.8 |