if( (stringVal = properties.getProperty("net.slp.interface")) != null ) { address = InetAddress.getByName(stringVal); } else { address = InetAddress.getLocalHost(); }
address = InetAddress.getLocalHost();
    SLPAgent(Properties properties) throws ServiceLocationException {        this.properties = properties;        int intValue = 0;        String stringVal = null;        try {            if( (stringVal = properties.getProperty("net.slp.interface")) != null ) {                address = InetAddress.getByName(stringVal);            }            else {                address = InetAddress.getLocalHost();            }        }catch(Exception e) {            throw new ServiceLocationException(ServiceLocationException.NETWORK_ERROR,                                               "SLP: Could not resolve inet address");        }        if( (stringVal = properties.getProperty("net.slp.multicastMaximumWait")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_MC_MAX = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.randomWaitBound")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_START_WAIT = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.initialTimeout")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_RETRY = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.unicastMaximumWait")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_RETRY_MAX = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.DAActiveDiscoveryInterval")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_DA_FIND = intValue;                if(intValue == 0) CONFIG_DA_DISCOVERY = false;                else CONFIG_DA_DISCOVERY = true;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.useScopes")) != null && stringVal.length() != 0 ) {            supportedScopes = new Vector();            String[] scopes = stringVal.split(",");            for(int i=0; i<scopes.length; i++) {                supportedScopes.add(scopes[i]);            }        }        if( (stringVal = properties.getProperty("net.slp.passiveDADetection")) != null ) {            if(stringVal.equalsIgnoreCase("true")) CONFIG_PASSIVE_DA = true;            else if(stringVal.equalsIgnoreCase("false")) CONFIG_PASSIVE_DA = false;        }        if( (stringVal = properties.getProperty("net.slp.mtu")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_SLP_MTU = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.port")) != null ) {            try {                intValue = Integer.parseInt(stringVal);                CONFIG_SLP_PORT = intValue;            }catch(NumberFormatException nfe) { }        }        if( (stringVal = properties.getProperty("net.slp.locale")) != null && stringVal.length() != 0) {            locale = new Locale(stringVal);        }        if( (stringVal = properties.getProperty("net.slp.multicastAddress")) != null ) {            if(stringVal.length() != 0) CONFIG_SLP_MC_ADDR = stringVal;        }        if( (stringVal = properties.getProperty("net.slp.debug")) != null ) {            if(stringVal.equalsIgnoreCase("true")) CONFIG_DEBUG = true;            else if(stringVal.equalsIgnoreCase("false")) CONFIG_DEBUG = false;        }          if( (stringVal = properties.getProperty("net.slp.logErrors")) != null ) {            if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_ERRORS = true;            else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_ERRORS = false;        }        if( (stringVal = properties.getProperty("net.slp.logMsg")) != null ) {            if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_MSG = true;            else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_MSG = false;        }        if( (stringVal = properties.getProperty("net.slp.logfile")) != null ) {            CONFIG_LOGFILE = stringVal;        }    }