LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-19-2011, 04:48 AM   #1
elpurata2000
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
network protocol


Greetings,



How do I create a protocol that caches all the traffic, the incomming before any other protocol, and outgoing before going to the lower layer?

Why do I need this? because I want to modify the packets,

For example:
add vlan tags to incomming packets so my vlan aware linux handles them and remove them on the way out so my non vlan aware pc can handle the packet.

I created a module using dev_add_pack, it works well as a sniffer but it does not prevent the other protocols from getting the packet.

As a test after the "sniffing" I called netif_rx insted of destroying the packet, I endeed up in a loop where I get one packet, sended to process and get back again ( at least that is how I understand it).

Any idea of how to do this?

I am hoping to achieve this without patching the kernel.

BR,
AUGUSTO SALAZAR
 
Old 08-23-2011, 10:43 AM   #2
elpurata2000
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Smile

ok ok.. not all at once..

after reading the web I suspect that the way to do this is via netfilter, now, as before I have achieved a module that works great as a filter, but dont know how to start the packets modifications.

I hope to first be able to change the destination port of the packet.

Any idea?
 
  


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
network protocol grapher? CmdoColin Linux - Networking 1 10-08-2009 05:49 AM
help needed in network protocol arunpravin Linux - Networking 2 10-30-2006 03:22 AM
Network time protocol sailu_mvn Linux - Software 1 01-06-2006 06:47 AM
Network Time protocol ssg14j Linux - Networking 3 10-26-2005 03:58 PM
A network protocol like Samba??? Zappa Linux - Networking 8 02-11-2004 09:00 AM

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

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