LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Mornitoring passing-through packets on tha gateway (http://www.linuxquestions.org/questions/programming-9/mornitoring-passing-through-packets-on-tha-gateway-557677/)

simon_qwl 05-30-2007 02:49 AM

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.

chrism01 05-30-2007 07:17 AM

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?

simon_qwl 05-30-2007 07:39 AM

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.

chrism01 05-31-2007 06:57 AM

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/

simon_qwl 05-31-2007 10:16 PM

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


All times are GMT -5. The time now is 09:32 AM.