I need to edit 1 line in /proc/net/tcp while the file is also used by the linux kernel for updating other lines of it by the kernel.
Background: Each line in /proc/net/tcp represents a TCP socket. The kernel uses this file to show the state and statistics of each socket in the system. I want to fake the statisics of 1 socket in the system, because I'm capturing its traffic and passing it directly to the network card, without the kernel's knowledge.
/proc/net/tcpreflects what is happening in the system, it isn't read by the kernel. Furthermore you can't do something without the kernel's knowledge. What are you trying to accomplish? Who's going to read the statistics that you want to fake?