Struct libzt::zts_net_info_t[][src]

#[repr(C)]
pub struct zts_net_info_t {
Show fields pub net_id: u64, pub mac: u64, pub name: [c_char; 128], pub status: zts_network_status_t, pub type_: zts_net_info_type_t, pub mtu: c_uint, pub dhcp: c_int, pub bridge: c_int, pub broadcast_enabled: c_int, pub port_error: c_int, pub netconf_rev: c_ulong, pub assigned_addr_count: c_uint, pub assigned_addrs: [zts_sockaddr_storage; 16], pub route_count: c_uint, pub routes: [zts_route_info_t; 32], pub multicast_sub_count: c_uint, pub multicast_subs: [zts_net_info_t__bindgen_ty_1; 1024],
}
Expand description

Virtual network configuration

Fields

net_id: u64

64-bit ZeroTier network ID

mac: u64

Ethernet MAC (48 bits) that should be assigned to port

name: [c_char; 128]

Network name (from network configuration master)

status: zts_network_status_t

Network configuration request status

type_: zts_net_info_type_t

Network type

mtu: c_uint

Maximum interface MTU

dhcp: c_int

If nonzero, the network this port belongs to indicates DHCP availability

This is a suggestion. The underlying implementation is free to ignore it for security or other reasons. This is simply a netconf parameter that means ‘DHCP is available on this network.’

bridge: c_int

If nonzero, this port is allowed to bridge to other networks

This is informational. If this is false (0), bridged packets will simply be dropped and bridging won’t work.

broadcast_enabled: c_int

If nonzero, this network supports and allows broadcast (ff:ff:ff:ff:ff:ff) traffic

port_error: c_int

If the network is in PORT_ERROR state, this is the (negative) error code most recently reported

netconf_rev: c_ulong

Revision number as reported by controller or 0 if still waiting for config

assigned_addr_count: c_uint

Number of assigned addresses

assigned_addrs: [zts_sockaddr_storage; 16]

ZeroTier-assigned addresses (in sockaddr_storage structures)

For IP, the port number of the sockaddr_XX structure contains the number of bits in the address netmask. Only the IP address and port are used. Other fields like interface number can be ignored.

This is only used for ZeroTier-managed address assignments sent by the virtual network’s configuration master.

route_count: c_uint

Number of ZT-pushed routes

routes: [zts_route_info_t; 32]

Routes (excluding those implied by assigned addresses and their masks)

multicast_sub_count: c_uint

Number of multicast groups subscribed

multicast_subs: [zts_net_info_t__bindgen_ty_1; 1024]

Trait Implementations

impl Clone for zts_net_info_t[src]

fn clone(&self) -> zts_net_info_t[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for zts_net_info_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.