Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-09-2015, 02:35 AM   #1
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, 07:50 AM   #2
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,610
Blog Entries: 12

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
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.


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

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration