LinuxQuestions.org
Visit Jeremy's Blog.
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 05-30-2007, 02:49 AM   #1
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Rep: Reputation: 15
Mornitoring passing-through packets on tha gateway


Hi all,
I am very curious about the approach to implement the following functions on a LAN gateway:
1)Monitor all passing-through packets
2)Fetch desired packets for certain operations
3)Send out the packets
Is there any approaches to achieve this or existing system to use?if i need write the system from scratch, where is the start point?should i write network driver?I have been confused by this for a while. Any advises are appreciated.TQVM.
 
Old 05-30-2007, 07:17 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Need more detail/example.
Are you trying to write your own firewall? (See iptables)
Are you trying to write a network (ie Sockets) program.
Why would you need to write this SW?
 
Old 05-30-2007, 07:39 AM   #3
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chrism01
Need more detail/example.
Are you trying to write your own firewall? (See iptables)
Are you trying to write a network (ie Sockets) program.
Why would you need to write this SW?
actually this SW works on RTP packets,here is the scenario:
when there are RTP media streaming passing through this gateway from two ends(one is in the LAN,another could be outside the LAN),then this SW needs to fetch those packets to do its job and only send RTP packets to destination.
Therefore I assume this SW needs to monitor the traffic on the GW. TQ.
 
Old 05-31-2007, 06:57 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Sounds like you want to only allow (filter through) RTP packets and block others?
If so, research IP Tables eg http://www.linuxguruz.com/iptables/howto/
or this is better: http://www.netfilter.org/
 
Old 05-31-2007, 10:16 PM   #5
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for the info,i also got some advices on TUN/TAP approach. Do you familiar on them? which one is more efficient? Because the latency is a critical part on this SW.TQ
 
  


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
New in tha house cryonic90 LinuxQuestions.org Member Intro 3 03-25-2005 08:53 AM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 02:18 PM
No packets received at application-level without a default gateway urban_olofsson Linux - Networking 3 10-29-2004 08:51 AM
Logging\Filtering Packets Through a Gateway ASP Linux - Software 2 10-21-2003 10:11 PM
iptables- not passing packets to server jbrandis Linux - Security 4 12-09-2001 04:44 PM

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

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