@Override
    public DetectResult doDetect(DetectParameter parameter) {
        LOG.info("do connect of " + getDetectName() + " start ...");

        result = new DHCPDetectResult();

        try {
            start();

            // dhcp discover process
            LOG.info("DHCP discover process...");
            dhcpDiscover();

            if (result.getErrorId() == DetectResult.DETECT_SUCCESS){    // discover success
                dhcpResponse();
                if (result.getErrorId() == DetectResult.DETECT_SUCCESS){    // response success
                    result.setTotalTime(result.getDiscoverTime()+result.getResponseTime());
                }
            }

            if (serverIdentifier != null){
                result.setServerHost(Util.bytes2Str(serverIdentifier, "."));
            }
        } catch (SocketException e) {
            LOG.error("Socket exception happened.", e);
        } finally {
            close();
        }

        LOG.info("do connect of " + getDetectName() + " end ...");
        return result;  //To change body of implemented methods use File | Settings | File Templates.
    }