I am using Linux for compiling. In the struct ip
(for IPv4), when I tried to give the value as ip1.ip_dst = 0xffffffff;
, it got the following error:
error: incompatible types when assigning to type ‘struct in_addr’ from type 'unsigned int' ip.ip_dst = 0xffffffff;`
What value should I give to a variable with struct in_addr
datatype? And how can I solve this error?
inet_aton
to convert dotted decimal into struct in_addr datatype. Look at the man page ofinet_aton
to get a full list of available functions. – rakib_