From owner-freebsd-net Sat Oct 12 16:19: 7 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 964F637B401 for ; Sat, 12 Oct 2002 16:19:06 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11D1943EBE for ; Sat, 12 Oct 2002 16:19:06 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9CNJ5pk009342 for ; Sat, 12 Oct 2002 17:19:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 12 Oct 2002 17:18:09 -0600 (MDT) Message-Id: <20021012.171809.93306957.imp@bsdimp.com> To: net@freebsd.org Subject: Comments Please From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org OK. I'm not a network wonk, so I thought I'd run this by people here. What do people think. Warner --- //depot/user/imp/freebsd-imp/sys/net/if_ethersubr.c 2002/10/06 21:18:24 +++ //depot/user/imp/newcard/net/if_ethersubr.c 2002/10/11 22:58:57 @@ -124,7 +124,8 @@ static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); -u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +u_char etherbroadcastaddr[ETHER_ADDR_LEN] = + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #define senderr(e) do { error = (e); goto bad;} while (0) #define IFP2AC(IFP) ((struct arpcom *)IFP) @@ -149,7 +150,7 @@ { short type; int error = 0, hdrcmplt = 0; - u_char esrc[6], edst[6]; + u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN]; register struct rtentry *rt; register struct ether_header *eh; int loop_copy = 0; @@ -859,8 +860,8 @@ register struct sockaddr_dl *sdl; ifp->if_type = IFT_ETHER; - ifp->if_addrlen = 6; - ifp->if_hdrlen = 14; + ifp->if_addrlen = ETHER_ADDR_LEN; + ifp->if_hdrlen = ETHER_HDR_LEN; if_attach(ifp); ifp->if_mtu = ETHERMTU; ifp->if_resolvemulti = ether_resolvemulti; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message