LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2015, 03:35 AM   #1
BELAL
LQ Newbie
 
Registered: Apr 2015
Posts: 1

Rep: Reputation: Disabled
Protocol Converter Module in Linux


I have a typical requirement, I want to have a converter module, that can convert UDP packet to TCP packet. And I need to do it before the packet can be processed in IP layer.

I will explain this complete scenario using an example

Lets say we have 3 machines A, B and C.

A sent an UDP packet
B received UDP packet
At B, when packet is being given to IP layer (from Link / MAC / Ethernet layer) , I want to get hold of packet. I want to delete the UDP and IP header in packet. I want to add TCP and IP header (assuming C is the destination host).
Now from B machine, packet is sent to C machine

Can somebody help me how this can be done. I am using linux machines.

Though libpcap can be one of the option (from wireshark), but it is not suitable for me because of performance reasons. I want a very light weight solution for this problem.
 
Old 04-09-2015, 08:50 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,102
Blog Entries: 10

Rep: Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524
Different protocols are transported by UDP versus TCP for whatever the design reasons were chosen when the protocols were envisioned. And these are typically all on assigned protocol ports, which do not overlap.

Certainly you can use some of the unassigned ports and therefore change standard encapsulation to the other transport type. The issue is that there is no real designed or envisioned method to do this. As a result, the receiving point would then have to be running a custom application to look for traffic on a non-assigned port and then know how to deal with that.

There isn't an easy way to do this, you really need to write your own custom programs.
 
  


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
Want to implement Ting protocol similar to Ping protocol gp1986 Linux - Newbie 1 01-12-2015 10:31 AM
Is RSVP-TE signalling protocol used in the MPLS module in latest Linux versions? dharm_sk Linux - Networking 0 08-02-2014 05:45 PM
LXer: TCP/IP Protocol: Network Time Protocol (NTP) LXer Syndicated Linux News 0 11-21-2013 01:00 AM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 06:11 AM
Unsupported protocol 'Compression Control Protocol' (0x80fd) received RKris Linux - Software 0 08-21-2002 09:24 AM


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