use std::os::raw::c_int;
use crate::ffi::*;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(transparent)]
pub struct Family(c_int);
impl Family {
pub const ROUTE: Family = Self(NETLINK_ROUTE);
pub const INET_DIAG: Family = Self(NETLINK_INET_DIAG);
pub const CONNECTOR: Family = Self(NETLINK_CONNECTOR);
pub const NETFILTER: Family = Self(NETLINK_NETFILTER);
pub const GENERIC: Family = Self(NETLINK_GENERIC);
pub const fn from(n: c_int) -> Self {
Self(n)
}
}
impl Into<c_int> for Family {
fn into(self) -> c_int {
self.0
}
}