LinuxQuestions.org
Review your favorite Linux distribution.
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-12-2007, 05:10 AM   #1
supriyanaik
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
Intercepting packet transmission in linux 2.6 kernel by inserting a module.


i am a final year IT student, doing a project in linux networking...

i want to intercept the packet transmission before it enters TCP by inserting my own module so that my module gets executed whenever a packet is transmitted.In my module i want to display the contents or simply access the packet.My module should also be able to return the packet to the TCP-IP code of the kernel.

In short i just want to interrupt the transmission of a packet through TCP-IP.
 
Old 01-13-2007, 10:57 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
If your intent is read-only, then simply use the tcpdump command, or you own code with the interface in permissive mode.
 
Old 01-15-2007, 06:51 AM   #3
supriyanaik
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by macemoneta
If your intent is read-only, then simply use the tcpdump command, or you own code with the interface in permissive mode.
Hey, i didnt understand what do you mean by "own code with the interface in permissive mode"...

But i want to intercept the transmission every time and not just once...

Thus i want to write a module which will check for the packet transmission continuousely... and whenever it will encounter one it will print the packet contents(at the stage before entering the TCP IP code in the kernel).

And i am not able to poll for the packet transmission through the module..i just dont know how to do it(Is it possible to do something like this through a module?), because i dont want to do any changes in the kernel code.

Please help me with this.
 
  


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
info on inserting a new module to existing kernel aus9 Linux - Kernel 1 09-18-2006 02:33 AM
about the ip packet intercepting wangjinyi Programming 8 09-14-2005 01:07 AM
Problem inserting a new module to kernel hetzme Programming 2 07-18-2005 07:21 AM
Packet Transmission in the Kernel sidra Programming 3 04-17-2005 11:48 AM
Packet Transmission in the Kernel sidra Linux - Networking 1 04-09-2005 08:39 AM

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

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