Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
char * to sockaddr_in

Hi All,

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

Old 06-19-2009, 01:49 PM   #2
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
did you mean sendto??

This forum post maybe of interest to you

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

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

Original Poster
Rep: Reputation: 0

That`s what I need



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 08:41 AM
If I get invalid conversion from `const char*' to `char' what should I be lookin for? RHLinuxGUY Programming 5 03-12-2006 11:35 PM
about struct sockaddr_in greghua Programming 11 07-29-2005 12:01 PM
inet_ntoa() problem with array of sockaddr_in ahogg Programming 5 05-05-2004 12:21 PM
sockaddr_in and sockaddr AquamaN Programming 4 05-02-2004 04:52 PM > Forums > Linux Forums > Linux - Newbie

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

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