Re: how to get the numbers-and-dots notation back from network byte
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: how to get the numbers-and-dots notation back from network byte




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: how to get the numbers-and-dots notation back from network byte  
Måns Rullgård


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:21 PM

wim.deprez+google@student.luc.ac.be (Wim Deprez) writes:

> Hello group,
>
> my input is a network byte order long that represents an ip address,
> and I want to the char * numbers-and-dots notation back, for example
> to write it out to the user or something. How do I do that?
>
> a stupid example:
>
> int main (int argc, char* argv[])
> {
> 	unsigned long ma = inet_addr("185.21.0.9");
>
> 	printf("%s",XXX(ma));
> 	return 0;
> }
>
> where XXX(ma) becomes "185.21.0.9" again.

inet_ntoa()

--
Måns Rullgård
mru@mru.ath.cx





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:35 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register