LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-01-2004, 03:19 AM   #1
sonika_singhi
Member
 
Registered: Oct 2004
Location: india
Distribution: fedora core
Posts: 34

Rep: Reputation: 15
network programming-packet generation


hello everybody,
i want to create my own packets with network programming in C
language. could anyone pls suggest any ebook or guide from where should i begin. actually i want to add my application header (specifically for DNS)
in the UDP payload and want to know all the structures and functions related to that. pls could anyone help me.
thanx
 
Old 11-01-2004, 09:38 AM   #2
itzfritz
Member
 
Registered: Oct 2004
Location: Babylon, New York
Distribution: debian lenny, ubuntu intrepid
Posts: 70

Rep: Reputation: 15
Heres a beginning tutorial for 'raw' socket programming in C for linux.
http://mixter.void.ru/rawip.html

Note for your future google searches: use the term "raw sockets".

Here is a raw sockets faq:
http://www.whitefang.com/rin/rawfaq.html

dont know where to point you for your dns question BUT i know that hping lets you do some packet manipulation; found a tut for that here:
http://www.security-forums.com/forum...pic.php?t=6417

happy hacking
 
Old 11-01-2004, 09:52 AM   #3
mehesque
Member
 
Registered: Oct 2003
Location: TX
Distribution: RH 8.0
Posts: 97

Rep: Reputation: 15
network programming

I'm going to give you a few suggestions into this dirty, dirty world of network programming.

Read: read the rfc for all the protocols that you want to know about. UDP's rfc number is 768 http://www.faqs.org/rfcs/rfc768.htm.

Learn how to make a packet header or design your own and take it from there.

Debugging isn't too hard if you sniff your packets with ethereal--it has a very intutive interface.

It might be sacrilege but also look at winsocks in addition to just raw sockets, they have some clever libraries.
 
Old 11-02-2004, 01:15 PM   #4
sonika_singhi
Member
 
Registered: Oct 2004
Location: india
Distribution: fedora core
Posts: 34

Original Poster
Rep: Reputation: 15
thanx a lot
this has been really helpful
 
  


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
identify a network packet alaios Linux - Networking 4 04-19-2006 07:54 PM
How to capture network packet jerrytw Programming 1 01-06-2005 10:28 AM
why i see same packet twice on network interface? cranium2004 Linux - Networking 6 11-26-2004 09:42 AM
send packet at network Jamesminh Programming 1 10-01-2004 10:04 AM
Which packet to install for programming C/C++ netsroht Linux - Newbie 5 07-01-2004 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:51 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