I have a variable
__be32 x;
I have a function
__u32 foo(void){
__u32 a;
return a;
}
I need to save the return of foo in a variable x.
x=htonl(foo());
Is it correct? I am embarrassed that the returned types ntohl()and htonl(). Are they the opposite of each other?
To check the output, I need to recompile the kernel, and I do not want to disturb the system with any errors. Therefore, I ask here.
source
share