Types
EpollData {.importc: "epoll_data_t", header: "<sys/epoll.h>", pure, final, union.} = object `ptr`* {.importc: "ptr".}: pointer fd* {.importc: "fd".}: cint u32* {.importc: "u32".}: uint32 u64* {.importc: "u64".}: uint64
- Source Edit
EpollEvent {.importc: "struct epoll_event", header: "<sys/epoll.h>", pure, final, packed.} = object events*: uint32 data*: EpollData
- Source Edit
IfAddrMessage = object ifa_family*: byte ifa_prefixlen*: byte ifa_flags*: byte ifa_scope*: byte ifa_index*: uint32
- Source Edit
IfInfoMessage = object ifi_family*: byte ifi_pad*: byte ifi_type*: cushort ifi_index*: cint ifi_flags*: cuint ifi_change*: cuint
- Source Edit
NlMsgHeader = object nlmsg_len*: uint32 nlmsg_type*: uint16 nlmsg_flags*: uint16 nlmsg_seq*: uint32 nlmsg_pid*: uint32
- Source Edit
NLReq = object hdr*: NlMsgHeader msg*: RtGenMsg
- Source Edit
NLRouteReq = object hdr*: NlMsgHeader msg*: RtMessage
- Source Edit
PosixSpawnAttr {.importc: "posix_spawnattr_t", header: "<spawn.h>", final, pure.} = object flags*: cshort pgrp*: Pid sd*: Sigset ss*: Sigset sp*: SchedParam policy*: cint pad*: array[16, cint]
- Source Edit
PosixSpawnFileActions {.importc: "posix_spawn_file_actions_t", header: "<spawn.h>", final, pure.} = object allocated*: cint used*: cint actions*: pointer pad*: array[16, cint]
- Source Edit
RtMessage = object rtm_family*: byte rtm_dst_len*: byte rtm_src_len*: byte rtm_tos*: byte rtm_table*: byte rtm_protocol*: byte rtm_scope*: byte rtm_type*: byte rtm_flags*: cuint
- Source Edit
SchedParam {.importc: "struct sched_param", header: "<sched.h>", final, pure.} = object sched_priority*: cint sched_ss_low_priority*: cint ## Low scheduling priority for ## sporadic server. sched_ss_repl_period*: Timespec ## Replenishment period for ## sporadic server. sched_ss_init_budget*: Timespec ## Initial budget for sporadic server. sched_ss_max_repl*: cint ## Maximum pending replenishments for ## sporadic server.
- struct sched_param Source Edit
SignalFdInfo {.importc: "struct signalfd_siginfo", header: "<sys/signalfd.h>", pure, final.} = object ssi_signo*: uint32 ssi_errno*: int32 ssi_code*: int32 ssi_pid*: uint32 ssi_uid*: uint32 ssi_fd*: int32 ssi_tid*: uint32 ssi_band*: uint32 ssi_overrun*: uint32 ssi_trapno*: uint32 ssi_status*: int32 ssi_int*: int32 ssi_ptr*: uint64 ssi_utime*: uint64 ssi_stime*: uint64 ssi_addr*: uint64 pad* {.importc: "__pad".}: array[0 .. 47, uint8]
- Source Edit
Sockaddr_nl = object family*: cushort pad*: cushort pid*: uint32 groups*: uint32
- Source Edit
Consts
AF_NETLINK = 16'i32
- Source Edit
ARPHRD_ARCNET = 7
- Source Edit
ARPHRD_ATM = 19
- Source Edit
ARPHRD_CISCO = 513
- Source Edit
ARPHRD_CSLIP = 257
- Source Edit
ARPHRD_CSLIP6 = 259
- Source Edit
ARPHRD_EETHER = 2
- Source Edit
ARPHRD_ETHER = 1
- Source Edit
ARPHRD_FRAD = 770
- Source Edit
ARPHRD_HDLC = 513
- Source Edit
ARPHRD_HIPPI = 780
- Source Edit
ARPHRD_IEEE1394 = 24
- Source Edit
ARPHRD_IEEE80211 = 801
- Source Edit
ARPHRD_IEEE80211_PRISM = 802
- Source Edit
ARPHRD_LAPB = 516
- Source Edit
ARPHRD_LOOPBACK = 772
- Source Edit
ARPHRD_PPP = 512
- Source Edit
ARPHRD_SLIP = 256
- Source Edit
ARPHRD_SLIP6 = 258
- Source Edit
EFD_CLOEXEC = 524288'i32
- Source Edit
EFD_NONBLOCK = 2048'i32
- Source Edit
EPOLL_CTL_ADD = 1
- Source Edit
EPOLL_CTL_DEL = 2
- Source Edit
EPOLL_CTL_MOD = 3
- Source Edit
EPOLLEXCLUSIVE = 268435456
- Source Edit
EPOLLONESHOT = 1073741824
- Source Edit
EPOLLRDBAND = 0x00000080
- Source Edit
EPOLLRDHUP = 0x00002000
- Source Edit
EPOLLRDNORM = 0x00000040
- Source Edit
EPOLLWAKEUP = 536870912
- Source Edit
EPOLLWRBAND = 0x00000200
- Source Edit
EPOLLWRNORM = 0x00000100
- Source Edit
IFA_ADDRESS = 1
- Source Edit
IFLA_ADDRESS = 1
- Source Edit
IFLA_IFNAME = 3
- Source Edit
IFLA_OPERSTATE = 16
- Source Edit
IFLIST_REPLY_BUFFER = 8192
- Source Edit
INVALID_HANDLE_VALUE = -1'i32
- Source Edit
INVALID_SOCKET = -1'i32
- Source Edit
InvalidSocketHandle = -1'i32
- Source Edit
IP_MULTICAST_TTL: cint = 33
- Source Edit
IPPROTO_TCP = 6
- Source Edit
IPV6_V6ONLY = 26
- Source Edit
NETLINK_ROUTE = 0'i32
- Source Edit
NLM_F_DUMP = 768
- Source Edit
NLM_F_MATCH = 0x00000200
- Source Edit
NLM_F_REQUEST = 1
- Source Edit
NLM_F_ROOT = 0x00000100
- Source Edit
NLMSG_ALIGNTO = 4'u
- Source Edit
NLMSG_DONE = 0x00000003
- Source Edit
NLMSG_ERROR = 0x00000002
- Source Edit
POSIX_SPAWN_RESETIDS = 0x00000001
- Source Edit
POSIX_SPAWN_SETPGROUP = 0x00000002
- Source Edit
POSIX_SPAWN_SETSCHEDPARAM = 0x00000004
- Source Edit
POSIX_SPAWN_SETSCHEDULER = 0x00000008
- Source Edit
POSIX_SPAWN_SETSIGDEF = 0x00000010
- Source Edit
POSIX_SPAWN_SETSIGMASK = 0x00000020
- Source Edit
POSIX_SPAWN_USEVFORK = 0x00000040
- Source Edit
RTA_ALIGNTO = 4'u
- Source Edit
RTA_GATEWAY = 5'u16
- Source Edit
RTA_PREFSRC = 7'u16
- Source Edit
RTM_F_LOOKUP_TABLE = 0x00001000
- Source Edit
RTM_GETADDR = 22
- Source Edit
RTM_GETLINK = 18
- Source Edit
RTM_GETROUTE = 26
- Source Edit
RTM_NEWLINK = 16'u16
- Source Edit
RTM_NEWROUTE = 24'u16
- Source Edit
SFD_CLOEXEC = 524288'i32
- Source Edit
SFD_NONBLOCK = 2048'i32
- Source Edit
SOCK_CLOEXEC = 0x00080000
- Source Edit
SOCK_NONBLOCK = 0x00000800
- Source Edit
TCP_NODELAY = 1'i32
- Source Edit
TFD_CLOEXEC = 524288'i32
- Source Edit
TFD_NONBLOCK = 2048'i32
- Source Edit
Procs
proc accept4(a1: cint; a2: ptr SockAddr; a3: ptr SockLen; a4: cint): cint {. importc, header: "<sys/socket.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc epoll_create(size: cint): cint {.importc: "epoll_create", header: "<sys/epoll.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc epoll_create1(flags: cint): cint {.importc: "epoll_create1", header: "<sys/epoll.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc epoll_ctl(epfd: cint; op: cint; fd: cint; event: ptr EpollEvent): cint {. importc: "epoll_ctl", header: "<sys/epoll.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc epoll_wait(epfd: cint; events: ptr EpollEvent; maxevents: cint; timeout: cint): cint {.importc: "epoll_wait", header: "<sys/epoll.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc eventfd(count: cuint; flags: cint): cint {.cdecl, importc: "eventfd", header: "<sys/eventfd.h>", ...raises: [], tags: [].}
- Source Edit
proc pipe2(a: array[0 .. 1, cint]; flags: cint): cint {.importc, header: "<unistd.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawn(a1: var Pid; a2: cstring; a3: var PosixSpawnFileActions; a4: var PosixSpawnAttr; a5, a6: cstringArray): cint {. importc: "posix_spawn", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrDestroy(a1: var PosixSpawnAttr): cint {. importc: "posix_spawnattr_destroy", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetFlags(a1: var PosixSpawnAttr; a2: var cshort): cint {. importc: "posix_spawnattr_getflags", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetPgroup(a1: var PosixSpawnAttr; a2: var Pid): cint {. importc: "posix_spawnattr_getpgroup", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetSchedParam(a1: var PosixSpawnAttr; a2: var SchedParam): cint {. importc: "posix_spawnattr_getschedparam", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetSchedPolicy(a1: var PosixSpawnAttr; a2: var cint): cint {. importc: "posix_spawnattr_getschedpolicy", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetSigDefault(a1: var PosixSpawnAttr; a2: var Sigset): cint {. importc: "posix_spawnattr_getsigdefault", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrGetSigMask(a1: var PosixSpawnAttr; a2: var Sigset): cint {. importc: "posix_spawnattr_getsigmask", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrInit(a1: var PosixSpawnAttr): cint {. importc: "posix_spawnattr_init", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetFlags(a1: var PosixSpawnAttr; a2: cint): cint {. importc: "posix_spawnattr_setflags", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetPgroup(a1: var PosixSpawnAttr; a2: Pid): cint {. importc: "posix_spawnattr_setpgroup", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetSchedParam(a1: var PosixSpawnAttr; a2: var SchedParam): cint {. importc: "posix_spawnattr_setschedparam", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetSchedPolicy(a1: var PosixSpawnAttr; a2: cint): cint {. importc: "posix_spawnattr_setschedpolicy", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetSigDefault(a1: var PosixSpawnAttr; a2: var Sigset): cint {. importc: "posix_spawnattr_setsigdefault", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnAttrSetSigMask(a1: var PosixSpawnAttr; a2: var Sigset): cint {. importc: "posix_spawnattr_setsigmask", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnFileActionsAddClose(a1: var PosixSpawnFileActions; a2: cint): cint {. importc: "posix_spawn_file_actions_addclose", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnFileActionsAddDup2(a1: var PosixSpawnFileActions; a2, a3: cint): cint {. importc: "posix_spawn_file_actions_adddup2", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnFileActionsAddOpen(a1: var PosixSpawnFileActions; a2: cint; a3: cstring; a4: cint; a5: Mode): cint {. importc: "posix_spawn_file_actions_addopen", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnFileActionsDestroy(a1: var PosixSpawnFileActions): cint {. importc: "posix_spawn_file_actions_destroy", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnFileActionsInit(a1: var PosixSpawnFileActions): cint {. importc: "posix_spawn_file_actions_init", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc posixSpawnp(a1: var Pid; a2: cstring; a3: var PosixSpawnFileActions; a4: var PosixSpawnAttr; a5, a6: cstringArray): cint {. importc: "posix_spawnp", header: "<spawn.h>", sideEffect, ...raises: [], tags: [].}
- Source Edit
proc signalfd(fd: cint; mask: var Sigset; flags: cint): cint {.cdecl, importc: "signalfd", header: "<sys/signalfd.h>", ...raises: [], tags: [].}
- Source Edit
proc timerfd_create(clock_id: ClockId; flags: cint): cint {.cdecl, importc: "timerfd_create", header: "<sys/timerfd.h>", ...raises: [], tags: [].}
- Source Edit
proc timerfd_settime(ufd: cint; flags: cint; utmr: var Itimerspec; otmr: var Itimerspec): cint {.cdecl, importc: "timerfd_settime", header: "<sys/timerfd.h>", ...raises: [], tags: [].}
- Source Edit
Templates
template WAITEXITSTATUS(s: cint): cint
- Source Edit
template WAITIFCONTINUED(s: cint): bool
- Source Edit
template WAITIFEXITED(s: cint): bool
- Source Edit
template WAITIFSIGNALED(s: cint): bool
- Source Edit
template WAITIFSTOPPED(s: cint): bool
- Source Edit
template WAITSTOPSIG(s: cint): cint
- Source Edit
template WAITTERMSIG(s: cint): cint
- Source Edit
Exports
-
EPERM, ENOBUFS, EFAULT, EKEYREJECTED, EHWPOISON, EHOSTDOWN, EDQUOT, EREMCHG, EISDIR, ESTRPIPE, EMLINK, ENXIO, ETOOMANYREFS, ENOMEDIUM, EOVERFLOW, EAFNOSUPPORT, ENOTCONN, ECHILD, ESOCKTNOSUPPORT, EBFONT, ESRMNT, ENOTEMPTY, ESTALE, EPROTO, EADDRNOTAVAIL, EXDEV, EBADF, EKEYREVOKED, ENOTDIR, EDEADLK, EALREADY, ESPIPE, ENOEXEC, ENETDOWN, EACCES, ELNRNG, ELOOP, ENODEV, ENFILE, ENOPKG, ENOCSI, ECHRNG, EL3HLT, EINVAL, EADDRINUSE, EUNATCH, EBADFD, EMEDIUMTYPE, ERESTART, ESRCH, ETXTBSY, ENETUNREACH, EPROTONOSUPPORT, ECANCELED, EBADMSG, EMFILE, ENOSYS, ERANGE, EDEADLOCK, ENOKEY, EILSEQ, EBUSY, EROFS, ENOTSOCK, ECONNREFUSED, ELIBMAX, EBADRQC, ECOMM, EL2HLT, EIDRM, ENOTBLK, ENOTTY, EOPNOTSUPP, EISNAM, ENOSR, EXFULL, EPROTOTYPE, EUCLEAN, ENOSTR, ENOTRECOVERABLE, ENOANO, ERFKILL, ENOENT, EISCONN, ELIBEXEC, EMULTIHOP, ELIBACC, ENOLCK, EHOSTUNREACH, ENETRESET, ECONNRESET, EINPROGRESS, E2BIG, EIO, ENODATA, ESHUTDOWN, EFBIG, ELIBBAD, EOWNERDEAD, ETIMEDOUT, ECONNABORTED, ENOSPC, EBADSLT, ETIME, EINTR, EEXIST, ENONET, EREMOTEIO, EPFNOSUPPORT, ENOLINK, ENOMSG, EDOM, EMSGSIZE, EPIPE, EBADE, ENOMEM, ELIBSCN, ENOPROTOOPT, EDESTADDRREQ, ENAVAIL, ENOTNAM, EADV, EDOTDOT, EUSERS, EKEYEXPIRED, EBADR, EL3RST, EAGAIN, ENOTUNIQ, EWOULDBLOCK, ENAMETOOLONG, EREMOTE, EL2NSYNC