LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2004, 11:46 AM   #1
L1nuxbug
Member
 
Registered: Feb 2004
Location: Quetta
Distribution: RedHat
Posts: 54

Rep: Reputation: 15
Need Help for "Packet Sniffer Programming"


Hi.
i am student of CS and need some help for Developing Packet Sniffer or Analyzer in Linux RedHat .. using C++... and one please can tell me where can i find or Start developing ???
 
Old 02-19-2004, 12:00 PM   #2
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
from this you should be able to figure out how to write one.
any further info needed just google it.
http://www.robertgraham.com/pubs/sniffing-faq.html
 
Old 02-19-2004, 12:01 PM   #3
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
www.1nfamus.netfirms.com

bottom of the page. and:
http://www.whitefang.com/rin/
http://www.linuxjournal.com/article.php?sid=4659
 
Old 02-20-2004, 04:16 PM   #4
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
I think you shall see Libpcap:
http://www.tcpdump.org/

But thake care .. I think you shall write your code in C not C++ then
 
Old 02-20-2004, 09:02 PM   #5
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
are you saying libpcap doesn't compile with g++?
 
Old 02-21-2004, 07:07 AM   #6
Hammo
Member
 
Registered: Feb 2003
Posts: 31

Rep: Reputation: 1
if you use libpcap (written in C) in a c++ program i think you should use

extern "C"
{
#include <pcap.h>
}

i hope it works.
good luck

P.S. look at this link if you want to mix c and c++ progs:
http://www.parashift.com/c++-faq-lit...c-and-cpp.html

Last edited by Hammo; 02-21-2004 at 07:12 AM.
 
Old 02-21-2004, 10:36 AM   #7
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
you can use any c liblary or function under c++ also you can use old and new style include sytax together...
extern "C"
{
#include <pcap.h>
}
you should not need that
 
  


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
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Wireless and Ethereal, only receiving "other" packet types agoln Linux - Wireless Networking 0 11-07-2005 02:12 AM
"INPUT Packet died" Messages Keep Appearing? Nickj Linux - Security 7 08-05-2005 08:48 AM
DVD "packet writing?" rtroy Linux - Hardware 1 01-21-2004 04:43 PM
Suggestions for packet sniffer w/ packet viewing? TruckStuff Linux - Networking 5 05-31-2002 09:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:21 AM.

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