Date: Mon, 28 Jul 1997 14:27:08 +0200 (SAT) From: John Hay <jhay@mikom.csir.co.za> To: dennis@etinc.com (dennis) Cc: danny@panda.hilink.com.au, isp@FreeBSD.ORG Subject: Re: FreeBSD + IPX Message-ID: <199707281227.OAA06782@zibbi.mikom.csir.co.za> In-Reply-To: <3.0.32.19970724104816.00b5315c@etinc.com> from dennis at "Jul 24, 97 10:48:19 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> > Why not just support 802.3. Its not that difficult for pete's sake. If someone > asked me to change my entire network to suit a product with such a basic > defect I would be very suspicious of the reliability (and support) of the > feature. > if you can't make something as trivial as 802.3 work then there are lots > of more > complicated things that probably wont work as well. It isn't difficult to do if you just do either Ethernet_II or 802.3 on all interfaces. Here is some code for that. Just set sysctl net.link.ether. ipx.framing8023 to 1 to switch from Ethernet_II framing to 802.3 on ALL interfaces. The reason I don't commit this is that I would rather have a way to support more than one framing per interface or otherwise have it at least settable per interface. I have code to set it per interface, but it use the link1 flag, so it only works on cards that don't use that flag. O, this patch is against 2.2-STABLE. John -- John Hay -- John.Hay@mikom.csir.co.za --- if_ethersubr.c.v2.2.org Wed Jul 2 07:56:33 1997 +++ if_ethersubr.c Sun Jul 27 10:18:58 1997 @@ -101,6 +101,11 @@ extern u_char aarp_org_code[ 3 ]; #endif NETATALK +SYSCTL_NODE(_net_link_ether, PF_IPX, ipx, CTLFLAG_RW, 0, ""); +static int ipx8023; /* Should we do Ethernet_II framing for IPX? */ +SYSCTL_INT(_net_link_ether_ipx, OID_AUTO, framing8023, CTLFLAG_RW, + &ipx8023, 0, ""); + u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define senderr(e) { error = (e); goto bad;} @@ -177,7 +182,10 @@ { struct ifaddr *ia; - type = htons(ETHERTYPE_IPX); + if (ipx8023) + type = htons(m->m_pkthdr.len); + else + type = htons(ETHERTYPE_IPX); bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host), (caddr_t)edst, sizeof (edst)); for (ia = ifp->if_addrlist; ia != NULL; ia = ia->ifa_next) @@ -467,8 +475,13 @@ #endif #ifdef IPX case ETHERTYPE_IPX: - schednetisr(NETISR_IPX); - inq = &ipxintrq; + if (ipx8023 == 0) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + } else { + m_freem(m); + return; + } break; #endif #ifdef NS @@ -489,6 +502,18 @@ return; #endif NETATALK default: +#ifdef IPX + { + struct ipx *ipxp = mtod(m, struct ipx *); + + if (ipx8023 && (ipxp->ipx_sum == 0xffff) && + (ntohs(ipxp->ipx_len) <= m->m_pkthdr.len)) { + schednetisr(NETISR_IPX); + inq = &ipxintrq; + break; + } + } +#endif #ifdef NS checksum = mtod(m, ushort *); /* Novell 802.3 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707281227.OAA06782>