Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything 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.
I want to ask if it's possible to modify a TCP parameter (for example RTO) or to trigger a tcp function (fro example tcp_retransmit_skb()), from user space during a connection; I heard about Netlink sockets, but I don't know how it works, or how to use them.
I'll appreciate any kind of help, and thanks in advance
I want to ask if it's possible to modify a TCP parameter (for example RTO) or to trigger a tcp function (fro example tcp_retransmit_skb()), from user space during a connection;
First of all this question, while phrased differently, is remarkably similar to the one in this thread of yours. Please ensure you're not discussing same topic questions in different threads. As for the examples those are real bad ones because 0) while you can sort of set it for a route, RTO is not a TCP parameter but dynamically set based on RTT and 1) triggering tcp_retransmit_skb() is a given on sending traffic. I do get you want to change Live network stream characteristics though. If you can't reach your ultimate goal in one go due to knowledge hiatus, shouldn't you be starting with reading kernel.org networking documentation and relevant RFC's and some simple exercises I wonder?..
Quote:
Originally Posted by josefelk
I heard about Netlink sockets, but I don't know how it works, or how to use them.
If you search for NFQUEUE, libnetfilter and SCAPY you should find the documentation and examples on your own. Else how about telling us what the scope was of your course handling TCP/IP networking, what documentation you've read, in detail what your assignment is, what code you've already produced and more precisely what you're looking for?
Thanks for reply @unSpawn, and I'm sorry if dispatched my question like this 'cause I tough that it's a different topic. And I really know how TCP works, and I have an idea about the implementation of Linux TCP.
As you now TCP is waiting for the RTO to retransmit in case of a timeout. And when the remote host is unreachable for a long time (especially in wired-wireless networks), the RTO backoff (doubling the RTO) can lead to a long idle time of TCP, even after the host is reachable again. And this is because TCP relates losses to congestion, and there is now mechanism to distinguish outage from congestion.
The idea I want to try, is a simple ping mechanism that I can trigger in timeout to do less backoff when the host is unreachable (because in my case there is no congestion)
I was thinking about crafting ICMP_ECHO packets inside kernel, but I saw in a lot of forums that it's a bad idea. So what's the best way to send my pings and if this have to be done in user-space how then to modify a variable inside kernel like backoff, or to trigger a kernel function. And correct me in something if I'm wrong.
Thanks in advance, and excuse me for being long
Cheers
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.