I am writing a kernel module in Arch Linux with c language. I want to convert the network IP to host IP with ip4 format: 127.0.0.1
I know it is possible in user program to use these functions:
inetntoa()
ntohs()
ntohl()
I tried to include the socket.h, in.h, etc and use the below functions, but none of them worked for me.
So in kernel module I don't have access to this functions. Is there in kernel module a replacement for this functions?