Simplify in_cksum() and squelch one more warning. sn_packets.c:66:32: warning: passing argument 1 of 'in_cksum' from incompatible pointer type [-Wincompatible-pointer-types] Packet data comes as a sequence of bytes rather than 16-bit words, so take is as bytes and reconstruct the words as necessary. Also replace host byte order pointer type casting with explicit network byte order in the words. Lose a few variables as well. Drop "register" because it no longer is necessary with modern compilers and it certainly has nothing to do with endianness. This function may have other problems, which should be easier to see and to fix now. Use unsigned char in a few places to match the new prototype.
Recent Commits to sniffit:master
-
Simplify in_cksum() and squelch one more warning.
-
Use inet_ntop() to squelch two more warnings.
Use inet_ntop() to squelch two more warnings. sn_interface.c:201:3: warning: assignment to 'unsigned char *' from incompatible pointer type '_32_bit *' {aka 'unsigned int *'} [-Wincompatible-pointer-types] sn_interface.c:207:3: warning: assignment to 'unsigned char *' from incompatible pointer type '_32_bit *' {aka 'unsigned int *'} [-Wincompatible-pointer-types] The code in mask_status() takes an IPv4 address in network byte order and converts it to a string. There is a standard library function for that, so just use it. -
Fixup minor issues in README.md.
Fixup minor issues in README.md.