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 03-02-2006, 04:51 AM   #1
kaustubh_pict
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Rep: Reputation: 0
New ICMP Packet Creation


Hello ,

I need to create a new ICMP type of packet to suite my project need. But i am unable to find the existing packet formats in Linux source where i can add my new type. Does any one know how to add that?
 
Old 03-02-2006, 08:04 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
I'm not sure what your trying to do. You want to add your custom icmp between two machines? Make icmp2 , the next general protocol in fact

General tip:
I use cscope for browsing the kernel, you should install it, its very small and pretty effective
then in /usr/src/linux (kernel source tree or whereever it is):
cscope -R, it will make a crossreference of the kernel
then you can make a search ("find this text string")

for example:
ICMP_ECHO
This is the simplest ICMP (its payload is exactly what was received)
You should have a line
Quote:
7 icmp.c 768 * Handle ICMP_ECHO ("ping") requests.
You should also have a look at ICMP_ECHO_REPLY for the response.
Go on this line, hit enter, and look how it is done. Exit csope with CtrlD
Make your own, rebuild your kernel (you can't have tcp/ip as a module). Try

Hope its what you want to do.
 
Old 03-02-2006, 12:00 PM   #3
kaustubh_pict
LQ Newbie
 
Registered: Mar 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanx for the information. But i am kind looking for somthing different. I have to use ICMP packet in my modules to get things work. I will be installing my patch to every machine under test. So u can say icmp2. But for that i need the existing implementation of the ICMP packets structure. So referring that i can add my code there. Reply...
 
  


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
Why ICMP packet for ping and nmap. bruse Linux - Networking 2 12-12-2005 09:48 AM
Custom packet creation program darin3200 Linux - Networking 2 06-02-2004 09:55 PM
ICMP Packet capture SaTaN Programming 1 01-19-2004 11:38 PM
packet creation in libnet Abominous Programming 0 12-01-2003 03:23 PM
ICMP packet requests Ch@meleon Linux - General 0 11-29-2001 12:03 PM

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

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