LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-27-2012, 12:49 AM   #1
pavaneee
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Rep: Reputation: Disabled
Red face tcpdump help


Hi All,

I know how to sniff packets using tcpdump.But i want to call tcpdump utility in a function.How to do that ? I do not want to cal system() function. Do you have any idea on how to do that ?

Thanks a ton in advance.

Thanks,
Pavan
 
Old 01-27-2012, 02:20 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
what do you actually want to do with this call? Maybe you actually want to bypass tcpdump and use libpcap itself? That's certainly a lot more programatical from C.
 
Old 01-27-2012, 03:28 AM   #3
pavaneee
LQ Newbie
 
Registered: Jan 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yes.You are right.Is there a way to call any exposed function which is being used by tcpdump utility to process all CLI inputs ?

If there is something like that, i can directly call function with my arguments.


Thanks,
Pavan
 
Old 01-27-2012, 03:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
I'd suggest you look up the standard online docs for libpcap and go from there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
An help about this tcpdump magodiafano Linux - Networking 2 11-24-2010 05:26 AM
Using tcpdump ? paragkalra Linux - Networking 10 02-17-2008 08:24 PM
tcpdump nawuza Linux - Newbie 1 01-16-2007 11:40 PM
tcpdump Tihi Linux - Security 3 06-01-2005 05:54 AM
tcpdump gbell72 Linux - Security 5 09-18-2003 02:08 PM

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

All times are GMT -5. The time now is 10: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration