internal void updatePeer(NetworkPeerService peer, WinDHCP.Library.DhcpServer dhcpManager) { if (needUpdate(isSetIP, peer.isSetIP, storage.IPAddress, peer.storage.IPAddress)) { isSetIP = peer.isSetIP; if (isSetIP) { storage.IPAddress = peer.storage.IPAddress; dhcpManager.addReservation(peer.storage.MACAddress, storage.IPAddress); } else { dhcpManager.removeReservation(peer.storage.MACAddress); } } if (needUpdate(isSetHostName, peer.isSetHostName, storage.HostName, peer.storage.HostName)) { isSetHostName = peer.isSetHostName; if (isSetHostName) { //TODO add hostname to dns storage.HostName = peer.storage.HostName; } else { //TODO remove hostname from dns storage.HostName = null; } updateHostName(storage.HostName); } }
public void SetPeer(NetworkPeerService peer) { privateManager.SetPeer(peer.storage.MACAddress, peer); }
internal void SetPeer(string macAddress, NetworkPeerService peer) { Peers[macAddress].updatePeer(peer, dhcpManager); }