LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   encapsulating TCP packets in UDP packets... (https://www.linuxquestions.org/questions/programming-9/encapsulating-tcp-packets-in-udp-packets-178224/)

yoshi95 05-05-2004 01:06 PM

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..............

chort 05-05-2004 02:25 PM

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.

infamous41md 05-05-2004 03:36 PM

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 :D

shrike_912 06-03-2004 02:53 PM

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


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