I want to override/change how linux handles ping icmp echo request packets. Meaning I want to run my own server to reply to incoming icmp (echo request or other) packets.
But for this to work properly, I guess I need to disable the default ping icmp packets handling from linux. But I can't figure out how to do this (I don't even know what handles icmp requests... The kernel ? some userspace code ?)... All I find is about dropping icmp echo requests with iptables.
To help understand, let me explain my goal: I want to be able to send some data with ping. (easy) but I need to be able to read and extract that data. also, I want to be able to answer with a special echo-reply (with some data embedded)