netdev
[Top] [All Lists]

Function to read IP address in dot format

To: netdev@xxxxxxxxxxx
Subject: Function to read IP address in dot format
From: linux lover <linux_lover2004@xxxxxxxxx>
Date: Sun, 10 Apr 2005 23:05:10 -0700 (PDT)
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=tj/lYJeTw187+EL+qIuhZC9JD+QSWqYPVubCgY7yEYpc8Ql4KEDcZk6rj7G2Jt2r0ir0jI2YuuYb4x8vJ2MRyOXUiSlSl3Qv3aJoPblaMjjWq1iVfLY7q8uO1A6l6Aisbi/w/XysxIOMnrilZQIuD6JGEaSjn42sSwvG/oSuW7Q= ;
Sender: netdev-bounce@xxxxxxxxxxx
Hello,
          what is the function to read IP address in
kernel code as human readable dot quad format? IP
address are unsigned int's in ip.h file as
        __u32   saddr;
        __u32   daddr;
         In ip_build_xmit ip header gets IP addresses
from rtable struct as
iph->saddr=rt->rt_src;
iph->daddr=rt->rt_dst;
           Now if i want to know to which ip current
packet is being sent i am using printks but it prints
iph->saddr in int format not in user readable format.
how to do that?
regards,
linux_lover



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

<Prev in Thread] Current Thread [Next in Thread>