Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 1998 19:36:17 -0600
From:      dannyman <djhoward@uiuc.edu>
To:        Chuck Robey <chuckr@glue.umd.edu>, "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        julian@FreeBSD.ORG, ports@FreeBSD.ORG
Subject:   Re: Netatalk port broken?
Message-ID:  <19980223193617.21976@urh.uiuc.edu>
In-Reply-To: <Pine.BSF.3.96.980223191441.14406r-100000@localhost>; from Chuck Robey on Mon, Feb 23, 1998 at 07:16:38PM -0500
References:  <2754.888278480@time.cdrom.com> <Pine.BSF.3.96.980223191441.14406r-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help

--D1cGYuMQKO5XBE6g
Content-Type: text/plain; charset=us-ascii

On Mon, Feb 23, 1998 at 07:16:38PM -0500, Chuck Robey wrote:

> Uhh, curious ... how come you can't use the netatalk that's part of
> current itself?  Doesn't it work?  I haven't tried it myself ... but I
> will soon (to get this old mac over here talking to me).
> 
> options         NETATALK                #Appletalk communications protocols

NetATalk requires this to be enabled in the kernel for the networking to
work. It's rather dull though without the attendent deamons.

The attached patch will get the port working. I have notified the port
maintainer, who says he has not included the patch in the port because it
will break under -stable ... if anyone can help him set up the Makefile so
that it will apply the patch only if uname -r =~ /CURRENT/ then please
contact him!

This patch is taken from http://www.umich.edu/~rsug/netatalk/patches/other/

Also, I attach my /usr/local/etc/rc.d/netatalk.sh for educational purposes.
:)

dan

-- 
  //Dan   -=-     This message brought to you by djhoward@uiuc.edu    -=-
\\/yori   -=-    Information - http://www.uiuc.edu/ph/www/djhoward/   -=-
aiokomete -=-   Our Honored Symbol deserves an Honorable Retirement

--D1cGYuMQKO5XBE6g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="freebsd3.diff"

*** netatalk-dist/etc/atalkd/main.c	Mon Oct 21 15:45:03 1996
--- netatalk-dist.new/etc/atalkd/main.c	Mon Jul  7 10:51:22 1997
***************
*** 18,23 ****
--- 18,24 ----
  #include <sys/errno.h>
  #include <net/if.h>
  #include <net/route.h>
+ #include <net/if_dl.h>
  
  #include <signal.h>
  #include <syslog.h>
***************
*** 1149,1162 ****
  		bootaddr( ciface );
  	    }
  	} else {
  	    /* configure multicast for this interface */
! 	    bzero( &sa, sizeof( struct sockaddr ));
! 	    bcopy( ethermulti, sa.sa_data, sizeof( ethermulti ));
! 	    if ( ifconfig( iface->i_name, SIOCADDMULTI, &sa )) {
  		syslog( LOG_ERR, "addmulti: %m" );
  		exit( 1 );
  	    }
- 
  	    zip_getnetinfo( iface );
  	}
      }
--- 1150,1170 ----
  		bootaddr( ciface );
  	    }
  	} else {
+ 	    struct sockaddr_dl *sdl = (struct sockaddr_dl *)&sa;
  	    /* configure multicast for this interface */
! 	    bzero( sdl, sizeof( struct sockaddr ));
! 	    sdl->sdl_family = AF_LINK;
! 	    sdl->sdl_nlen = 0 /* strlen(iface->i_name)*/;
! 	    /*strncpy(sdl->sdl_data, iface->i_name, sdl->sdl_nlen);*/
! 	    bcopy( ethermulti, LLADDR(sdl), sizeof( ethermulti ));
! 	    sdl->sdl_alen = sizeof( ethermulti );
! 	    sdl->sdl_len = sizeof(*sdl);
! 			/* (sdl->sdl_data + sdl->sdl_alen + sdl->sdl_nlen) 
! 				- (char *)sdl; */
! 	    if ( ifconfig( iface->i_name, SIOCADDMULTI, sdl )) {
  		syslog( LOG_ERR, "addmulti: %m" );
  		exit( 1 );
  	    }
  	    zip_getnetinfo( iface );
  	}
      }
diff -c netatalk-dist/etc/atalkd/nbp.c netatalk-dist.new/etc/atalkd/nbp.c
*** netatalk-dist/etc/atalkd/nbp.c	Sat Oct  5 08:17:53 1996
--- netatalk-dist.new/etc/atalkd/nbp.c	Mon Jul  7 11:07:01 1997
***************
*** 7,13 ****
--- 7,15 ----
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <sys/ioctl.h>
+ #include <sys/time.h>
  #include <net/if.h>
+ #include <net/if_dl.h>
  #include <netatalk/at.h>
  #include <atalk/ddp.h>
  #include <atalk/nbp.h>
***************
*** 185,190 ****
--- 187,201 ----
  		for ( l = iface->i_rt->rt_zt; l; l = l->l_next ) {
  		    if ( zt == (struct ziptab *)l->l_data ) {
  			/* add multicast */
+ 			struct sockaddr_dl *sdl = (struct sockaddr_dl *)&sa;
+ 			sdl->sdl_family = AF_LINK;
+ 			sdl->sdl_nlen = 0;
+ 			bcopy( zt->zt_bcast, sdl->sdl_data, sizeof(ethermulti));
+ 			sdl->sdl_alen = sizeof(ethermulti);
+ 			sdl->sdl_len = sizeof (*sdl);
+ 				/* (sdl->sdl_data
+ 				+ sdl->sdl_alen + sdl->sdl_nlen)  
+ 				- (char *)sdl; */
  			if ( ifconfig( iface->i_name, SIOCADDMULTI, &sa )) {
  			    syslog( LOG_ERR, "addmulti: %m" );
  			    exit( 1 );
diff -c netatalk-dist/etc/atalkd/rtmp.c netatalk-dist.new/etc/atalkd/rtmp.c
*** netatalk-dist/etc/atalkd/rtmp.c	Wed Sep 18 12:05:18 1996
--- netatalk-dist.new/etc/atalkd/rtmp.c	Thu Jun  5 17:48:55 1997
***************
*** 7,12 ****
--- 7,13 ----
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <sys/ioctl.h>
+ #include <sys/time.h>
  #include <net/if.h>
  #include <net/route.h>
  #include <netatalk/endian.h>

--D1cGYuMQKO5XBE6g
Content-Type: application/x-sh
Content-Disposition: attachment; filename="netatalk.sh"

#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# other processes.
#

case $1 in
	start)	echo -n ' netatalk'
		/usr/local/libexec/atalkd
		/usr/local/bin/nbprgstr -p 4 Stumpy:Workstation
		/usr/local/bin/nbprgstr -p 4 Stumpy:netatalk
		/usr/local/bin/nbprgstr -p 252 "Stumpy:  AMD/K5 (`uname -rs`)"
#		/usr/local/libexec/papd
		/usr/local/libexec/afpd -n Stumpy
		;;
	stop)	killall afpd
#		killall papd
		killall atalkd
		;;
esac

--D1cGYuMQKO5XBE6g--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980223193617.21976>