ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..............
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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.
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
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.