def map_type(name, field_name):
    """Maps a Sysmon event type to VAST type."""
    if name == "string":
        return "string"
    elif name == "integer":
        if field_name == "SourcePort" or field_name == "DestinationPort":
            return "port"
        return "count"
    elif name == "date":
        return "timestamp"
    elif name == "boolean" or name == "bool":
        return "bool"
    elif name == "ip":
        return "addr"
    else:
        raise NotImplementedError(name)