DMNSN.Net 8.0.6

dotnet add package DMNSN.Net --version 8.0.6                
NuGet\Install-Package DMNSN.Net -Version 8.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DMNSN.Net" Version="8.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DMNSN.Net --version 8.0.6                
#r "nuget: DMNSN.Net, 8.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DMNSN.Net as a Cake Addin
#addin nuget:?package=DMNSN.Net&version=8.0.6

// Install DMNSN.Net as a Cake Tool
#tool nuget:?package=DMNSN.Net&version=8.0.6                

DMNSN.Net

Description

DMNSN.Net is a .NET library designed to provide network-related utilities and functionalities. This project is maintained by myself and is open for ideas and improvements in the future.

Features

  • Retrieve local IP address information.
  • Calculate network address based on IP address and subnet mask.
  • Determine the length of the subnet mask.

Installation

To install DMNSN.Net, you can use the following command:

dotnet add package DMNSN.Net

Usage

Here are some examples of how to use the library:

Get Local IP Information

using DMNSN.Net;

class Program {
	static void Main() {
		var localIPInfo = NetworkInfo.GetLocalIPInfo();
		Console.WriteLine($"Local IP Address: {localIPInfo.Address}");
	}
}

Get Network Address

using DMNSN.Net;
using System.Net;

class Program
{
    static void Main()
    {
        var ipAddress = IPAddress.Parse("192.168.1.10");
        var subnetMask = IPAddress.Parse("255.255.255.0");
        var networkAddress = NetworkInfo.GetNetworkAddress(ipAddress, subnetMask);
        Console.WriteLine($"Network Address: {networkAddress}");
    }
}

Get Subnet Mask Length

using DMNSN.Net;
using System.Net;

class Program
{
    static void Main()
    {
        var subnetMask = IPAddress.Parse("255.255.255.0");
        var netMaskLength = NetworkInfo.GetNetMask(subnetMask);
        Console.WriteLine($"Subnet Mask Length: {netMaskLength}");
    }
}

Contributing

Contributions are welcome! If you have ideas for improvements or new features, please feel free to open an issue or submit a pull request.

Roadmap

  • Add more network-related utilities.
  • Improve existing functionalities based on user feedback.
  • Enhance documentation and examples.

Authors and Acknowledgment

This project is maintained by me. Special thanks to all contributors and users who provide feedback and suggestions.

License

This project is licensed under the MIT License.

Project Status

This project is actively maintained and open for improvements and new ideas.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.6 109 12/5/2024
8.0.5 100 12/5/2024
8.0.4 95 12/5/2024
8.0.3 94 12/5/2024
8.0.2 90 12/5/2024
8.0.1 100 12/5/2024

Initial release. Starting base version with version of dotnet