LinuxQuestions.org
Review your favorite Linux distribution.
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 06-12-2004, 12:01 PM   #1
thanh
LQ Newbie
 
Registered: Jun 2004
Posts: 5

Rep: Reputation: 0
How to get the IP header of packet going through an interface


Hello every one.

I have setup a computer with two interfaces, and I use that as a router for my small LAN. I want to write a program to records all the host that going through the interface that connect to the Internet.

So I think I need an API that report back the headers of those IP packets that going through an interface. I made several searchs through the program networking materials, but I cannot find the right one.

So if anyone knows of such an API, please tell me.

Thank you very much in advance.
 
Old 06-12-2004, 12:26 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
i think iptables can do that, don't know how tho, check out the docs. if u want to do it programmatically, once again, check out my site, all the way at the bottom this time.
 
  


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
access IP header in packet linux_lover2005 Programming 3 04-11-2005 01:02 AM
does each header fields in packet sent on network uses htons? b123coder Programming 3 04-06-2005 08:36 AM
why i see same packet twice on network interface? cranium2004 Linux - Networking 6 11-26-2004 09:42 AM
Edit packet header? mudvayne Linux - Networking 4 03-28-2003 01:43 PM
packet reception by virtual network interface seeker321in Linux - Networking 0 04-19-2002 01:48 PM

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

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