Patch #: 53 Type: operational change Priority: none Modification: make NBP lookups work with Native EtherTalk & no router Submitted: David Hornsby Reported: Henry Bland Reported: Akira SAWADA Archived: munnari.OZ.AU mac/cap.patches/cap60.patch053 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch053' Summary: if no router broadcast lookup rather than NBP bridge request File: cap60/lib/cap/abnbp.c File: cap60/support/ethertalk/abelap.c *** lib/cap/abnbp.c.orig Wed May 29 22:41:01 1991 --- lib/cap/abnbp.c Thu Sep 19 13:35:46 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1991/05/29 12:40:53 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abnbp.c,v 2.3 1991/05/29 12:40:53 djh Rel djh $ ! * $Revision: 2.3 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/09/19 03:35:22 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abnbp.c,v 2.4 1991/09/19 03:35:22 djh Rel djh $ ! * $Revision: 2.4 $ */ /* *************** *** 128,136 **** --- 128,145 ---- int async; { int maxx; + import word this_net; OSErr GetBridgeAddress(); GetBridgeAddress(&abr->nbpAddress); + if (abr->nbpAddress.node == 0x00) { /* no router */ + abr->nbpAddress.node = 0xff; + #ifdef PHASE2 + abr->nbpAddress.net = 0x0000; /* a local broadcast */ + #else PHASE2 + abr->nbpAddress.net = this_net; + #endif PHASE2 + } maxx = abr->nbpBufSize/sizeof(NBPTEntry); /* max entries */ abr->nbpMaxEnt = /* set it up */ *************** *** 356,362 **** nbp.control = nbpLkUp; break; case tNBPLookUp: ! nbp.control = nbpBrRq; /* function is lookup with bridge */ break; case tNBPDelete: nbp.tcnt = 0; /* make sure zero */ --- 365,374 ---- nbp.control = nbpLkUp; break; case tNBPLookUp: ! if (nbpr->nbpAddress.node == 0xff) ! nbp.control = nbpLkUp; /* no bridge, just do lookup */ ! else ! nbp.control = nbpBrRq; /* function is lookup with bridge */ break; case tNBPDelete: nbp.tcnt = 0; /* make sure zero */ *** support/ethertalk/abelap.c.orig Fri Jul 26 01:58:02 1991 --- support/ethertalk/abelap.c Thu Sep 19 13:41:34 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1991/07/25 15:57:38 $ ! * $Header: /mac/src/cap60/support/ethertalk/RCS/abelap.c,v 2.5 1991/07/25 15:57:38 djh Rel djh $ ! * $Revision: 2.5 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/09/19 03:41:13 $ ! * $Header: /mac/src/cap60/support/ethertalk/RCS/abelap.c,v 2.6 1991/09/19 03:41:13 djh Rel djh $ ! * $Revision: 2.6 $ */ /* *************** *** 718,725 **** /* Use KIP if loopback, else ether */ if ((lap_proto != LAP_ETALK) ! || (ddp->dstNet == this_net ! && (ddp->dstNode == this_node || ddp->dstNode == 0xff))) { /* establish dest socket */ destskt = (word)htons(ddp2ipskt(ddp->dstSkt)); if (destskt == 0) /* byte swapped zero is still zero */ --- 718,728 ---- /* Use KIP if loopback, else ether */ if ((lap_proto != LAP_ETALK) ! || ((ddp->dstNet == this_net ! #ifdef PHASE2 ! || (ddp->dstNet == 0x0000 && ddp->dstNode == 0xff) ! #endif PHASE2 ! ) && (ddp->dstNode == this_node || ddp->dstNode == 0xff))) { /* establish dest socket */ destskt = (word)htons(ddp2ipskt(ddp->dstSkt)); if (destskt == 0) /* byte swapped zero is still zero */ *************** *** 739,745 **** msg.msg_accrightslen = 0; if ((err = sendmsg(fd,&msg,0)) < 0) perror("abwrite"); ! return(err); } #ifdef PHASE2 /* delete the unwanted LAP header */ --- 742,749 ---- msg.msg_accrightslen = 0; if ((err = sendmsg(fd,&msg,0)) < 0) perror("abwrite"); ! if (ddp->dstNode != 0xff) ! return(err); } #ifdef PHASE2 /* delete the unwanted LAP header */ *** README.orig Thu Sep 19 13:42:49 1991 --- README Thu Sep 19 13:42:36 1991 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 52, August 1991 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 53, August 1991 Introduction ------------