LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2009, 07:41 PM   #1
nmnir2
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
char * to sockaddr_in


Hi All,

I have an IP address like "10.0.0.2" and I need to use sensto inorder to send a UDP message to that machine.
How do I parse it to struct sockaddr_in???

Thanks,
Nahum
 
Old 06-19-2009, 12:49 PM   #2
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
did you mean sendto??

This forum post maybe of interest to you

https://neworder.box.sk/forum/topic5...er-sendto.html

Last edited by tekhead2; 06-19-2009 at 12:51 PM.
 
Old 06-19-2009, 01:02 PM   #3
noctilucent
Member
 
Registered: Jun 2009
Distribution: slackware
Posts: 123

Rep: Reputation: 34
Perhaps inet_aton / inet_pton can help you.
 
Old 06-20-2009, 02:07 PM   #4
nmnir2
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks

That`s what I need

Nahum
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sockaddr_in and sockaddr_un: difference? cleopard Programming 4 09-20-2011 07:41 AM
If I get invalid conversion from `const char*' to `char' what should I be lookin for? RHLinuxGUY Programming 5 03-12-2006 10:35 PM
about struct sockaddr_in greghua Programming 11 07-29-2005 11:01 AM
inet_ntoa() problem with array of sockaddr_in ahogg Programming 5 05-05-2004 11:21 AM
sockaddr_in and sockaddr AquamaN Programming 4 05-02-2004 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration