LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 12-18-2004, 02:05 PM   #1
coolfrog
Member
 
Registered: Sep 2004
Location: India
Distribution: Slackware 10.0
Posts: 77
Thanked: 0
ICMP Packets


[Log in to get rid of this advertisement]
Hey,
Could anyone gimme an idea where to find a good tutorial for creating ICMP packets for PING,TRACEROUTE etc. in Linux.
coolfrog is offline     Reply With Quote
Old 12-18-2004, 03:46 PM   #2
bm17
Member
 
Registered: Sep 2004
Location: Santa Cruz, CA, USA
Distribution: Redhat 9.0
Posts: 104
Thanked: 0
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.
bm17 is offline     Reply With Quote
Old 12-19-2004, 01:51 AM   #3
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 435
Thanked: 0
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.
oulevon is offline     Reply With Quote
Old 12-19-2004, 05:47 PM   #4
coolfrog
Member
 
Registered: Sep 2004
Location: India
Distribution: Slackware 10.0
Posts: 77
Thanked: 0

Original Poster
Thanx guyz.
coolfrog is offline     Reply With Quote
Old 12-22-2004, 12:10 PM   #5
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: SuSe 9.2 & 10, Gentoo, knoppix, DSL
Posts: 602
Thanked: 3
Try looking here - http://www.faqs.org/rfcs/rfc792.html
baldy3105 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 02:13 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration