Re: sysvinit: Regarding ipAddr printed by utmpdump

2011-02-10 Thread Henrique de Moraes Holschuh
On Wed, 09 Feb 2011, Navdeep Bhatia wrote: > This code should be updated to call inet_ntop and should be checked whether > the ut_addr field contains IPV4 or IPV6 address. The check can be made > either by checking ut_addr_v6[1:3] for zero (this is based on the assumption > that login program zeroe

sysvinit: Regarding ipAddr printed by utmpdump

2011-02-09 Thread Navdeep Bhatia
Hi, The addr field of the output from utmpdump contains the ip address of the connection. This is obtained by calling inet_ntoa on the ut.ut_addr field (as depicted in the code below, utmpdump.c, Release 2.88). But in case the ip address is an IPV6 address, the output contains the wrong ip address