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'm experimenting with two experimental icmp messages.
I want to create an icmp_request in the kernel, but I have only found icmp replies (icmp_reply in icmp.c) and icmp error messages.
How can I create an icmp request without using external userspace programs (in fact I can't use the icmp_send function)? Does the icmp_reply function has some side effects?
Wow, you're talking kernel programming, which is known to be something of a black art! Instead of Linux Questions, you should probably try places like:
i maybe completely wrong about all this, but from what i remember from a long time ago, you'd have to do that in userspace. icmp uses udp. linux itself has only the tcp/udp layer of things, anything else, your program would have to make up.
i maybe completely wrong about all this, but from what i remember from a long time ago, you'd have to do that in userspace. icmp uses udp. linux itself has only the tcp/udp layer of things, anything else, your program would have to make up.
ICMP is a L4 layer protocol. It uses IP in the network layer (UDP is also a L4 layer protocol so you can't use it). In fact the kernel reacts to icmp requests and you can create icmp error messages as well.
Wow, you're talking kernel programming, which is known to be something of a black art! Instead of Linux Questions, you should probably try places like:
There are undoubtedly more. In addition, talking to the people who develop the code you're trying to hook into is probably a really good idea as well.
Mike
Thanks for the links.
There is no function for that. I have to adjust the icmp_send function for it.
Well as far as I see it kernel development is not a black art. It depends on your frustration threshold. The source code is fine but there is not enough documentation / comments included. The result is that you have to crawl through the code to get what they are doing.
I would need a black arts teacher .. if you know any?
LOL, no I don't! I may be looking for one myself next year as I intend to go back to school. I'm not sure yet exactly what I'll be doing (net admin maybe?) but I'd love to be able to learn kernel hacking.
BTW, I just looked at the comments between your reply and mine: I thought ICMP was its own Layer 4 protocol alongside UDP and TCP and above IP? (At least for IPv4--I haven't remotely begun to study IPv6 yet!)
LOL, no I don't! I may be looking for one myself next year as I intend to go back to school. I'm not sure yet exactly what I'll be doing (net admin maybe?) but I'd love to be able to learn kernel hacking.
BTW, I just looked at the comments between your reply and mine: I thought ICMP was its own Layer 4 protocol alongside UDP and TCP and above IP? (At least for IPv4--I haven't remotely begun to study IPv6 yet!)
Mike
Yes, itīs an own L4 protocol, but still depends on IPv4. I think it works the same way with IPv6, but I havenīt checked that out yet.
If youīre intested in networking read the books from OīReilly 'Internet Core Protocols' and every book about the kernel code you can get. After a while itīs fun to see how the system really works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.