Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide constants for common (network) hosts to rama-net's Host #363

Open
GlenDC opened this issue Dec 15, 2024 · 0 comments
Open

provide constants for common (network) hosts to rama-net's Host #363

GlenDC opened this issue Dec 15, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers mentor available A mentor is available to help you through the issue.
Milestone

Comments

@GlenDC
Copy link
Member

GlenDC commented Dec 15, 2024

These constants can be added as associated constants to Host in

pub enum Host {
, e.g. as an impl block:

impl Host {
     /// description
     const NAME: Self = VALUE;

     /// ...
}

You can do so for the following list of common hosts:

Name Value Description
LOCALHOST_IPV4 127.0.0.1 Local loopback address (IPv4)
LOCALHOST_IPV6 ::1 Local loopback address (IPv6)
LOCALHOST_NAME localhost Local loopback name
DEFAULT_IPV4 0.0.0.0 Default address, not routable
BROADCAST_IPV4 255.255.255.255 Broadcast address (IPv4)
EXAMPLE example.com Example domain for documentation

In case you know more commonly used Hosts do feel free to add some more.

@GlenDC GlenDC added enhancement New feature or request good first issue Good for newcomers mentor available A mentor is available to help you through the issue. labels Dec 15, 2024
@GlenDC GlenDC added this to the v0.2 milestone Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers mentor available A mentor is available to help you through the issue.
Projects
None yet
Development

No branches or pull requests

1 participant