[comp.protocols.appletalk] UNIX programs for reloading KFPS4s

scp@SFI.SANTAFE.EDU ("Stephen C. Pope") (04/11/89)

Dan et al.

	I like the looks of the UNIX based FP4 manager code
recently posted to this group.  However, I've only Sun 4s
running OS4.0.1.  Is an update in the works for a 4.0 compatible
nit interface?  Is anyone else out there working on it,
or has done it already?  If not, I'll give it a try, but
I'm a bit green about these things.  Any pointers to the
things to look out for in the conversion?

Stephen C. Pope
Santa Fe Institute
scp@sfi.santafe.edu

rgb@ldgo.columbia.edu (bob bookbinder) (04/12/89)

	I compiled and tried the recently posted UNIX programs for administering
the KFPS4's. Running kboot crashed the Sun 3/260 (SUNOS 3.4.2) it was running on.
I have not had time to investigate, but I caution other folks trying the code
for the first time.  It's a great idea.

				Bob Bookbinder

----------------------------------------------------------------------------------
Lamont-Doherty Geological Observatory of Columbia University
Palisades, New York 10964
Analog: 	914-359-2900 X 498
Digital:	rgb@lamont.ldgo.columbia.edu
Fax:		914-359-5215
RF:		WA2LWE@WB2COY
-----------------------------------------------------------------------------------

tappan@bbn.com (Dan Tappan) (04/13/89)

In article <1358@muddy.ldgo.columbia.edu> rgb@ldgo.columbia.edu (bob bookbinder) writes:
>
>	I compiled and tried the recently posted UNIX programs for administering
>the KFPS4's. Running kboot crashed the Sun 3/260 (SUNOS 3.4.2) it was running on.
>I have not had time to investigate, but I caution other folks trying the code
>for the first time.  It's a great idea.
>
>				Bob Bookbinder
>

This is the second report I've heard of a crash. I suspect a bug in 
early versions of the NIT driver.

I should probably have specified SUNOS 3.5 in the manual page,
because that's all I've tried it under (and it does work under that).

jfm@ruddles.sprl.umich.edu.engin.umich.edu (John F. Mansfield) (04/13/89)

In article <1358@muddy.ldgo.columbia.edu> rgb@ldgo.columbia.edu (bob bookbinder) writes:
>
>	I compiled and tried the recently posted UNIX programs for administering
>the KFPS4's. Running kboot crashed the Sun 3/260 (SUNOS 3.4.2) it was running on.

Does this handle configuration and  download files? Does it work under
Sun OS 4.0.1? Who wrote it sounds very useful for the administration
of large numbers of boxes.
John Mansfield
North Campus Electron Microbeam Analysis Laboratory 2455 Hayward, Ann Arbor,
Michigan 48109-2143. 313-936-3352
Internet: jfm@ruddles.sprl.umich.edu or john_mansfield.um.cc.umich.edu

tappan@bbn.com (Dan Tappan) (04/14/89)

In article <38612@bbn.COM> tappan@BBN.COM (Dan Tappan) writes:
>In article <1358@muddy.ldgo.columbia.edu> rgb@ldgo.columbia.edu (bob bookbinder) writes:
>>
>>	I compiled and tried the recently posted UNIX programs for administering
>>the KFPS4's. Running kboot crashed the Sun 3/260 (SUNOS 3.4.2) it was running on.
>>I have not had time to investigate, but I caution other folks trying the code
>>for the first time.  It's a great idea.
>>
>>				Bob Bookbinder
>>
>
>This is the second report I've heard of a crash. I suspect a bug in 
>early versions of the NIT driver.
>
>I should probably have specified SUNOS 3.5 in the manual page,
>because that's all I've tried it under (and it does work under that).

Well, I investigated further. The programs work on a SUN 3/60 or 3/50,
but crash a SUN 3/1xx or 3/2xx.

The reason for this is that the 'nitlib' has hardwired into it to use
the 'le0' ethernet interface. The 100/200 machines use a 'ie0'
interface and, if you access 'le0' on them, rather than returning an
error NIT crashes the machine with a bus error.

The fix is: in nitlib.c change the line

char *nit_interface = "le0";

to

char *nit_interface = "ie0";

(of course, only do this if you want to run the programs on a 100/200
series machine. I wouldn't be suprised if trying to use 'ie0' crashed
a 3/60...)

budd@bu-cs.BU.EDU (Philip Budne) (04/15/89)

In article <38662@bbn.COM> tappan@BBN.COM (Dan Tappan) writes:
>In article <38612@bbn.COM> tappan@BBN.COM (Dan Tappan) writes:
>>This is the second report I've heard of a crash. I suspect a bug in 
>>early versions of the NIT driver.
I gave you the first report.  The kernel dies in sendto().

>.....
>The reason for this is that the 'nitlib' has hardwired into it to use
>the 'le0' ethernet interface. The 100/200 machines use a 'ie0'
>interface and, if you access 'le0' on them, rather than returning an
>error NIT crashes the machine with a bus error.
>
>The fix is: in nitlib.c change the line
>char *nit_interface = "le0";
>to
>char *nit_interface = "ie0";

Here's a fix to get the default interface name.  Of course you still
get stuck when you have both an ie0 and an ie1.  Perhaps both aarpd
and kboot need "-i" flags?

*** nitlib.c.orig	Sun Mar 12 02:02:56 1989
--- nitlib.c	Fri Apr 14 17:57:31 1989
***************
*** 35,41 ****
  /* Global variables */
  
  /* The name of the interface to NIT on */
! char *nit_interface = "le0";
  
  /* The packet types to receive */
  int nit_type = NT_ALLTYPES;
--- 35,41 ----
  /* Global variables */
  
  /* The name of the interface to NIT on */
! char *nit_interface = NULL;		/* budd - perhaps have -i iface? */
  
  /* The packet types to receive */
  int nit_type = NT_ALLTYPES;
***************
*** 91,97 ****
--- 91,100 ----
    int fd;
    struct ifreq ifr;
    struct hostent *hp;
+   struct ifconf ifc;			/* budd */
+   char ifbuf[ 100 ];			/* budd */
  
+ 
    if (getuid() != 0) {
      fprintf(stderr, "must run as root\n");
      exit(1);
***************
*** 105,110 ****
--- 108,127 ----
      return(0);
    }
  
+   /* budd... */
+   ifc.ifc_len = sizeof( ifbuf );
+   ifc.ifc_buf = ifbuf;
+ 
+   if( nit_interface == NULL ) {
+       /* get default interface name */
+       if( ioctl(nit_socket, SIOCGIFCONF, (char *)&ifc) < 0 ) {
+ 	  perror( "nit ifconf ioctl");
+ 	  return( 0 );
+       }
+       nit_interface = ifc.ifc_req->ifr_name;
+       printf("Using interface %s\n", nit_interface );
+   }
+   /* ...budd */
    strncpy(nit_sockaddr.snit_ifname, nit_interface,
  	  sizeof(nit_sockaddr.snit_ifname));
    if (bind(nit_socket,