LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-23-2007, 06:34 PM   #1
geek1234
Member
 
Registered: Apr 2007
Posts: 38

Rep: Reputation: 15
Intercepting packets, buffering, and resending


Hi,

This is a networking question, but delves into unix programming aspects as well.

How do intercept any packets that I am sendind from an interface, store it in a buffer, and periodically send it away?

That is, if packets are sent every x seconds from application, I want to buffer these packets and empty buffer every y seconds, with y > x.

Would I need to modify any source code in the linux kernel stack, or is there any other way. I do not have control over the application, and can only intercept them before I send them. Any known links that explains the process is appreciated as well.

Thanks in advance,
G
 
Old 12-24-2007, 11:02 AM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
The easiest thing that comes to mind is the QUEUE target in iptables.
You might wanna read man libipq
You can also write a kernel module implementing packet interception, using the available hooks...
 
Old 12-26-2007, 11:09 PM   #3
geek1234
Member
 
Registered: Apr 2007
Posts: 38

Original Poster
Rep: Reputation: 15
yes, based on my reading that seems to be the easiest way. thanks!
 
  


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
Postfix resending old mail SlackDaemon Linux - General 4 01-28-2007 03:05 AM
about the ip packet intercepting wangjinyi Programming 8 09-14-2005 12:07 AM
Resending packets (routing) Barca Linux - Networking 7 11-13-2004 03:24 PM
how to add & register filter for intercepting the packets outgoing on port 80? jayashri Programming 2 11-08-2004 01:30 PM
problem in intercepting sys_write system call appas Programming 7 09-03-2004 12:33 PM

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

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