'Scan the (ICMP) port structure (dict) and update the status key'

def _port_scan_icmp(self, port):

    ret = None
    if WINDOWS:
        timeout_opt = '-w'
        count_opt = '-n'
    elif (MACOS or BSD):
        timeout_opt = '-t'
        count_opt = '-c'
    else:
        timeout_opt = '-W'
        count_opt = '-c'
    cmd = ['ping', count_opt, '1', timeout_opt, str(self._resolv_name(port['timeout'])), self._resolv_name(port['host'])]
    fnull = open(os.devnull, 'w')
    try:
        counter = Counter()
        ret = subprocess.check_call(cmd, stdout=fnull, stderr=fnull, close_fds=True)
        if (ret == 0):
            port['status'] = counter.get()
        else:
            port['status'] = False
    except subprocess.CalledProcessError as e:
        port['status'] = False
    except Exception as e:
        logger.debug('{}:    Error    while    pinging    host    {}    ({})'.format(self.plugin_name, port['host'], e))
    return ret
