From owner-freebsd-net@FreeBSD.ORG Wed Aug 22 12:46:18 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F20B106566C; Wed, 22 Aug 2012 12:46:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9DF8FC15; Wed, 22 Aug 2012 12:46:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 683ADB95D; Wed, 22 Aug 2012 08:46:17 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 22 Aug 2012 08:02:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <50324DB4.6080905@cabletv.dp.ua> <420BA06C-C776-47DB-B3BB-F1414C115F99@bsdimp.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208220802.14588.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Aug 2012 08:46:17 -0400 (EDT) Cc: Wojciech Puchar , Adrian Chadd , Mitya , Warner Losh , freebsd-net@freebsd.org Subject: Re: Replace bcopy() to update ether_addr X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 12:46:18 -0000 On Tuesday, August 21, 2012 12:34:42 pm Adrian Chadd wrote: > Hi, > > What about just creating an ETHER_ADDR_COPY(dst, src) and putting that > in a relevant include file, then hide the ugliness there? > > The same benefits will likely appear when copying wifi MAC addresses > to/from headers. > > Thanks, I'm glad someone noticed this. I doubt we even _need_ the ugliness. We should just use *dst = *src unless there is a compelling reason not to. -- John Baldwin