stdassertmaxIntbuiltincaddr_tioveciovec_constpasswdtimespecuid_tpid_tptracepthread_spinlock_tpledgeunveilgetthridFUTEXfutexlogin_cap_tlogin_getclasslogin_getstylelogin_getcapboollogin_getcapnumlogin_getcapsizelogin_getcapstrlogin_getcaptimelogin_closesetclasscontextsetusercontextauth_session_tauth_userokayauth_approvalauth_userchallengeauth_userresponseauth_usercheckauth_openauth_closeauth_setdataauth_setitemauth_getitemauth_setoptionauth_setstateauth_getstateauth_cleanauth_clrenvauth_clroptionauth_clroptionsauth_setenvauth_getvalueauth_verifyauth_callauth_challengeauth_check_expireauth_check_changeauth_getpwdauth_setpwdauth_mkvalueauth_catauth_checknologingetpwuid_shadowgetpwnam_shadowsetpassentuid_from_useruser_from_uidbcrypt_gensaltbcryptbcrypt_newhashbcrypt_checkpasspw_dupauth_item_tBIAUTHTCFLUSHTCIOEMAX_PAGE_SHIFTPTHREAD_STACK_MINIPIPV6IPTOSTCP
std.c.openbsd.assert
别名
别名目标 std.debug.assert
std.c.openbsd.AUTH
命名空间
std.c.openbsd.auth_approval
函数
pub extern "c" fn auth_approval(as: ?*auth_session_t, ?*login_cap_t, name: ?[*:0]const u8, type: ?[*:0]const u8) c_int
参数
std.c.openbsd.auth_call
函数
pub extern "c" fn auth_call(as: *auth_session_t, path: [*:0]const u8, ...) c_int
参数
as: *auth_session_t
path: [*:0]const u8
std.c.openbsd.auth_cat
函数
pub extern "c" fn auth_cat(file: [*:0]const u8) c_int
参数
file: [*:0]const u8
std.c.openbsd.auth_challenge
函数
pub extern "c" fn auth_challenge(as: *auth_session_t) [*:0]const u8
参数
as: *auth_session_t
std.c.openbsd.auth_check_change
函数
pub extern "c" fn auth_check_change(as: *auth_session_t) i64
参数
as: *auth_session_t
std.c.openbsd.auth_check_expire
函数
pub extern "c" fn auth_check_expire(as: *auth_session_t) i64
参数
as: *auth_session_t
std.c.openbsd.auth_checknologin
函数
pub extern "c" fn auth_checknologin(lc: *login_cap_t) void
参数
lc: *login_cap_t
std.c.openbsd.auth_clean
函数
pub extern "c" fn auth_clean(as: *auth_session_t) void
参数
as: *auth_session_t
std.c.openbsd.auth_close
函数
pub extern "c" fn auth_close(as: *auth_session_t) c_int
参数
as: *auth_session_t
std.c.openbsd.auth_clrenv
函数
pub extern "c" fn auth_clrenv(as: *auth_session_t) void
参数
as: *auth_session_t
std.c.openbsd.auth_clroption
函数
pub extern "c" fn auth_clroption(as: *auth_session_t, option: [*:0]const u8) void
参数
as: *auth_session_t
option: [*:0]const u8
std.c.openbsd.auth_clroptions
函数
pub extern "c" fn auth_clroptions(as: *auth_session_t) void
参数
as: *auth_session_t
std.c.openbsd.auth_getitem
函数
pub extern "c" fn auth_getitem(as: *auth_session_t, item: auth_item_t) ?[*:0]const u8
参数
as: *auth_session_t
item: auth_item_t
std.c.openbsd.auth_getpwd
函数
pub extern "c" fn auth_getpwd(as: *auth_session_t) ?*passwd
参数
as: *auth_session_t
std.c.openbsd.auth_getstate
函数
pub extern "c" fn auth_getstate(as: *auth_session_t) c_int
参数
as: *auth_session_t
std.c.openbsd.auth_getvalue
函数
pub extern "c" fn auth_getvalue(as: *auth_session_t, what: [*:0]const u8) ?[*:0]const u8
参数
as: *auth_session_t
what: [*:0]const u8
std.c.openbsd.auth_item_t
容器
字段
ALL = 0
CHALLENGE = 1
CLASS = 2
NAME = 3
SERVICE = 4
STYLE = 5
INTERACTIVE = 6
std.c.openbsd.auth_mkvalue
函数
pub extern "c" fn auth_mkvalue(value: [*:0]const u8) ?[*:0]const u8
参数
value: [*:0]const u8
std.c.openbsd.auth_open
函数
pub extern "c" fn auth_open() ?*auth_session_t
std.c.openbsd.auth_session_t
容器
std.c.openbsd.auth_setdata
函数
pub extern "c" fn auth_setdata(as: *auth_session_t, ptr: *anyopaque, len: usize) c_int
参数
std.c.openbsd.auth_setenv
函数
pub extern "c" fn auth_setenv(as: *auth_session_t) void
参数
as: *auth_session_t
std.c.openbsd.auth_setitem
函数
pub extern "c" fn auth_setitem(as: *auth_session_t, item: auth_item_t, value: [*:0]const u8) c_int
参数
std.c.openbsd.auth_setoption
函数
pub extern "c" fn auth_setoption(as: *auth_session_t, n: [*:0]const u8, v: [*:0]const u8) c_int
参数
std.c.openbsd.auth_setpwd
函数
pub extern "c" fn auth_setpwd(as: *auth_session_t, pwd: *passwd) c_int
参数
as: *auth_session_t
pwd: *passwd
std.c.openbsd.auth_setstate
函数
pub extern "c" fn auth_setstate(as: *auth_session_t, s: c_int) void
参数
as: *auth_session_t
s: c_int
std.c.openbsd.auth_userchallenge
函数
pub extern "c" fn auth_userchallenge(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, chappengep: *?[*:0]const u8) ?*auth_session_t
参数
name: [*:0]const u8
style: ?[*:0]const u8
arg_type: ?[*:0]const u8
chappengep: *?[*:0]const u8
std.c.openbsd.auth_usercheck
函数
pub extern "c" fn auth_usercheck(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, password: ?[*:0]const u8) ?*auth_session_t
参数
name: [*:0]const u8
style: ?[*:0]const u8
arg_type: ?[*:0]const u8
password: ?[*:0]const u8
std.c.openbsd.auth_userokay
函数
pub extern "c" fn auth_userokay(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, password: ?[*:0]const u8) c_int
参数
name: [*:0]const u8
style: ?[*:0]const u8
arg_type: ?[*:0]const u8
password: ?[*:0]const u8
std.c.openbsd.auth_userresponse
函数
pub extern "c" fn auth_userresponse(as: *auth_session_t, response: [*:0]const u8, more: c_int) c_int
参数
std.c.openbsd.auth_verify
函数
pub extern "c" fn auth_verify(as: ?*auth_session_t, style: ?[*:0]const u8, name: ?[*:0]const u8, ...) ?*auth_session_t
参数
std.c.openbsd.AUTH.ALLOW
常量
c_int
std.c.openbsd.AUTH.CHALLENGE
常量
c_int
std.c.openbsd.AUTH.EXPIRED
常量
c_int
std.c.openbsd.AUTH.OKAY
常量
c_int
std.c.openbsd.AUTH.PWEXPIRED
常量
c_int
std.c.openbsd.AUTH.ROOTOKAY
常量
c_int
std.c.openbsd.AUTH.SECURE
常量
c_int
std.c.openbsd.AUTH.SILENT
常量
c_int
std.c.openbsd.bcrypt
函数
pub extern "c" fn bcrypt(pass: [*:0]const u8, salt: [*:0]const u8) ?[*:0]const u8
参数
pass: [*:0]const u8
salt: [*:0]const u8
std.c.openbsd.bcrypt_checkpass
函数
pub extern "c" fn bcrypt_checkpass(pass: [*:0]const u8, goodhash: [*:0]const u8) c_int
参数
pass: [*:0]const u8
goodhash: [*:0]const u8
std.c.openbsd.bcrypt_gensalt
函数
pub extern "c" fn bcrypt_gensalt(log_rounds: u8) [*:0]const u8
参数
log_rounds: u8
std.c.openbsd.bcrypt_newhash
函数
pub extern "c" fn bcrypt_newhash(pass: [*:0]const u8, log_rounds: c_int, hash: [*]u8, hashlen: usize) c_int
参数
pass: [*:0]const u8
log_rounds: c_int
hash: [*]u8
hashlen: usize
std.c.openbsd.BI
命名空间
std.c.openbsd.BI.AUTH
常量
std.c.openbsd.BI.CHALLENGE
常量
std.c.openbsd.BI.EXPIRED
常量
std.c.openbsd.BI.FDPASS
常量
std.c.openbsd.BI.PWEXPIRED
常量
std.c.openbsd.BI.REJECT
常量
std.c.openbsd.BI.REMOVE
常量
std.c.openbsd.BI.ROOTOKAY
常量
std.c.openbsd.BI.SECURE
常量
std.c.openbsd.BI.SETENV
常量
std.c.openbsd.BI.SILENT
常量
std.c.openbsd.BI.UNSETENV
常量
std.c.openbsd.BI.VALUE
常量
std.c.openbsd.builtin
常量
std.c.openbsd.caddr_t
别名
别名目标 std.c.caddr_t
std.c.openbsd.E
容器
字段
SUCCESS = 0未发生错误。
PERM = 1
NOENT = 2
SRCH = 3
INTR = 4
IO = 5
NXIO = 6
@"2BIG" = 7
NOEXEC = 8
BADF = 9
CHILD = 10
DEADLK = 11
NOMEM = 12
ACCES = 13
FAULT = 14
NOTBLK = 15
BUSY = 16
EXIST = 17
XDEV = 18
NODEV = 19
NOTDIR = 20
ISDIR = 21
INVAL = 22
NFILE = 23
MFILE = 24
NOTTY = 25
TXTBSY = 26
FBIG = 27
NOSPC = 28
SPIPE = 29
ROFS = 30
MLINK = 31
PIPE = 32
DOM = 33
RANGE = 34
AGAIN = 35
INPROGRESS = 36
ALREADY = 37
NOTSOCK = 38
DESTADDRREQ = 39
MSGSIZE = 40
PROTOTYPE = 41
NOPROTOOPT = 42
PROTONOSUPPORT = 43
SOCKTNOSUPPORT = 44
OPNOTSUPP = 45
PFNOSUPPORT = 46
AFNOSUPPORT = 47
ADDRINUSE = 48
ADDRNOTAVAIL = 49
NETDOWN = 50
NETUNREACH = 51
NETRESET = 52
CONNABORTED = 53
CONNRESET = 54
NOBUFS = 55
ISCONN = 56
NOTCONN = 57
SHUTDOWN = 58
TOOMANYREFS = 59
TIMEDOUT = 60
CONNREFUSED = 61
LOOP = 62
NAMETOOLONG = 63
HOSTDOWN = 64
HOSTUNREACH = 65
NOTEMPTY = 66
PROCLIM = 67
USERS = 68
DQUOT = 69
STALE = 70
REMOTE = 71
BADRPC = 72
RPCMISMATCH = 73
PROGUNAVAIL = 74
PROGMISMATCH = 75
PROCUNAVAIL = 76
NOLCK = 77
NOSYS = 78
FTYPE = 79
AUTH = 80
NEEDAUTH = 81
IPSEC = 82
NOATTR = 83
ILSEQ = 84
NOMEDIUM = 85
MEDIUMTYPE = 86
OVERFLOW = 87
CANCELED = 88
IDRM = 89
NOMSG = 90
NOTSUP = 91
BADMSG = 92
NOTRECOVERABLE = 93
OWNERDEAD = 94
PROTO = 95
_
std.c.openbsd.futex
函数
pub extern "c" fn futex(uaddr: ?*const volatile u32, op: c_int, val: c_int, timeout: ?*const timespec, uaddr2: ?*const volatile u32) c_int
参数
uaddr: ?*const volatile u32
op: c_int
val: c_int
timeout: ?*const timespec
uaddr2: ?*const volatile u32
std.c.openbsd.FUTEX
命名空间
std.c.openbsd.FUTEX.PRIVATE_FLAG
常量
std.c.openbsd.FUTEX.REQUEUE
常量
std.c.openbsd.FUTEX.WAIT
常量
std.c.openbsd.FUTEX.WAKE
常量
std.c.openbsd.getpwnam_shadow
函数
pub extern "c" fn getpwnam_shadow(name: [*:0]const u8) ?*passwd
参数
name: [*:0]const u8
std.c.openbsd.getpwuid_shadow
函数
pub extern "c" fn getpwuid_shadow(uid: uid_t) ?*passwd
参数
uid: uid_t
std.c.openbsd.getthrid
函数
pub extern "c" fn getthrid() pid_t
std.c.openbsd.iovec
别名
别名目标 std.posix.iovec
std.c.openbsd.iovec_const
别名
std.c.openbsd.IP
命名空间
OPTIONSHDRINCLTOSTTLRECVOPTSRECVRETOPTSRECVDSTADDRRETOPTSMULTICAST_IFMULTICAST_TTLMULTICAST_LOOPADD_MEMBERSHIPDROP_MEMBERSHIPPORTRANGEAUTH_LEVELESP_TRANS_LEVELESP_NETWORK_LEVELIPSEC_LOCAL_IDIPSEC_REMOTE_IDIPSEC_LOCAL_CREDIPSEC_REMOTE_CREDIPSEC_LOCAL_AUTHIPSEC_REMOTE_AUTHIPCOMP_LEVELRECVIFRECVTTLMINTTLRECVDSTPORTPIPEXRECVRTABLEIPSECFLOWINFOIPDEFTTLSENDSRCADDRRTABLEDEFAULT_MULTICAST_TTLDEFAULT_MULTICAST_LOOPMIN_MEMBERSHIPSMAX_MEMBERSHIPSPORTRANGE_DEFAULTPORTRANGE_HIGHPORTRANGE_LOW
std.c.openbsd.IP.ADD_MEMBERSHIP
常量
std.c.openbsd.IP.AUTH_LEVEL
常量
std.c.openbsd.IP.DEFAULT_MULTICAST_LOOP
常量
std.c.openbsd.IP.DEFAULT_MULTICAST_TTL
常量
std.c.openbsd.IP.DROP_MEMBERSHIP
常量
std.c.openbsd.IP.ESP_NETWORK_LEVEL
常量
std.c.openbsd.IP.ESP_TRANS_LEVEL
常量
std.c.openbsd.IP.HDRINCL
常量
std.c.openbsd.IP.IPCOMP_LEVEL
常量
std.c.openbsd.IP.IPDEFTTL
常量
std.c.openbsd.IP.IPSEC_LOCAL_AUTH
常量
std.c.openbsd.IP.IPSEC_LOCAL_CRED
常量
std.c.openbsd.IP.IPSEC_LOCAL_ID
常量
std.c.openbsd.IP.IPSEC_REMOTE_AUTH
常量
std.c.openbsd.IP.IPSEC_REMOTE_CRED
常量
std.c.openbsd.IP.IPSEC_REMOTE_ID
常量
std.c.openbsd.IP.IPSECFLOWINFO
常量
std.c.openbsd.IP.MAX_MEMBERSHIPS
常量
std.c.openbsd.IP.MIN_MEMBERSHIPS
常量
std.c.openbsd.IP.MINTTL
常量
std.c.openbsd.IP.MULTICAST_IF
常量
std.c.openbsd.IP.MULTICAST_LOOP
常量
std.c.openbsd.IP.MULTICAST_TTL
常量
std.c.openbsd.IP.OPTIONS
常量
std.c.openbsd.IP.PIPEX
常量
std.c.openbsd.IP.PORTRANGE
常量
std.c.openbsd.IP.PORTRANGE_DEFAULT
常量
std.c.openbsd.IP.PORTRANGE_HIGH
常量
std.c.openbsd.IP.PORTRANGE_LOW
常量
std.c.openbsd.IP.RECVDSTADDR
常量
std.c.openbsd.IP.RECVDSTPORT
常量
std.c.openbsd.IP.RECVIF
常量
std.c.openbsd.IP.RECVOPTS
常量
std.c.openbsd.IP.RECVRETOPTS
常量
std.c.openbsd.IP.RECVRTABLE
常量
std.c.openbsd.IP.RECVTTL
常量
std.c.openbsd.IP.RETOPTS
常量
std.c.openbsd.IP.RTABLE
常量
std.c.openbsd.IP.SENDSRCADDR
别名
std.c.openbsd.IP.TOS
常量
std.c.openbsd.IP.TTL
常量
std.c.openbsd.IPTOS
命名空间
LOWDELAYTHROUGHPUTRELIABILITYCEECTPREC_NETCONTROLPREC_INTERNETCONTROLPREC_CRITIC_ECPPREC_FLASHOVERRIDEPREC_FLASHPREC_IMMEDIATEPREC_PRIORITYPREC_ROUTINEDSCP_CS0DSCP_LEDSCP_CS1DSCP_AF11DSCP_AF12DSCP_AF13DSCP_CS2DSCP_AF21DSCP_AF22DSCP_AF23DSCP_CS3DSCP_AF31DSCP_AF32DSCP_AF33DSCP_CS4DSCP_AF41DSCP_AF42DSCP_AF43DSCP_CS5DSCP_EFDSCP_CS6DSCP_CS7ECN_NOTECTECN_ECT1ECN_ECT0ECN_CEECN_MASK
std.c.openbsd.IPTOS.CE
常量
std.c.openbsd.IPTOS.DSCP_AF11
常量
std.c.openbsd.IPTOS.DSCP_AF12
常量
std.c.openbsd.IPTOS.DSCP_AF13
常量
std.c.openbsd.IPTOS.DSCP_AF21
常量
std.c.openbsd.IPTOS.DSCP_AF22
常量
std.c.openbsd.IPTOS.DSCP_AF23
常量
std.c.openbsd.IPTOS.DSCP_AF31
常量
std.c.openbsd.IPTOS.DSCP_AF32
常量
std.c.openbsd.IPTOS.DSCP_AF33
常量
std.c.openbsd.IPTOS.DSCP_AF41
常量
std.c.openbsd.IPTOS.DSCP_AF42
常量
std.c.openbsd.IPTOS.DSCP_AF43
常量
std.c.openbsd.IPTOS.DSCP_CS0
常量
std.c.openbsd.IPTOS.DSCP_CS1
常量
std.c.openbsd.IPTOS.DSCP_CS2
常量
std.c.openbsd.IPTOS.DSCP_CS3
常量
std.c.openbsd.IPTOS.DSCP_CS4
常量
std.c.openbsd.IPTOS.DSCP_CS5
常量
std.c.openbsd.IPTOS.DSCP_CS6
常量
std.c.openbsd.IPTOS.DSCP_CS7
常量
std.c.openbsd.IPTOS.DSCP_EF
常量
std.c.openbsd.IPTOS.DSCP_LE
常量
std.c.openbsd.IPTOS.ECN_CE
常量
std.c.openbsd.IPTOS.ECN_ECT0
常量
std.c.openbsd.IPTOS.ECN_ECT1
常量
std.c.openbsd.IPTOS.ECN_MASK
常量
std.c.openbsd.IPTOS.ECN_NOTECT
常量
std.c.openbsd.IPTOS.ECT
常量
std.c.openbsd.IPTOS.LOWDELAY
常量
std.c.openbsd.IPTOS.PREC_CRITIC_ECP
常量
std.c.openbsd.IPTOS.PREC_FLASH
常量
std.c.openbsd.IPTOS.PREC_FLASHOVERRIDE
常量
std.c.openbsd.IPTOS.PREC_IMMEDIATE
常量
std.c.openbsd.IPTOS.PREC_INTERNETCONTROL
常量
std.c.openbsd.IPTOS.PREC_NETCONTROL
常量
std.c.openbsd.IPTOS.PREC_PRIORITY
常量
std.c.openbsd.IPTOS.PREC_ROUTINE
常量
std.c.openbsd.IPTOS.RELIABILITY
常量
std.c.openbsd.IPTOS.THROUGHPUT
常量
std.c.openbsd.IPV6
命名空间
UNICAST_HOPSMULTICAST_IFMULTICAST_HOPSMULTICAST_LOOPJOIN_GROUPLEAVE_GROUPPORTRANGECHECKSUMV6ONLYRTHDRDSTOPTSRECVPKTINFORECVHOPLIMITRECVRTHDRRECVHOPOPTSRECVDSTOPTSUSE_MIN_MTURECVPATHMTUPATHMTUPKTINFOHOPLIMITNEXTHOPHOPOPTSDSTOPTSRTHDRAUTH_LEVELESP_TRANS_LEVELESP_NETWORK_LEVELRECVTCLASSAUTOFLOWLABELIPCOMP_LEVELTCLASSDONTFRAGPIPEXRECVDSTPORTMINHOPCOUNTRTABLERTHDR_LOOSERTHDR_TYPE_0DEFAULT_MULTICAST_HOPSDEFAULT_MULTICAST_LOOPPORTRANGE_DEFAULTPORTRANGE_HIGHPORTRANGE_LOW
std.c.openbsd.IPV6.AUTH_LEVEL
常量
std.c.openbsd.IPV6.AUTOFLOWLABEL
常量
std.c.openbsd.IPV6.CHECKSUM
常量
std.c.openbsd.IPV6.DEFAULT_MULTICAST_HOPS
常量
std.c.openbsd.IPV6.DEFAULT_MULTICAST_LOOP
常量
std.c.openbsd.IPV6.DONTFRAG
常量
std.c.openbsd.IPV6.DSTOPTS
常量
std.c.openbsd.IPV6.ESP_NETWORK_LEVEL
常量
std.c.openbsd.IPV6.ESP_TRANS_LEVEL
常量
std.c.openbsd.IPV6.HOPLIMIT
常量
std.c.openbsd.IPV6.HOPOPTS
常量
std.c.openbsd.IPV6.IPCOMP_LEVEL
常量
std.c.openbsd.IPV6.JOIN_GROUP
常量
std.c.openbsd.IPV6.LEAVE_GROUP
常量
std.c.openbsd.IPV6.MINHOPCOUNT
常量
std.c.openbsd.IPV6.MULTICAST_HOPS
常量
std.c.openbsd.IPV6.MULTICAST_IF
常量
std.c.openbsd.IPV6.MULTICAST_LOOP
常量
std.c.openbsd.IPV6.NEXTHOP
常量
std.c.openbsd.IPV6.PATHMTU
常量
std.c.openbsd.IPV6.PIPEX
常量
std.c.openbsd.IPV6.PKTINFO
常量
std.c.openbsd.IPV6.PORTRANGE
常量
std.c.openbsd.IPV6.PORTRANGE_DEFAULT
常量
std.c.openbsd.IPV6.PORTRANGE_HIGH
常量
std.c.openbsd.IPV6.PORTRANGE_LOW
常量
std.c.openbsd.IPV6.RECVDSTOPTS
常量
std.c.openbsd.IPV6.RECVDSTPORT
常量
std.c.openbsd.IPV6.RECVHOPLIMIT
常量
std.c.openbsd.IPV6.RECVHOPOPTS
常量
std.c.openbsd.IPV6.RECVPATHMTU
常量
std.c.openbsd.IPV6.RECVPKTINFO
常量
std.c.openbsd.IPV6.RECVRTHDR
常量
std.c.openbsd.IPV6.RECVTCLASS
常量
std.c.openbsd.IPV6.RTABLE
常量
std.c.openbsd.IPV6.RTHDR
常量
std.c.openbsd.IPV6.RTHDR_LOOSE
常量
std.c.openbsd.IPV6.RTHDR_TYPE_0
常量
std.c.openbsd.IPV6.RTHDRDSTOPTS
常量
std.c.openbsd.IPV6.TCLASS
常量
std.c.openbsd.IPV6.UNICAST_HOPS
常量
std.c.openbsd.IPV6.USE_MIN_MTU
常量
std.c.openbsd.IPV6.V6ONLY
常量
std.c.openbsd.login_cap_t
容器
字段
class: ?[*:0]const u8
cap: ?[*:0]const u8
style: ?[*:0]const u8
std.c.openbsd.login_close
函数
pub extern "c" fn login_close(lc: *login_cap_t) void
参数
lc: *login_cap_t
std.c.openbsd.login_getcapbool
函数
pub extern "c" fn login_getcapbool(lc: *login_cap_t, cap: [*:0]const u8, def: c_int) c_int
参数
std.c.openbsd.login_getcapnum
函数
pub extern "c" fn login_getcapnum(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64
参数
std.c.openbsd.login_getcapsize
函数
pub extern "c" fn login_getcapsize(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64
参数
std.c.openbsd.login_getcapstr
函数
pub extern "c" fn login_getcapstr(lc: *login_cap_t, cap: [*:0]const u8, def: [*:0]const u8, err: [*:0]const u8) [*:0]const u8
参数
std.c.openbsd.login_getcaptime
函数
pub extern "c" fn login_getcaptime(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64
参数
std.c.openbsd.login_getclass
函数
pub extern "c" fn login_getclass(class: ?[*:0]const u8) ?*login_cap_t
参数
class: ?[*:0]const u8
std.c.openbsd.login_getstyle
函数
pub extern "c" fn login_getstyle(lc: *login_cap_t, style: ?[*:0]const u8, atype: ?[*:0]const u8) ?[*:0]const u8
参数
std.c.openbsd.MAX_PAGE_SHIFT
常量
std.c.openbsd.maxInt
别名
别名目标 std.math.maxInt
std.c.openbsd.passwd
别名
别名目标 std.c.passwd
std.c.openbsd.pid_t
别名
别名目标 std.c.pid_t
std.c.openbsd.pledge
函数
pub extern "c" fn pledge(promises: ?[*:0]const u8, execpromises: ?[*:0]const u8) c_int
参数
promises: ?[*:0]const u8
execpromises: ?[*:0]const u8
std.c.openbsd.pthread_spinlock_t
容器
字段
inner: ?*anyopaque = null
std.c.openbsd.PTHREAD_STACK_MIN
常量
std.c.openbsd.ptrace
函数
pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: caddr_t, data: c_int) c_int
参数
std.c.openbsd.pw_dup
函数
pub extern "c" fn pw_dup(pw: *const passwd) ?*passwd
参数
pw: *const passwd
std.c.openbsd.setclasscontext
函数
pub extern "c" fn setclasscontext(class: [*:0]const u8, flags: c_uint) c_int
参数
class: [*:0]const u8
flags: c_uint
std.c.openbsd.setpassent
函数
pub extern "c" fn setpassent(stayopen: c_int) c_int
参数
stayopen: c_int
std.c.openbsd.setusercontext
函数
pub extern "c" fn setusercontext(lc: *login_cap_t, pwd: *passwd, uid: uid_t, flags: c_uint) c_int
参数
std.c.openbsd.std
别名
别名目标 std
std.c.openbsd.TCFLUSH
容器
字段
none = 0
I = 1
O = 2
IO = 3
std.c.openbsd.TCIO
容器
字段
OOFF = 1
OON = 2
IOFF = 3
ION = 4
std.c.openbsd.TCP
命名空间
std.c.openbsd.TCP.INFO
常量
std.c.openbsd.TCP.MAXSEG
常量
std.c.openbsd.TCP.MD5SIG
常量
std.c.openbsd.TCP.NODELAY
常量
std.c.openbsd.TCP.NOPUSH
常量
std.c.openbsd.TCP.SACK_ENABLE
常量
std.c.openbsd.timespec
别名
别名目标 std.c.timespec
std.c.openbsd.uid_from_user
函数
pub extern "c" fn uid_from_user(name: [*:0]const u8, uid: *uid_t) c_int
参数
name: [*:0]const u8
uid: *uid_t
std.c.openbsd.uid_t
别名
别名目标 std.c.uid_t
std.c.openbsd.unveil
函数
pub extern "c" fn unveil(path: ?[*:0]const u8, permissions: ?[*:0]const u8) c_int
参数
path: ?[*:0]const u8
permissions: ?[*:0]const u8
std.c.openbsd.user_from_uid
函数
pub extern "c" fn user_from_uid(uid: uid_t, noname: c_int) ?[*:0]const u8
参数
uid: uid_t
noname: c_int
源码
std/c/openbsd.zig
const std = @import("../std.zig");
const assert = std.debug.assert;
const maxInt = std.math.maxInt;
const builtin = @import("builtin");
const caddr_t = std.c.caddr_t;
const iovec = std.posix.iovec;
const iovec_const = std.posix.iovec_const;
const passwd = std.c.passwd;
const timespec = std.c.timespec;
const uid_t = std.c.uid_t;
const pid_t = std.c.pid_t;
comptime {
assert(builtin.os.tag == .openbsd); // 防止在错误的操作系统上访问 std.c 符号。
}
pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: caddr_t, data: c_int) c_int;
pub const pthread_spinlock_t = extern struct {
inner: ?*anyopaque = null,
};
pub extern "c" fn pledge(promises: ?[*:0]const u8, execpromises: ?[*:0]const u8) c_int;
pub extern "c" fn unveil(path: ?[*:0]const u8, permissions: ?[*:0]const u8) c_int;
pub extern "c" fn getthrid() pid_t;
pub const FUTEX = struct {
pub const WAIT = 1;
pub const WAKE = 2;
pub const REQUEUE = 3;
pub const PRIVATE_FLAG = 128;
};
pub extern "c" fn futex(uaddr: ?*const volatile u32, op: c_int, val: c_int, timeout: ?*const timespec, uaddr2: ?*const volatile u32) c_int;
pub const login_cap_t = extern struct {
class: ?[*:0]const u8,
cap: ?[*:0]const u8,
style: ?[*:0]const u8,
};
pub extern "c" fn login_getclass(class: ?[*:0]const u8) ?*login_cap_t;
pub extern "c" fn login_getstyle(lc: *login_cap_t, style: ?[*:0]const u8, atype: ?[*:0]const u8) ?[*:0]const u8;
pub extern "c" fn login_getcapbool(lc: *login_cap_t, cap: [*:0]const u8, def: c_int) c_int;
pub extern "c" fn login_getcapnum(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64;
pub extern "c" fn login_getcapsize(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64;
pub extern "c" fn login_getcapstr(lc: *login_cap_t, cap: [*:0]const u8, def: [*:0]const u8, err: [*:0]const u8) [*:0]const u8;
pub extern "c" fn login_getcaptime(lc: *login_cap_t, cap: [*:0]const u8, def: i64, err: i64) i64;
pub extern "c" fn login_close(lc: *login_cap_t) void;
pub extern "c" fn setclasscontext(class: [*:0]const u8, flags: c_uint) c_int;
pub extern "c" fn setusercontext(lc: *login_cap_t, pwd: *passwd, uid: uid_t, flags: c_uint) c_int;
pub const auth_session_t = opaque {};
pub extern "c" fn auth_userokay(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, password: ?[*:0]const u8) c_int;
pub extern "c" fn auth_approval(as: ?*auth_session_t, ?*login_cap_t, name: ?[*:0]const u8, type: ?[*:0]const u8) c_int;
pub extern "c" fn auth_userchallenge(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, chappengep: *?[*:0]const u8) ?*auth_session_t;
pub extern "c" fn auth_userresponse(as: *auth_session_t, response: [*:0]const u8, more: c_int) c_int;
pub extern "c" fn auth_usercheck(name: [*:0]const u8, style: ?[*:0]const u8, arg_type: ?[*:0]const u8, password: ?[*:0]const u8) ?*auth_session_t;
pub extern "c" fn auth_open() ?*auth_session_t;
pub extern "c" fn auth_close(as: *auth_session_t) c_int;
pub extern "c" fn auth_setdata(as: *auth_session_t, ptr: *anyopaque, len: usize) c_int;
pub extern "c" fn auth_setitem(as: *auth_session_t, item: auth_item_t, value: [*:0]const u8) c_int;
pub extern "c" fn auth_getitem(as: *auth_session_t, item: auth_item_t) ?[*:0]const u8;
pub extern "c" fn auth_setoption(as: *auth_session_t, n: [*:0]const u8, v: [*:0]const u8) c_int;
pub extern "c" fn auth_setstate(as: *auth_session_t, s: c_int) void;
pub extern "c" fn auth_getstate(as: *auth_session_t) c_int;
pub extern "c" fn auth_clean(as: *auth_session_t) void;
pub extern "c" fn auth_clrenv(as: *auth_session_t) void;
pub extern "c" fn auth_clroption(as: *auth_session_t, option: [*:0]const u8) void;
pub extern "c" fn auth_clroptions(as: *auth_session_t) void;
pub extern "c" fn auth_setenv(as: *auth_session_t) void;
pub extern "c" fn auth_getvalue(as: *auth_session_t, what: [*:0]const u8) ?[*:0]const u8;
pub extern "c" fn auth_verify(as: ?*auth_session_t, style: ?[*:0]const u8, name: ?[*:0]const u8, ...) ?*auth_session_t;
pub extern "c" fn auth_call(as: *auth_session_t, path: [*:0]const u8, ...) c_int;
pub extern "c" fn auth_challenge(as: *auth_session_t) [*:0]const u8;
pub extern "c" fn auth_check_expire(as: *auth_session_t) i64;
pub extern "c" fn auth_check_change(as: *auth_session_t) i64;
pub extern "c" fn auth_getpwd(as: *auth_session_t) ?*passwd;
pub extern "c" fn auth_setpwd(as: *auth_session_t, pwd: *passwd) c_int;
pub extern "c" fn auth_mkvalue(value: [*:0]const u8) ?[*:0]const u8;
pub extern "c" fn auth_cat(file: [*:0]const u8) c_int;
pub extern "c" fn auth_checknologin(lc: *login_cap_t) void;
// TODO: auth_set_va_list 需要 Zig 支持 va_list 类型(#515)
pub extern "c" fn getpwuid_shadow(uid: uid_t) ?*passwd;
pub extern "c" fn getpwnam_shadow(name: [*:0]const u8) ?*passwd;
pub extern "c" fn setpassent(stayopen: c_int) c_int;
pub extern "c" fn uid_from_user(name: [*:0]const u8, uid: *uid_t) c_int;
pub extern "c" fn user_from_uid(uid: uid_t, noname: c_int) ?[*:0]const u8;
pub extern "c" fn bcrypt_gensalt(log_rounds: u8) [*:0]const u8;
pub extern "c" fn bcrypt(pass: [*:0]const u8, salt: [*:0]const u8) ?[*:0]const u8;
pub extern "c" fn bcrypt_newhash(pass: [*:0]const u8, log_rounds: c_int, hash: [*]u8, hashlen: usize) c_int;
pub extern "c" fn bcrypt_checkpass(pass: [*:0]const u8, goodhash: [*:0]const u8) c_int;
pub extern "c" fn pw_dup(pw: *const passwd) ?*passwd;
pub const auth_item_t = enum(c_int) {
ALL = 0,
CHALLENGE = 1,
CLASS = 2,
NAME = 3,
SERVICE = 4,
STYLE = 5,
INTERACTIVE = 6,
};
pub const BI = struct {
pub const AUTH = "authorize"; // 已接受身份验证
pub const REJECT = "reject"; // 认证被拒绝
pub const CHALLENGE = "reject challenge"; // 以质询方式拒绝
pub const SILENT = "reject silent"; // 静默拒绝
pub const REMOVE = "remove"; // 发生错误时移除文件
pub const ROOTOKAY = "authorize root"; // 根已认证
pub const SECURE = "authorize secure"; // 在不安全线路上可正常工作
pub const SETENV = "setenv"; // 设置环境变量
pub const UNSETENV = "unsetenv"; // 取消设置环境变量
pub const VALUE = "value"; // 设置局部变量
pub const EXPIRED = "reject expired"; // 账户已过期
pub const PWEXPIRED = "reject pwexpired"; // 密码已过期
pub const FDPASS = "fd"; // 子进程正在传递文件描述符
};
pub const AUTH = struct {
pub const OKAY: c_int = 0x01; // 用户已认证
pub const ROOTOKAY: c_int = 0x02; // 已通过身份验证并以 root 运行
pub const SECURE: c_int = 0x04; // 安全登录
pub const SILENT: c_int = 0x08; // 静默拒绝
pub const CHALLENGE: c_int = 0x10; // 已给出挑战
pub const EXPIRED: c_int = 0x20; // 账户已过期
pub const PWEXPIRED: c_int = 0x40; // 密码已过期
pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE);
};
pub const TCFLUSH = enum(u32) {
none = 0,
I = 1,
O = 2,
IO = 3,
};
pub const TCIO = enum(u32) {
OOFF = 1,
OON = 2,
IOFF = 3,
ION = 4,
};
pub const E = enum(u16) {
/// 未发生错误。
SUCCESS = 0,
PERM = 1, // 操作不被允许
NOENT = 2, // 没有此文件或目录
SRCH = 3, // 无此进程
INTR = 4, // 系统调用被中断
IO = 5, // 输入/输出错误
NXIO = 6, // 设备未配置
@"2BIG" = 7, // 参数列表过长
NOEXEC = 8, // 可执行文件格式错误
BADF = 9, // 文件描述符错误
CHILD = 10, // 没有子进程
DEADLK = 11, // 避免资源死锁
// 11 曾为 AGAIN
NOMEM = 12, // 无法分配内存
ACCES = 13, // 权限被拒绝
FAULT = 14, // 错误的地址
NOTBLK = 15, // 需要块设备
BUSY = 16, // 设备忙
EXIST = 17, // 文件已存在
XDEV = 18, // 跨设备链接
NODEV = 19, // 设备不支持此操作
NOTDIR = 20, // 不是目录
ISDIR = 21, // 是一个目录
INVAL = 22, // 参数无效
NFILE = 23, // 系统中打开的文件过多
MFILE = 24, // 打开的文件过多
NOTTY = 25, // 此设备不适用该 ioctl
TXTBSY = 26, // 文本文件忙
FBIG = 27, // 文件过大
NOSPC = 28, // 设备上没有剩余空间
SPIPE = 29, // 非法寻址
ROFS = 30, // 只读文件系统
MLINK = 31, // 链接过多
PIPE = 32, // 管道破裂
// 数学软件
DOM = 33, // 数值参数超出定义域
RANGE = 34, // 结果过大或过小
// 非阻塞和中断 I/O
// 另有:WOULDBLOCK:操作会阻塞
AGAIN = 35, // 资源暂时不可用
INPROGRESS = 36, // 操作正在进行中
ALREADY = 37, // 操作已在进行中
// IPC/网络软件——参数错误
NOTSOCK = 38, // 对非套接字执行了套接字操作
DESTADDRREQ = 39, // 需要目标地址
MSGSIZE = 40, // 消息过长
PROTOTYPE = 41, // 套接字的协议类型错误
NOPROTOOPT = 42, // 协议选项不可用
PROTONOSUPPORT = 43, // 不支持此协议
SOCKTNOSUPPORT = 44, // 不支持的套接字类型
OPNOTSUPP = 45, // 操作不受支持
PFNOSUPPORT = 46, // 不支持此协议族
AFNOSUPPORT = 47, // 地址族不受协议族支持
ADDRINUSE = 48, // 地址已被使用
ADDRNOTAVAIL = 49, // 无法分配请求的地址
// 进程间通信或网络软件——运行错误
NETDOWN = 50, // 网络已关闭
NETUNREACH = 51, // 网络不可达
NETRESET = 52, // 网络因重置而断开连接
CONNABORTED = 53, // 软件导致连接中止
CONNRESET = 54, // 连接被对端重置
NOBUFS = 55, // 没有可用的缓冲区空间
ISCONN = 56, // 套接字已连接
NOTCONN = 57, // 套接字未连接
SHUTDOWN = 58, // 套接字关闭后无法发送
TOOMANYREFS = 59, // 引用过多:无法拼接
TIMEDOUT = 60, // 操作超时
CONNREFUSED = 61, // 连接被拒绝
LOOP = 62, // 遇到过多层符号链接
NAMETOOLONG = 63, // 文件名过长
// 应重新排列
HOSTDOWN = 64, // 主机已关闭
HOSTUNREACH = 65, // 无到主机的路由
NOTEMPTY = 66, // 目录非空
// 配额及杂项
PROCLIM = 67, // 进程过多
USERS = 68, // 用户过多
DQUOT = 69, // 超出磁盘配额
// 网络文件系统
STALE = 70, // 失效的 NFS 文件句柄
REMOTE = 71, // 路径中的远程层级过多
BADRPC = 72, // RPC 结构错误
RPCMISMATCH = 73, // RPC 版本错误
PROGUNAVAIL = 74, // RPC 程序不可用
PROGMISMATCH = 75, // 程序版本错误
PROCUNAVAIL = 76, // 程序的过程错误
NOLCK = 77, // 没有可用的锁
NOSYS = 78, // 函数未实现
FTYPE = 79, // 文件类型或格式不合适
AUTH = 80, // 身份验证错误
NEEDAUTH = 81, // 需要身份验证器
IPSEC = 82, // IPsec 处理失败
NOATTR = 83, // 找不到属性
// 宽字符/多字节字符处理,ISO/IEC 9899/AMD1:1995
ILSEQ = 84, // 非法字节序列
NOMEDIUM = 85, // 未找到介质
MEDIUMTYPE = 86, // 介质类型错误
OVERFLOW = 87, // 值过大,无法存入数据类型
CANCELED = 88, // 操作已取消
IDRM = 89, // 标识符已移除
NOMSG = 90, // 没有所需类型的消息
NOTSUP = 91, // 不支持
BADMSG = 92, // 消息错误或已损坏
NOTRECOVERABLE = 93, // 状态不可恢复
OWNERDEAD = 94, // 前一所有者已终止
PROTO = 95, // 协议错误
_,
};
pub const MAX_PAGE_SHIFT = switch (builtin.cpu.arch) {
.x86 => 12,
.sparc64 => 13,
};
pub const PTHREAD_STACK_MIN = switch (builtin.cpu.arch) {
.sparc64 => 1 << 13,
.mips64 => 1 << 14,
else => 1 << 12,
};
// https://github.com/openbsd/src/blob/718a31b40d39fc6064de6355eb144e74633133fc/sys/netinet/in.h#L283
pub const IP = struct {
pub const OPTIONS = 1;
pub const HDRINCL = 2;
pub const TOS = 3;
pub const TTL = 4;
pub const RECVOPTS = 5;
pub const RECVRETOPTS = 6;
pub const RECVDSTADDR = 7;
pub const RETOPTS = 8;
pub const MULTICAST_IF = 9;
pub const MULTICAST_TTL = 10;
pub const MULTICAST_LOOP = 11;
pub const ADD_MEMBERSHIP = 12;
pub const DROP_MEMBERSHIP = 13;
pub const PORTRANGE = 19;
pub const AUTH_LEVEL = 20;
pub const ESP_TRANS_LEVEL = 21;
pub const ESP_NETWORK_LEVEL = 22;
pub const IPSEC_LOCAL_ID = 23;
pub const IPSEC_REMOTE_ID = 24;
pub const IPSEC_LOCAL_CRED = 25;
pub const IPSEC_REMOTE_CRED = 26;
pub const IPSEC_LOCAL_AUTH = 27;
pub const IPSEC_REMOTE_AUTH = 28;
pub const IPCOMP_LEVEL = 29;
pub const RECVIF = 30;
pub const RECVTTL = 31;
pub const MINTTL = 32;
pub const RECVDSTPORT = 33;
pub const PIPEX = 34;
pub const RECVRTABLE = 35;
pub const IPSECFLOWINFO = 36;
pub const IPDEFTTL = 37;
pub const SENDSRCADDR = RECVDSTADDR;
pub const RTABLE = 0x1021;
pub const DEFAULT_MULTICAST_TTL = 1;
pub const DEFAULT_MULTICAST_LOOP = 1;
pub const MIN_MEMBERSHIPS = 15;
pub const MAX_MEMBERSHIPS = 4095;
pub const PORTRANGE_DEFAULT = 0;
pub const PORTRANGE_HIGH = 1;
pub const PORTRANGE_LOW = 2;
};
// https://github.com/openbsd/src/blob/718a31b40d39fc6064de6355eb144e74633133fc/sys/netinet6/in6.h#L284
pub const IPV6 = struct {
pub const UNICAST_HOPS = 4;
pub const MULTICAST_IF = 9;
pub const MULTICAST_HOPS = 10;
pub const MULTICAST_LOOP = 11;
pub const JOIN_GROUP = 12;
pub const LEAVE_GROUP = 13;
pub const PORTRANGE = 14;
pub const CHECKSUM = 26;
pub const V6ONLY = 27;
pub const RTHDRDSTOPTS = 35;
pub const RECVPKTINFO = 36;
pub const RECVHOPLIMIT = 37;
pub const RECVRTHDR = 38;
pub const RECVHOPOPTS = 39;
pub const RECVDSTOPTS = 40;
pub const USE_MIN_MTU = 42;
pub const RECVPATHMTU = 43;
pub const PATHMTU = 44;
pub const PKTINFO = 46;
pub const HOPLIMIT = 47;
pub const NEXTHOP = 48;
pub const HOPOPTS = 49;
pub const DSTOPTS = 50;
pub const RTHDR = 51;
pub const AUTH_LEVEL = 53;
pub const ESP_TRANS_LEVEL = 54;
pub const ESP_NETWORK_LEVEL = 55;
pub const RECVTCLASS = 57;
pub const AUTOFLOWLABEL = 59;
pub const IPCOMP_LEVEL = 60;
pub const TCLASS = 61;
pub const DONTFRAG = 62;
pub const PIPEX = 63;
pub const RECVDSTPORT = 64;
pub const MINHOPCOUNT = 65;
pub const RTABLE = 0x1021;
pub const RTHDR_LOOSE = 0;
pub const RTHDR_TYPE_0 = 0;
pub const DEFAULT_MULTICAST_HOPS = 1;
pub const DEFAULT_MULTICAST_LOOP = 1;
pub const PORTRANGE_DEFAULT = 0;
pub const PORTRANGE_HIGH = 1;
pub const PORTRANGE_LOW = 2;
};
// https://github.com/openbsd/src/blob/718a31b40d39fc6064de6355eb144e74633133fc/sys/netinet/ip.h#L73
pub const IPTOS = struct {
pub const LOWDELAY = 0x10;
pub const THROUGHPUT = 0x08;
pub const RELIABILITY = 0x04;
pub const CE = 0x01;
pub const ECT = 0x02;
pub const PREC_NETCONTROL = 0xe0;
pub const PREC_INTERNETCONTROL = 0xc0;
pub const PREC_CRITIC_ECP = 0xa0;
pub const PREC_FLASHOVERRIDE = 0x80;
pub const PREC_FLASH = 0x60;
pub const PREC_IMMEDIATE = 0x40;
pub const PREC_PRIORITY = 0x20;
pub const PREC_ROUTINE = 0x00;
pub const DSCP_CS0 = 0x00;
pub const DSCP_LE = 0x04;
pub const DSCP_CS1 = 0x20;
pub const DSCP_AF11 = 0x28;
pub const DSCP_AF12 = 0x30;
pub const DSCP_AF13 = 0x38;
pub const DSCP_CS2 = 0x40;
pub const DSCP_AF21 = 0x48;
pub const DSCP_AF22 = 0x50;
pub const DSCP_AF23 = 0x58;
pub const DSCP_CS3 = 0x60;
pub const DSCP_AF31 = 0x68;
pub const DSCP_AF32 = 0x70;
pub const DSCP_AF33 = 0x78;
pub const DSCP_CS4 = 0x80;
pub const DSCP_AF41 = 0x88;
pub const DSCP_AF42 = 0x90;
pub const DSCP_AF43 = 0x98;
pub const DSCP_CS5 = 0xa0;
pub const DSCP_EF = 0xb8;
pub const DSCP_CS6 = 0xc0;
pub const DSCP_CS7 = 0xe0;
pub const ECN_NOTECT = 0x00;
pub const ECN_ECT1 = 0x01;
pub const ECN_ECT0 = 0x02;
pub const ECN_CE = 0x03;
pub const ECN_MASK = 0x03;
};
// https://github.com/openbsd/src/blob/5761484065d1eed341f812f818ecf3f79138e7c6/sys/netinet/tcp.h#L215
pub const TCP = struct {
pub const NODELAY = 0x01;
pub const MAXSEG = 0x02;
pub const MD5SIG = 0x04;
pub const SACK_ENABLE = 0x08;
pub const INFO = 0x09;
pub const NOPUSH = 0x10;
};