From owner-svn-src-all@FreeBSD.ORG Thu Nov 12 11:54:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742831065672; Thu, 12 Nov 2009 11:54:13 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 631DE8FC1A; Thu, 12 Nov 2009 11:54:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nACBsDwQ029776; Thu, 12 Nov 2009 11:54:13 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nACBsDX7029775; Thu, 12 Nov 2009 11:54:13 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <200911121154.nACBsDX7029775@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 12 Nov 2009 11:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199221 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 11:54:13 -0000 Author: ume Date: Thu Nov 12 11:54:12 2009 New Revision: 199221 URL: http://svn.freebsd.org/changeset/base/199221 Log: Add missing IEEE1394 support dropped during merge from NetBSD. Modified: head/lib/libc/net/getnameinfo.c Modified: head/lib/libc/net/getnameinfo.c ============================================================================== --- head/lib/libc/net/getnameinfo.c Thu Nov 12 11:27:07 2009 (r199220) +++ head/lib/libc/net/getnameinfo.c Thu Nov 12 11:54:12 2009 (r199221) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -385,6 +386,7 @@ getnameinfo_link(const struct sockaddr * { const struct sockaddr_dl *sdl = (const struct sockaddr_dl *)(const void *)sa; + const struct fw_hwaddr *iha; int n; if (serv != NULL && servlen > 0) @@ -400,6 +402,15 @@ getnameinfo_link(const struct sockaddr * } switch (sdl->sdl_type) { + case IFT_IEEE1394: + if (sdl->sdl_alen < sizeof(iha->sender_unique_ID_hi) + + sizeof(iha->sender_unique_ID_lo)) + return EAI_FAMILY; + iha = (const struct fw_hwaddr *)(const void *)LLADDR(sdl); + return hexname((const u_int8_t *)&iha->sender_unique_ID_hi, + sizeof(iha->sender_unique_ID_hi) + + sizeof(iha->sender_unique_ID_lo), + host, hostlen); /* * The following have zero-length addresses. * IFT_ATM (net/if_atmsubr.c)