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

add prefixlen to ifaddr #37

Merged
merged 2 commits into from
Apr 7, 2024
Merged

add prefixlen to ifaddr #37

merged 2 commits into from
Apr 7, 2024

Conversation

nvandamme
Copy link

No description provided.

@nvandamme
Copy link
Author

nvandamme commented Apr 6, 2024

add CIDR notation prefix length as public field prefixlen in IfAddr::V4 and IfAddr::V6 structs

Interface {
    name: "Loopback Pseudo-Interface 1",
    addr: V6(
        Ifv6Addr {
            ip: ::1,
            netmask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,
            prefixlen: 128,
            broadcast: None,
        },
    ),
    index: Some(
        1,
    ),
    adapter_name: "...",
},
Interface {
    name: "Loopback Pseudo-Interface 1",
    addr: V4(
        Ifv4Addr {
            ip: 127.0.0.1,
            netmask: 255.0.0.0,
            prefixlen: 8,
            broadcast: Some(
                127.255.255.255,
            ),
        },
    ),
    index: Some(
        1,
    ),
    adapter_name: "....",
},

@nvandamme nvandamme closed this Apr 6, 2024
@nvandamme nvandamme reopened this Apr 6, 2024
@messense messense merged commit bfbdb05 into messense:master Apr 7, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants