Re: Function to read IP address in dot format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>            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
> 

Although I am not aware of any direct function, you can always take 8
bits at a time and convert the binary to decimal and get it in the
normal form.

Hope, my answer doesn't sound too stupid :)

-Shri

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux