From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 14:32:56 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EEFA16A412 for ; Tue, 2 Jan 2007 14:32:56 +0000 (UTC) (envelope-from thinker@branda.to) Received: from msr26.hinet.net (msr26.hinet.net [168.95.4.126]) by mx1.freebsd.org (Postfix) with ESMTP id 40FAE13C45A for ; Tue, 2 Jan 2007 14:32:55 +0000 (UTC) (envelope-from thinker@branda.to) Received: from [192.168.1.39] (220-139-94-134.dynamic.hinet.net [220.139.94.134]) by msr26.hinet.net (8.9.3/8.9.3) with ESMTP id WAA09578; Tue, 2 Jan 2007 22:21:57 +0800 (CST) Message-ID: <459A6A23.1040800@branda.to> Date: Tue, 02 Jan 2007 22:20:19 +0800 From: Thinker User-Agent: Thunderbird 1.5.0.8 (X11/20061228) MIME-Version: 1.0 To: Sharad Chandra References: <200701021740.32110.sharadc@niksun.com> In-Reply-To: <200701021740.32110.sharadc@niksun.com> X-Enigmail-Version: 0.94.1.0 OpenPGP: url=http://heaven.branda.to/~thinker/GinGin_CGI.py/get_afile/1/thinker-pgp.asc Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Get IP from ttyname(3) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2007 14:32:56 -0000 Sharad Chandra wrote: > Hi all, I was reading man page of ttyname(3). I thought if i have > ttyname then using that can i have IP address of connected host?. > like in sshd logs on log file like. You can read login informations from utmp(8). /var/run/utmp is a array of utmp(8). please check man page for more information. -- Thinker Li - thinker@branda.to thinker.li@gmail.com http://heaven.branda.to/~thinker/GinGin_CGI.py