This package provides a low-level and modern .NET P/Invoke wrapper around the musl libc library for accessing low-level sys kernel functions.
This package is part of the XenoAtom.Interop project.
musl libc is an implementation of the C standard library providing access to the Linux kernel syscalls. For more information, see musl website.
After installing the package, you can access the library through the static class XenoAtom.Interop.musl
.
For more information, see the official documentation at https://musl.libc.org/manual.html.
Example of using this library in C#:
using static XenoAtom.Interop.musl;
var ret = mkdir("test_directory", S_IRWXU | S_IRWXG | S_IRWXO);
if (ret == -1)
{
var lerrno = errno;
// ...
}
Notice that is library requires the library
musl
to be installed on the target system. This library is only supported on Linux.This library is available by default on Alpine Linux. For other distributions, you will need to install the
musl
package.
This library does not provide C native binaries but only P/Invoke .NET bindings to musl
1.2.5-r0
.
If the native library is already installed on your system, check the version installed. If you are using this library on Alpine Linux, see the compatible version in the Supported API section below. Other OS might require a different setup.
This package is based on the following header version:
- musl C include headers:
musl-dev
- Version:
1.2.5-r0
- Distribution: AlpineLinux
v3.20
The following API were automatically generated from the C/C++ code:
- cachectl.h:
_flush_cache
,cachectl
,cacheflush
- epoll.h:
epoll_create
,epoll_create1
,epoll_ctl
,epoll_pwait
,epoll_wait
- errno.h:
__errno_location
- eventfd.h:
eventfd
,eventfd_read
,eventfd_write
- fanotify.h:
fanotify_init
,fanotify_mark
- fcntl.h:
creat
,fallocate
,fcntl
,name_to_handle_at
,open
,open_by_handle_at
,openat
,posix_fadvise
,posix_fallocate
,readahead
,splice
,sync_file_range
,tee
,vmsplice
- file.h:
flock
- fsuid.h:
setfsgid
,setfsuid
- inotify.h:
inotify_add_watch
,inotify_init
,inotify_init1
,inotify_rm_watch
- io.h:
ioperm
,iopl
- ioctl.h:
ioctl
- ipc.h:
ftok
- klog.h:
klogctl
- membarrier.h:
membarrier
- mman.h:
madvise
,memfd_create
,mincore
,mlock
,mlock2
,mlockall
,mmap
,mprotect
,mremap
,msync
,munlock
,munlockall
,munmap
,posix_madvise
,remap_file_pages
,shm_open
,shm_unlink
- mount.h:
mount
,umount
,umount2
- mqueue.h:
mq_close
,mq_getattr
,mq_notify
,mq_open
,mq_receive
,mq_send
,mq_setattr
,mq_timedreceive
,mq_timedsend
,mq_unlink
- personality.h:
personality
- poll.h:
poll
,ppoll
- prctl.h:
prctl
- ptrace.h:
ptrace
- quota.h:
quotactl
- random.h:
getrandom
- reboot.h:
reboot
- resource.h:
getpriority
,getrlimit
,getrusage
,prlimit
,setpriority
,setrlimit
- sched.h:
__sched_cpucount
,calloc
,free
,memcmp
,memcpy
,memset
,sched_get_priority_max
,sched_get_priority_min
,sched_getaffinity
,sched_getcpu
,sched_getparam
,sched_getscheduler
,sched_rr_get_interval
,sched_setaffinity
,sched_setparam
,sched_setscheduler
,sched_yield
,setns
,unshare
- select.h:
pselect
,select
- sem.h:
semctl
,semget
,semop
,semtimedop
- sendfile.h:
sendfile
- shm.h:
shmat
,shmctl
,shmdt
,shmget
- signal.h:
__libc_current_sigrtmax
,__libc_current_sigrtmin
,bsd_signal
,kill
,killpg
,psiginfo
,psignal
,pthread_kill
,pthread_sigmask
,raise
,sigaction
,sigaddset
,sigaltstack
,sigandset
,sigdelset
,sigemptyset
,sigfillset
,sighold
,sigignore
,siginterrupt
,sigisemptyset
,sigismember
,signal
,sigorset
,sigpause
,sigpending
,sigprocmask
,sigqueue
,sigrelse
,sigset
,sigsuspend
,sigtimedwait
,sigwait
,sigwaitinfo
- signalfd.h:
signalfd
- socket.h:
accept
,accept4
,bind
,connect
,getpeername
,getsockname
,getsockopt
,listen
,recv
,recvfrom
,recvmmsg
,recvmsg
,send
,sendmmsg
,sendmsg
,sendto
,setsockopt
,shutdown
,sockatmark
,socket
,socketpair
- stat.h:
chmod
,fchmod
,fchmodat
,fstat
,fstat
,fstatat
,fstatat
,futimens
,lchmod
,lstat
,lstat
,mkdir
,mkdirat
,mkfifo
,mkfifoat
,mknod
,mknodat
,stat
,stat
,statx
,umask
,utimensat
- statfs.h:
fstatfs
,statfs
- statvfs.h:
fstatvfs
,statvfs
- stropts.h:
isastream
- swap.h:
swapoff
,swapon
- sysinfo.h:
get_avphys_pages
,get_nprocs
,get_nprocs_conf
,get_phys_pages
,sysinfo
- syslog.h:
closelog
,openlog
,setlogmask
,syslog
- termios.h:
cfgetispeed
,cfgetospeed
,cfmakeraw
,cfsetispeed
,cfsetospeed
,cfsetspeed
,tcdrain
,tcflow
,tcflush
,tcgetattr
,tcgetsid
,tcgetwinsize
,tcsendbreak
,tcsetattr
,tcsetwinsize
- time.h:
adjtime
,asctime
,asctime_r
,clock
,clock_getcpuclockid
,clock_getres
,clock_gettime
,clock_nanosleep
,clock_settime
,ctime
,ctime_r
,difftime
,futimes
,futimesat
,getdate
,getitimer
,gettimeofday
,gmtime
,gmtime_r
,localtime
,localtime_r
,lutimes
,mktime
,nanosleep
,setitimer
,settimeofday
,stime
,strftime
,strftime_l
,strptime
,time
,timegm
,timer_create
,timer_delete
,timer_getoverrun
,timer_gettime
,timer_settime
,timespec_get
,tzset
,utimes
- timeb.h:
ftime
- timerfd.h:
timerfd_create
,timerfd_gettime
,timerfd_settime
- times.h:
times
- timex.h:
adjtimex
,clock_adjtime
- ucontext.h:
getcontext
,getcontext
,makecontext
,makecontext
,setcontext
,setcontext
,swapcontext
,swapcontext
- uio.h:
preadv
,preadv2
,process_vm_readv
,process_vm_writev
,pwritev
,pwritev2
,readv
,writev
- unistd.h:
_Fork
,_exit
,access
,acct
,alarm
,brk
,chdir
,chown
,chroot
,close
,confstr
,copy_file_range
,crypt
,ctermid
,daemon
,dup
,dup2
,dup3
,eaccess
,encrypt
,endusershell
,euidaccess
,execv
,execve
,execvp
,execvpe
,faccessat
,fchdir
,fchown
,fchownat
,fdatasync
,fexecve
,fork
,fpathconf
,fsync
,ftruncate
,get_current_dir_name
,getcwd
,getdomainname
,getdtablesize
,getegid
,getentropy
,geteuid
,getgid
,getgroups
,gethostid
,gethostname
,getlogin
,getlogin_r
,getopt
,getpagesize
,getpass
,getpgid
,getpgrp
,getpid
,getppid
,getresgid
,getresuid
,getsid
,gettid
,getuid
,getusershell
,isatty
,issetugid
,lchown
,link
,linkat
,lockf
,lseek
,nice
,pathconf
,pause
,pipe
,pipe2
,posix_close
,pread
,pwrite
,read
,readlink
,readlinkat
,rmdir
,sbrk
,setdomainname
,setegid
,seteuid
,setgid
,setgroups
,sethostname
,setpgid
,setpgrp
,setregid
,setresgid
,setresuid
,setreuid
,setsid
,setuid
,setusershell
,sleep
,swab
,symlink
,symlinkat
,sync
,syncfs
,syscall
,sysconf
,tcgetpgrp
,tcsetpgrp
,truncate
,ttyname
,ttyname_r
,ualarm
,unlink
,unlinkat
,usleep
,vfork
,vhangup
,write
- utime.h:
utime
- utsname.h:
uname
- wait.h:
wait
,wait3
,wait4
,waitid
,waitpid
- xattr.h:
fgetxattr
,flistxattr
,fremovexattr
,fsetxattr
,getxattr
,lgetxattr
,listxattr
,llistxattr
,lremovexattr
,lsetxattr
,removexattr
,setxattr
This software is released under the BSD-2-Clause license.
Alexandre Mutel aka xoofx.