class ACL implements IACLService, IFloodlightModule, IDeviceListener {

	@Override
	public void deviceIPV4AddrChanged(IDevice device) {
		
		SwitchPort[] switchPort = device.getAttachmentPoints();
		IPv4Address[] ips = device.getIPv4Addresses();
		
		String dpid = HexString.toHexString(switchPort[0].getSwitchDPID().getLong());
		String ip = null;
		
		// some device may first appear with no IP address(default set to 0.0.0.0), ignore it
		for(IPv4Address i : ips){
			if(i.getInt() != 0){
				ip = IPv4.fromIPv4Address(i.getInt());
				break;
			}
		}
		
		logger.info("New AP added. [dpid:" + dpid + " ip:" + ip + "]");
		AP ap = new AP(ip, dpid);
		apManager.addAP(ap);
		processAPAdded(ap);
	}

}