Example #1
0
 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);
     }
 }
Example #2
0
 public void SetPeer(NetworkPeerService peer)
 {
     privateManager.SetPeer(peer.storage.MACAddress, peer);
 }
Example #3
0
 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);
     }
 }
Example #4
0
 public void SetPeer(NetworkPeerService peer)
 {
     privateManager.SetPeer(peer.storage.MACAddress, peer);
 }
Example #5
0
 internal void SetPeer(string macAddress, NetworkPeerService peer)
 {
     Peers[macAddress].updatePeer(peer, dhcpManager);
 }
Example #6
0
 internal void SetPeer(string macAddress, NetworkPeerService peer)
 {
     Peers[macAddress].updatePeer(peer, dhcpManager);
 }