LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2007, 09:44 AM   #1
nesta
Member
 
Registered: Aug 2006
Posts: 100

Rep: Reputation: 15
is sockets programming my only way?


hi all,
i have an OMAP kit that is connected to my pc using network-cable.
if i wanna write programs that can communicate with my kit,

so the only way to do that is through sockets programming?

isnt there any other way to do that?

note that my knowledge for C under linux or shell-scripts
not bad?

thanks in advance
 
Old 03-23-2007, 10:37 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If your OMAP device (and I don't know what that is) is configurable as an IP host then you can communicate with it through a standard sockets interface. If it already has some kind of interactive user interface, you may be able to simply attach to it with telnet. Ready-made tools such as netcat may also be useful.
If you want to attach to it programmatically, your easiest means will be to use IP sockets; either using TCP streams (SOCK_STREAM) or UPD datagrams (SOCK_DGRAM). If the target device does not have an IP stack, you will need to use raw datagrams (SOCK_RAW), and formulate your own packets to be sent as raw ethernet packets. Access at the SOCK_RAW level requires root privelages. The processs of formulating and parsing data at this level is probably much more difficult than the process of putting and getting the data to and from the wire.
From the tone of your question, it sounds like you are reluctant to attempt this level of programming, however it is not as difficult as you may think. A good primer on the subject is Beej's Guide to Network Programming Using Internet Sockets. Come back here with more specific questions if you get down this road. Good luck.
--- rod.
 
  


Reply



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
BSD Sockets programming in C with examples nhydra LinuxAnswers Discussion 0 02-18-2007 06:45 PM
Sockets Programming pink_lady Programming 4 05-31-2006 07:56 AM
Question about Sockets Programming sibtay Programming 2 09-24-2004 05:04 PM
Sockets Programming-Getting Started funkymunky Programming 3 01-09-2004 12:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:20 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
Open Source Consulting | Domain Registration