LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-05-2004, 01:06 PM   #1
yoshi95
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
encapsulating TCP packets in UDP packets...


somebody please help..................somehow i need to encapsulate TCP packets in UDP packets when the socket is in ECHO mode...............after scanning through kernel code i think i need to change something in tcp_transmit_skb(), like adding "err = udp_send_msg(sk, msg, skb)" if TCP_ECHO mode is on.......or something

the problem is that there is very little documentation on how to create a UDP header............to many structures to look at and not knowing what each member does.....................

any kinda help would be great...............somebody please..............
 
Old 05-05-2004, 02:25 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
This is more appropriately a programming question, since the networking section is more for configuration rather than stack modifications.

By the way, are you planning on modifying both the sender and the recipient's TCP stack? If not, you better think about that right now because a sender is not going to accept a UDP datagram being sent to an unbound UDP port in response to a TCP transmission.
 
Old 05-05-2004, 03:36 PM   #3
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
have u lost your mind? anyhow, start with creating udp header: http://forums.devshed.com/t144505/s.html read further down the post. as for hackin up the protocol stack, im not qualified to answer taht one.. not till i read tcp/ip illustrated 2 that is
 
Old 06-03-2004, 02:53 PM   #4
shrike_912
LQ Newbie
 
Registered: Jun 2004
Location: nepal
Posts: 26

Rep: Reputation: 15
create UDP packet. u can do that can't u? then encapsulate the TCP packet in the UDP data field. that should do. but send it on the UDP port or else it may not get accepted by the reciever. plus the reciever should now what it got just now is a TCP packet encapsulated in a UDP so be careful..

shrike_912
 
  


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
UDP packets dont seem to go out! linuxspartan Linux - Networking 2 11-06-2004 09:55 PM
udp packets m00t00 Programming 1 11-04-2004 09:20 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Only receiving UDP packets, no TCP erevlehdeux Linux - Networking 1 04-23-2004 07:36 PM
UDP packets going nowhere jylhar Programming 0 01-05-2004 05:46 AM


All times are GMT -5. The time now is 04:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration