LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-20-2004, 09:33 PM   #1
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223

Rep: Reputation: 33
Interpret ICMP packets


Suppose I have captured an icmp packet using winpcap on windows in visual c++.

Now how do I find out the i.p addresses and other info related to that icmp packet ??

Code:
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
This is my packet handler function

Last edited by SaTaN; 01-20-2004 at 09:35 PM.
 
Old 01-20-2004, 10:23 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
It will be in the packet header, but you need to know the syntax for the construction of an IP header. If you're going to be doing IP programming, I strongly suggest buying and reading TCP/IP Illustrated: Volume 1, by W. Richard Stevens. This book is considered the book for TCP/IP and it explains everything you need to know and more.
 
  


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
ICMP Packets coolfrog Linux - Networking 4 12-22-2004 11:10 AM
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
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 12:21 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