LinuxQuestions.org
Have you listened to LQ Radio?
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 01-20-2004, 10:33 PM   #1
SaTaN
Member
 
Registered: Aug 2003
Location: Suprisingly in Heaven
Posts: 223
Thanked: 1
Interpret ICMP packets


[Log in to get rid of this advertisement]
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 10:35 PM..
SaTaN is offline     Reply With Quote
Old 01-20-2004, 11:23 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.5-beta, OS X 10.5.6, CentOS 4 & 5
Posts: 3,631
Thanked: 14
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.
chort 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
ICMP Packets coolfrog Linux - Networking 4 12-22-2004 12:10 PM
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
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 09:15 PM.

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