From owner-freebsd-hackers Mon Sep 1 12:01:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA15260 for hackers-outgoing; Mon, 1 Sep 1997 12:01:24 -0700 (PDT) Received: from gaia.coppe.ufrj.br (jonny@[146.164.5.200]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA15160 for ; Mon, 1 Sep 1997 11:59:14 -0700 (PDT) Received: (from jonny@localhost) by gaia.coppe.ufrj.br (8.8.7/8.8.7) id PAA08958; Mon, 1 Sep 1997 15:58:28 -0300 (EST) From: Joao Carlos Mendes Luis Message-Id: <199709011858.PAA08958@gaia.coppe.ufrj.br> Subject: Re: IPX problems In-Reply-To: <199709011630.SAA28625@zibbi.mikom.csir.co.za> from John Hay at "Sep 1, 97 06:30:18 pm" To: jhay@mikom.csir.co.za (John Hay) Date: Mon, 1 Sep 1997 15:58:28 -0300 (EST) Cc: jonny@mailhost.coppe.ufrj.br, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk #define quoting(John Hay) // > Here's an output of my ifconfig: // > // ... // > vx0: flags=8a43 mtu 1500 // > inet 146.164.63.4 netmask 0xffffff00 broadcast 146.164.63.255 // > ipx 92a43f00.60H // > ether 00:60:97:a7:ab:42 // ... // > // > Why does the vx0 interface gets the .60H node address instead of 006097a7ab42 ? // // I would guess that it is because the vx driver define struct vx_softc // with something before struct arpcom. As far as I know it should start // its structure with "struct arpcom", because the arp code and also // ether_ioctl depends on it being right at the beginning. Try moving // "struct arpcom arpcom" to before "int unit" in "struct vx_softc" in // the file sys/dev/vx/if_vx_reg.h. It works. Thanks. May someone commit this to RELENG_2_2 ? =========================================================================== --- dev/vx/if_vxreg.h.old Mon Sep 1 15:53:31 1997 +++ dev/vx/if_vxreg.h Mon Sep 1 15:44:09 1997 @@ -49,8 +49,8 @@ * Ethernet software status per interface. */ struct vx_softc { - int unit; /* unit number */ struct arpcom arpcom; /* Ethernet common part */ + int unit; /* unit number */ u_int vx_io_addr; /* i/o bus address */ #define MAX_MBS 8 /* # of mbufs we keep around */ struct mbuf *mb[MAX_MBS]; /* spare mbuf storage. */ =========================================================================== Anyway, John, isn't it wrong to assume relative positions of data in a struct ? // // John // -- // John Hay -- John.Hay@mikom.csir.co.za // Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 jonny@coppe.ufrj.br Universidade Federal do Rio de Janeiro UFRJ/COPPE/CISI PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2 83 5F E3 26 BF 0F EA 67