From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 15:32:14 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922781065673 for ; Wed, 25 Jul 2012 15:32:14 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 517978FC12 for ; Wed, 25 Jul 2012 15:32:14 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 19F4D7300A; Wed, 25 Jul 2012 17:52:11 +0200 (CEST) Date: Wed, 25 Jul 2012 17:52:11 +0200 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20120725155211.GA33971@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: RFC: libkern version of inet_ntoa_r X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 15:32:14 -0000 During some ipfw/dummynet cleanup i noticed that the libkern version of inet_ntoa_r() is missing the buffer size argument that is present in the libc counterpart. Any objection if i fix it ? The change is trivial and the function is used only in a small number of places, see below (some of which are even commented out). # (cd ~/FreeBSD/head/sys; grep -r inet_ntoa_r .) ./libkern/inet_ntoa.c:inet_ntoa_r(struct in_addr ina, char *buf) ./net/flowtable.c: inet_ntoa_r(ssin->sin_addr, saddr); ./net/flowtable.c: inet_ntoa_r(dsin->sin_addr, daddr); ./net/flowtable.c: inet_ntoa_r(*(struct in_addr *) &dsin->sin_addr, daddr); ./net/flowtable.c: inet_ntoa_r(*(struct in_addr *) &hashkey[2], daddr); ./net/flowtable.c: inet_ntoa_r(*(struct in_addr *) &hashkey[1], saddr); ./net/if_llatbl.c: inet_ntoa_r(sin->sin_addr, l3s); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, src); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, dst); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, src); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, dst); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, src); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, dst); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, src); ./netinet/ipfw/ip_fw_dynamic.c: inet_ntoa_r(da, dst); ./netinet/ipfw/ip_fw_log.c: inet_ntoa_r(ip->ip_src, src); ./netinet/ipfw/ip_fw_log.c: inet_ntoa_r(ip->ip_dst, dst); ./netinet/in.h:char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */ ./netinet/in_pcb.c: inet_ntoa_r(inc->inc_laddr, laddr_str); ./netinet/in_pcb.c: inet_ntoa_r(inc->inc_faddr, faddr_str); ./netinet/tcp_subr.c: inet_ntoa_r(inc->inc_faddr, sp); ./netinet/tcp_subr.c: inet_ntoa_r(inc->inc_laddr, sp); ./netinet/tcp_subr.c: inet_ntoa_r(ip->ip_src, sp); ./netinet/tcp_subr.c: inet_ntoa_r(ip->ip_dst, sp); cheers luigi