Hello. I'm trying to build a packet sniffer from here. I got about 5 errors when trying to build this source code.
Code:
'local->h_addr_list[in]' could be '0': this does not adhere to the specification for the function 'memcpy'.
'temp_data' could be '0': this does not adhere to the specification for the function 'fwrite'.
Return value ignored: '_getch'.
Dereferencing NULL pointer 'buf'.
Using uninitialized memory 'addr'.
'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings