LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2009, 09:01 AM   #1
sdad
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Rep: Reputation: 0
Suggestions to get me started with sockets programming


I'd like to examine network programming at the packet level, never done this before, so not really sure what to ask. I'd like to examine the tcp/ip stack, down to the contents of a packet, and make decisions/actions based on that content (do some routing, blocking, data manipulation, etc). Is there a "best" language that I should use for this type of low-level control? I lean toward a interpretive rather than compiled language, as this would speed up my interaction time with writing code and seeing the results, but I don't want to limit my control too extensively. Any recommendations for tutorials/books that an entry person would find useful? I will need to set up a box or two as my lab. Any hints on a suggested test only architecture? I assume that to help move things along a server/client and monitor software would be needed in each box, what should I consider there? Any other software tools? What did I miss?

This is a lab type of exercise, not aimed at a practical solution to any specific problem. I just want to really learn this area well.
 
Old 10-25-2009, 10:19 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by sdad View Post
I'd like to examine network programming at the packet level, never done this before, so not really sure what to ask. I'd like to examine the tcp/ip stack, down to the contents of a packet, and make decisions/actions based on that content (do some routing, blocking, data manipulation, etc). Is there a "best" language that I should use for this type of low-level control? I lean toward a interpretive rather than compiled language, as this would speed up my interaction time with writing code and seeing the results, but I don't want to limit my control too extensively. Any recommendations for tutorials/books that an entry person would find useful? I will need to set up a box or two as my lab. Any hints on a suggested test only architecture? I assume that to help move things along a server/client and monitor software would be needed in each box, what should I consider there? Any other software tools? What did I miss?

This is a lab type of exercise, not aimed at a practical solution to any specific problem. I just want to really learn this area well.
for book, i found UNIX Network Programing 2nd Edition very helpful. i used that book for UDP programming it was very easy to follow. Safari E-books has a copy of it and if your lab has access to Safari, you can read it there. for Kernel level, Understanding Linux Network Internals looks good and it is available in Safari.

for programming language, when you dive into low level, there's only C, and that's it. however Python can do C and you can use it for userspace programming.

and there's some network sniffers for reading raw packages and inserting data into them. SBo lists dsniff but i never used one.
 
Old 10-25-2009, 07:38 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You can use Perl, eg http://search.cpan.org/~yanick/NetPa...tPacket/TCP.pm.
Basically, look at search.cpan.org and use the search box and/or the Networking IPC menu.

Perl docs/tutorials:
http://perldoc.perl.org/
http://www.perlmonks.org/?node=Tutorials
Highly recommend the Perl Cookbook as well.
It feels like a scripting lang, but it's compile don the fly, so its actually pretty fast (http://www.perl.com/doc/FMTEYEWTK/comp-vs-interp.html)

The classic TCP/IP books are W. Richard Stevens TCP Illustrated series. Vol 1 is prob enough for you.
http://www.kohala.com/start/tcpipiv1.html

Last edited by chrism01; 10-25-2009 at 07:49 PM.
 
  


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
Programming - C++ Sockets: Is all just C? TALR Programming 12 06-13-2009 03:42 AM
Programming timeout with sockets simasimon Programming 6 05-03-2008 12:16 AM
is sockets programming my only way? nesta Programming 1 03-23-2007 10:37 AM
Sockets Programming pink_lady Programming 4 05-31-2006 07:56 AM
Sockets Programming-Getting Started funkymunky Programming 3 01-09-2004 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:44 PM.

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