Subnet() public method

Get the subnet address for the network interface.
public Subnet ( ) : uint
return uint
Beispiel #1
0
 public static void Main(string[] args)
 {
     Core.InitParams initParams = new Core.InitParams();
     using (Core.Library lib = Core.Library.Create(initParams))
     {
         Core.SubnetList     subnetList = new Core.SubnetList();
         Core.NetworkAdapter nif        = subnetList.SubnetAt(0);
         uint subnet = nif.Subnet();
         Console.WriteLine("Using adapter: {0}", nif.Name());
         subnetList.Dispose();
         lib.StartCp(subnet);
         new Runner((int)initParams.MsearchTimeSecs);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Set which subnet the library should use
 /// </summary>
 /// <remarks>Device lists and subscriptions will be automatically updated.
 /// 
 /// No other subnet will be selected if aSubnet is not available</remarks>
 /// <param name="aSubnet">Handle returned by SubnetAt()</param>
 public void SetCurrentSubnet(NetworkAdapter aSubnet)
 {
     OhNetSetCurrentSubnet(aSubnet.Subnet());
 }
Beispiel #3
0
 /// <summary>
 /// Set which subnet the library should use
 /// </summary>
 /// <remarks>Device lists and subscriptions will be automatically updated.
 ///
 /// No other subnet will be selected if aSubnet is not available</remarks>
 /// <param name="aSubnet">Handle returned by SubnetAt()</param>
 public void SetCurrentSubnet(NetworkAdapter aSubnet)
 {
     OhNetSetCurrentSubnet(aSubnet.Subnet());
 }