LinuxQuestions.org
Review your favorite Linux distribution.
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 12-18-2004, 01:05 PM   #1
coolfrog
Member
 
Registered: Sep 2004
Location: India
Distribution: Slackware 10.0
Posts: 77

Rep: Reputation: 15
ICMP Packets


Hey,
Could anyone gimme an idea where to find a good tutorial for creating ICMP packets for PING,TRACEROUTE etc. in Linux.
 
Old 12-18-2004, 02:46 PM   #2
bm17
Member
 
Registered: Sep 2004
Location: Santa Cruz, CA, USA
Distribution: Redhat 9.0
Posts: 104

Rep: Reputation: 15
I learned how to create ICMP packets by reading the ping source code and the unix header files. I think you have to open a raw IP socket and build the ICMP header yourself.

traceroute doesn't use ICMP packets. It uses UDP packets and fudges the Time-To_live field in the header. The resaon that traceroute does not use ICMP is that it wants to report the normal path of traffic and ICMP packets sometimes get special treatment. traceroute does, however, listen for ICMP replies.
 
Old 12-19-2004, 12:51 AM   #3
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Rep: Reputation: 30
UNIX Network Programming The Sockets Networking API Volume 1 (Stevens, Fenner, Rudoff) devotes a chapter to creating and writing to raw sockets. Chapter 28 I believe.
 
Old 12-19-2004, 04:47 PM   #4
coolfrog
Member
 
Registered: Sep 2004
Location: India
Distribution: Slackware 10.0
Posts: 77

Original Poster
Rep: Reputation: 15
Thanx guyz.
 
Old 12-22-2004, 11:10 AM   #5
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Try looking here - http://www.faqs.org/rfcs/rfc792.html
 
  


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
dropping of ICMP packets from martian sources kishku Linux - Networking 2 10-19-2004 08:06 PM
How to send icmp packets on a particular interface? dravya Programming 3 07-29-2004 04:15 PM
Interpret ICMP packets SaTaN Linux - Networking 1 01-20-2004 10:23 PM
DENY ICMP Packets joseph Linux - Software 1 10-08-2003 10:03 PM
Port 0 (icmp,eth0,input) 7 packets wfhoney Linux - Security 3 09-02-2003 03:10 PM

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

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