File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -1393,7 +1393,15 @@ pub const LOCAL_CONNWAIT: c_int = 0x0002; // connects block until accepted
13931393pub const LOCAL_PEEREID : c_int = 0x0003 ; // get peer identification
13941394pub const LOCAL_CREDS : c_int = 0x0004 ; // pass credentials to receiver
13951395
1396- // https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373
1396+ // https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L207
1397+ /// link invalid/unknown
1398+ pub const LINK_STATE_UNKNOWN : c_int = 0 ;
1399+ /// link is down
1400+ pub const LINK_STATE_DOWN : c_int = 1 ;
1401+ /// link is up
1402+ pub const LINK_STATE_UP : c_int = 2 ;
1403+
1404+ // https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L445
13971405pub const IFF_UP : c_int = 0x0001 ; // interface is up
13981406pub const IFF_BROADCAST : c_int = 0x0002 ; // broadcast address valid
13991407pub const IFF_DEBUG : c_int = 0x0004 ; // turn on debugging
Original file line number Diff line number Diff line change @@ -1629,6 +1629,22 @@ const SI_PAD: size_t = (SI_MAXSZ / size_of::<c_int>()) - 3;
16291629pub const MAP_STACK : c_int = 0x4000 ;
16301630pub const MAP_CONCEAL : c_int = 0x8000 ;
16311631
1632+ // https://github.com/openbsd/src/blob/HEAD/sys/net/if.h#L135
1633+ /// link unknown
1634+ pub const LINK_STATE_UNKNOWN : c_int = 0 ;
1635+ /// link invalid
1636+ pub const LINK_STATE_INVALID : c_int = 1 ;
1637+ /// link is down
1638+ pub const LINK_STATE_DOWN : c_int = 2 ;
1639+ /// keepalive reports down
1640+ pub const LINK_STATE_KALIVE_DOWN : c_int = 3 ;
1641+ /// link is up
1642+ pub const LINK_STATE_UP : c_int = 4 ;
1643+ /// link is up and half duplex
1644+ pub const LINK_STATE_HALF_DUPLEX : c_int = 5 ;
1645+ /// link is up and full duplex
1646+ pub const LINK_STATE_FULL_DUPLEX : c_int = 6 ;
1647+
16321648// https://github.com/openbsd/src/blob/HEAD/sys/net/if.h#L187
16331649pub const IFF_UP : c_int = 0x1 ; // interface is up
16341650pub const IFF_BROADCAST : c_int = 0x2 ; // broadcast address valid
You can’t perform that action at this time.
0 commit comments