Set last error to 0 before returning in case of success.
Extracted util/parser modules.
Removed legacy code.
Extracted helper functions to a separate module.
Removed unnecessary includes.
Renamed parser -> filter.
Use winsock2's ntohs/ntohl/etc.