Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 1999 17:17:07 -0500 (EST)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        current@FreeBSD.ORG
Subject:   CAP port and non-IP multicast
Message-ID:  <199901302217.RAA00129@skynet.ctr.columbia.edu>

next in thread | raw e-mail | index | archive | help
Somebody wrote me recently to tell me they were having trouble getting
the Columbia Appletalk package to work with a PCI ethernet card. Looking
through both the Columbia Appletalk code and the kernel, I think the
problem is a general one not necessarily related to a given ethernet
driver. I'm not sure what the proper fix is though.

The CAP code contains a module called cap60/support/ethertalk/bpfiltp.c
which contains library support code for libcap when the package is
built with EtherTalk Phase 2 support. As the name implies, it works
with BPF, but it also contains the pi_addmulti() routine. The aarpd
program uses this function to join the 09:00:07:ff:ff:ff multicast
group. Since this is not an IP multicast group, you have to specify
something besides AF_INET as the family when using SIOCADDMULTI to
join.

The question is, what should this something else be. In 2.2.x, you
have to use AF_UNSPEC, but in 3.x and up, you have to use AF_LINK.
The CAP port uses AF_UNSPEC in both cases, which is incorrect if
you're building the port on a 3.0 (or 4.0) host.

What's the right way to fix this? There are really two possibilities:
1) change bpfiltp.c so that it conditionally uses AF_UNSPEC or AF_LINK
depending on the OS release on which the port is being compiled, or
2) change sys/net/if_ethersubr.c so that it treats AF_UNSPEC and
AF_LINK the same. I expect changing the CAP code would be the more
'politically correct' approach, but it doesn't seem unreasonable to
allow backwards compatibility in the kernel code either.


-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================

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



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