aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 21:00:27 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 21:00:27 -0800
commite2604a756aaddcd5919ee2f1b9cc0055d200f846 (patch)
tree1ea1b9900db20d3aadbddbce18882d0c957247d7 /libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig
parent5875df6c958743cf86c75b2cb5fc2efe5ca0de43 (diff)
downloadnitrocli-e2604a756aaddcd5919ee2f1b9cc0055d200f846.tar.gz
nitrocli-e2604a756aaddcd5919ee2f1b9cc0055d200f846.tar.bz2
Update libc crate to 0.2.45
This change updates the libc crate to version 0.2.45. Import subrepo libc/:libc at f5636fc618f8e16968b3178196d73c94ad9f7b05
Diffstat (limited to 'libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig')
-rw-r--r--libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs24
-rw-r--r--libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs8
2 files changed, 32 insertions, 0 deletions
diff --git a/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs b/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs
index ac4acad..e5f0219 100644
--- a/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs
+++ b/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs
@@ -65,6 +65,28 @@ pub const ALTMON_12: ::nl_item = 69;
pub const KERN_RND: ::c_int = 31;
+// https://github.com/bitrig/bitrig/blob/master/sys/net/if.h#L187
+pub const IFF_UP: ::c_int = 0x1; // interface is up
+pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
+pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
+pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
+pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
+pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers
+pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
+pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
+pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets
+pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets
+pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress
+pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions
+pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
+pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
+pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
+pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
+
+pub const SIGSTKSZ : ::size_t = 40960;
+
+pub const PT_FIRSTMACH: ::c_int = 32;
+
extern {
pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
pub fn duplocale(base: ::locale_t) -> ::locale_t;
@@ -73,6 +95,8 @@ extern {
locale: *const ::c_char,
base: ::locale_t) -> ::locale_t;
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+ pub fn pledge(promises: *const ::c_char,
+ paths: *mut *const ::c_char) -> ::c_int;
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
}
diff --git a/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs b/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs
index b07c476..d3971aa 100644
--- a/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs
+++ b/libc/src/unix/bsd/netbsdlike/openbsdlike/bitrig/x86_64.rs
@@ -1,2 +1,10 @@
+use PT_FIRSTMACH;
+
pub type c_long = i64;
pub type c_ulong = u64;
+
+pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0;
+pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1;
+pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2;
+pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3;
+pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4;