[][src]Enum librs::linux::syscall::amd64::Syscall

#[repr(usize)]pub enum Syscall {
    Read,
    Write,
    Open,
    Close,
    Stat,
    FStat,
    LStat,
    Poll,
    LSeek,
    MMap,
    MProtect,
    MUnmap,
    Brk,
    RT_SigAction,
    RT_SigProcMask,
    RT_SigReturn,
    IOCtl,
    PRead64,
    PWrite64,
    ReadV,
    WriteV,
    Access,
    Pipe,
    Select,
    Sched_Yield,
    MRemap,
    MSync,
    MInCore,
    MAdvise,
    SHMGet,
    SHMAt,
    SHMCtl,
    Dup,
    Dup2,
    Pause,
    NanoSleep,
    GetITimer,
    Alarm,
    SetITimer,
    GetPID,
    SendFile,
    Socket,
    Connect,
    Accept,
    SendTo,
    RecvFrom,
    SendMsg,
    RecvMsg,
    ShutDown,
    Bind,
    Listen,
    GetSockName,
    GetPeerName,
    SocketPair,
    SetSockOpt,
    GetSockOpt,
    Clone,
    Fork,
    VFork,
    ExecVE,
    Exit,
    Wait4,
    Kill,
    UName,
    SEMGet,
    SEMOp,
    SEMCtl,
    SHMdt,
    MsgGet,
    MsgSnd,
    MsgRcv,
    MsgCtl,
    FCntl,
    FLock,
    FSync,
    FDataSync,
    Truncate,
    FTruncate,
    GetDEnts,
    GetCwd,
    ChDir,
    FChDir,
    Rename,
    MkDir,
    RmDir,
    Creat,
    Link,
    Unlink,
    SymLink,
    ReadLink,
    ChMod,
    FChMod,
    ChOwn,
    FChOwn,
    LChOwn,
    UMask,
    GetTimeOfDay,
    GetRLimit,
    GetRUsage,
    SysInfo,
    Times,
    PTrace,
    GetUID,
    SysLog,
    GetGID,
    SetUID,
    SetGID,
    GetEUID,
    GetEGID,
    SetPGID,
    GetPPID,
    GetPGrp,
    SetSID,
    SetReUID,
    SetReGID,
    GetGroups,
    SetGroups,
    SetReSUID,
    GetReSUID,
    SetReSGID,
    GetReSGID,
    GetPGID,
    SetFSUID,
    SetFSGID,
    GetSID,
    CapGet,
    CapSet,
    RT_SigPending,
    RT_SigTimedWait,
    RT_SigQueueInfo,
    RT_SigSuspend,
    SigAltStack,
    UTime,
    MkNod,
    UseLib,
    Personality,
    UStat,
    StatFS,
    FStatFS,
    SysFS,
    Sched_GetPriority,
    Sched_SetPriority,
    Sched_SetParam,
    Sched_GetParam,
    Sched_SetScheduler,
    Sched_GetScheduler,
    Sched_Get_Priority_Max,
    Sched_Get_Priority_Min,
    Sched_RR_Get_Intervall,
    MLock,
    MUnlock,
    MLockAll,
    MUnlockAll,
    VHangUp,
    Modify_LDT,
    Pivot_Root,
    _SysCtl,
    PRCtl,
    Arch_PRCtl,
    AdjTimeX,
    SetRLimit,
    ChRoot,
    Sync,
    Acct,
    SetTimeOfDay,
    Mount,
    UMount2,
    SwapOn,
    SwapOff,
    Reboot,
    SetHostName,
    SetDomainName,
    IOPl,
    IOPerm,
    Create_Module,
    Init_Module,
    Delete_Module,
    Get_Kernel_Syms,
    Query_Module,
    QuotaCtl,
    NFSServCtl,
    GetPMsg,
    PutPMsg,
    AFS_Syscall,
    TuxCall,
    Security,
    GetTID,
    ReadAhead,
    SetXAttr,
    LSetXAttr,
    FSetXAttr,
    GetXAttr,
    LGetXAttr,
    FGetXAttr,
    ListXAttr,
    LListXAttr,
    FListXAttr,
    RemoveXAttr,
    LRemoveXAttr,
    FRemoveXAttr,
    TKill,
    Time,
    Futex,
    Sched_SetAffinity,
    Sched_GetAffinity,
    Set_Thread_Area,
    IO_Setup,
    IO_Destroy,
    IO_GetEvents,
    IO_Submit,
    IO_Cancel,
    Get_Thread_Area,
    LookUp_DCookie,
    EPoll_Create,
    EPoll_Ctl_Old,
    EPoll_Wait_Old,
    Remap_File_Pages,
    GetDEnts64,
    Set_TID_Address,
    Restart_Syscall,
    SEMTimeDop,
    FAdvise64,
    Timer_Create,
    Timer_SetTime,
    Timer_GetTime,
    Timer_GetOverRun,
    Timer_Delete,
    Clock_SetTime,
    Clock_GetTime,
    Clock_GetRes,
    Clock_NanoSleep,
    Exit_Group,
    EPoll_Wait,
    EPoll_Ctl,
    TGKill,
    UTimes,
    VServer,
    MBind,
    Set_MemPolicy,
    Get_MemPolicy,
    MQ_Open,
    MQ_Unlink,
    MQ_TimeSend,
    MQ_TimeReceive,
    MQ_Notify,
    MQ_GetSetAttr,
    KExec_Load,
    WaitID,
    Add_Key,
    Request_Key,
    KeyCtl,
    IOPrio_Set,
    IOPrio_Get,
    INotify_Init,
    INotify_Add_Watch,
    INotify_Rm_Watch,
    Migrate_Pages,
    OpenAt,
    MkDirAt,
    MkNodAt,
    FChOwnAt,
    FUTimesAt,
    NewFStatAt,
    UnlinkAt,
    RenameAt,
    LinkAt,
    SymLinkAt,
    ReadLinkAt,
    FChModAt,
    FAccessAt,
    PSelect6,
    PPoll,
    Unshare,
    Set_Robust_List,
    Get_Robust_List,
    Splice,
    Tee,
    Sync_File_Range,
    VMSplice,
    Move_Pages,
    UTimeNSAt,
    EPoll_PWait,
    SignalFD,
    TimerFD_Create,
    EventFD,
    FAllocate,
    TimerFD_SetTime,
    TimerFD_GetTime,
    Accept4,
    SignalFD4,
    EventFD2,
    EPoll_Create1,
    Dup3,
    Pipe2,
    INotify_Init1,
    PReadV,
    PWriteV,
    RT_TGSigQueueInfo,
    Perf_Event_Open,
    RecvMMsg,
    FANotify_Init,
    FANotify_Mark,
    PRLimit64,
    Name_To_Handle_At,
    Open_By_Handle_At,
    Clock_AdjTime,
    SyncFS,
    SendMMsg,
    SetNS,
    GetCPU,
    Process_VM_ReadV,
    Process_VM_WriteV,
    KCmp,
    FInit_Module,
    Schec_SetAttr,
    Schec_GetAttr,
    RenameAt2,
    SecComp,
    GetRandom,
    MemFD_Create,
    KExec_File_Load,
    BPF,
    ExecVEAt,
    UserFaultFD,
    MemBarrier,
    MLock2,
    Copy_File_Range,
    PReadV2,
    PWriteV2,
    PKey_MProtect,
    PKey_Alloc,
    PKey_Free,
    StatX,
    IO_PGetEvents,
    RSeq,
    PIDFD_Send_Signal,
    IO_URing_Setup,
    IO_URing_Enter,
    IO_URing_Register,
    Open_Tree,
    Move_Mount,
    FSOpen,
    FSConfig,
    FSMount,
    FSPick,
    PIDFD_Open,
    Clone3,
    OpenAt2,
    PIDFD_GetFD,
}

Syscall numbers.

Variants

Read

Read from a file descriptor and return number of bytes read:

  read
  (
    FileDescriptor  file,
    Buffer          buffer,
    usize           count,
  )
  ->  usize;
Write

Write to a file descriptor and return number of bytes written:

  write
  (
    FileDescriptor  file,
    Buffer          buffer,
    usize           count,
  )
  ->  usize;
Open
Close
Stat
FStat
LStat
Poll
LSeek
MMap
MProtect
MUnmap
Brk
RT_SigAction
RT_SigProcMask
RT_SigReturn
IOCtl
PRead64
PWrite64
ReadV
WriteV
Access
Pipe
Select
Sched_Yield
MRemap
MSync
MInCore
MAdvise
SHMGet
SHMAt
SHMCtl
Dup
Dup2
Pause
NanoSleep
GetITimer
Alarm
SetITimer
GetPID
SendFile
Socket
Connect
Accept
SendTo
RecvFrom
SendMsg
RecvMsg
ShutDown
Bind
Listen
GetSockName
GetPeerName
SocketPair
SetSockOpt
GetSockOpt
Clone
Fork
VFork
ExecVE
Exit
Wait4
Kill
UName
SEMGet
SEMOp
SEMCtl
SHMdt
MsgGet
MsgSnd
MsgRcv
MsgCtl
FCntl
FLock
FSync
FDataSync
Truncate
FTruncate
GetDEnts
GetCwd
ChDir
FChDir
Rename
MkDir
RmDir
Creat
ChMod
FChMod
ChOwn
FChOwn
LChOwn
UMask
GetTimeOfDay
GetRLimit
GetRUsage
SysInfo
Times
PTrace
GetUID
SysLog
GetGID
SetUID
SetGID
GetEUID
GetEGID
SetPGID
GetPPID
GetPGrp
SetSID
SetReUID
SetReGID
GetGroups
SetGroups
SetReSUID
GetReSUID
SetReSGID
GetReSGID
GetPGID
SetFSUID
SetFSGID
GetSID
CapGet
CapSet
RT_SigPending
RT_SigTimedWait
RT_SigQueueInfo
RT_SigSuspend
SigAltStack
UTime
MkNod
UseLib
Personality
UStat
StatFS
FStatFS
SysFS
Sched_GetPriority
Sched_SetPriority
Sched_SetParam
Sched_GetParam
Sched_SetScheduler
Sched_GetScheduler
Sched_Get_Priority_Max
Sched_Get_Priority_Min
Sched_RR_Get_Intervall
MLock
MUnlock
MLockAll
MUnlockAll
VHangUp
Modify_LDT
Pivot_Root
_SysCtl
PRCtl
Arch_PRCtl
AdjTimeX
SetRLimit
ChRoot
Sync
Acct
SetTimeOfDay
Mount
UMount2
SwapOn
SwapOff
Reboot
SetHostName
SetDomainName
IOPl
IOPerm
Create_Module
Init_Module
Delete_Module
Get_Kernel_Syms
Query_Module
QuotaCtl
NFSServCtl
GetPMsg
PutPMsg
AFS_Syscall
TuxCall
Security
GetTID
ReadAhead
SetXAttr
LSetXAttr
FSetXAttr
GetXAttr
LGetXAttr
FGetXAttr
ListXAttr
LListXAttr
FListXAttr
RemoveXAttr
LRemoveXAttr
FRemoveXAttr
TKill
Time
Futex
Sched_SetAffinity
Sched_GetAffinity
Set_Thread_Area
IO_Setup
IO_Destroy
IO_GetEvents
IO_Submit
IO_Cancel
Get_Thread_Area
LookUp_DCookie
EPoll_Create
EPoll_Ctl_Old
EPoll_Wait_Old
Remap_File_Pages
GetDEnts64
Set_TID_Address
Restart_Syscall
SEMTimeDop
FAdvise64
Timer_Create
Timer_SetTime
Timer_GetTime
Timer_GetOverRun
Timer_Delete
Clock_SetTime
Clock_GetTime
Clock_GetRes
Clock_NanoSleep
Exit_Group
EPoll_Wait
EPoll_Ctl
TGKill
UTimes
VServer
MBind
Set_MemPolicy
Get_MemPolicy
MQ_Open
MQ_TimeSend
MQ_TimeReceive
MQ_Notify
MQ_GetSetAttr
KExec_Load
WaitID
Add_Key
Request_Key
KeyCtl
IOPrio_Set
IOPrio_Get
INotify_Init
INotify_Add_Watch
INotify_Rm_Watch
Migrate_Pages
OpenAt
MkDirAt
MkNodAt
FChOwnAt
FUTimesAt
NewFStatAt
UnlinkAt
RenameAt
LinkAt
SymLinkAt
ReadLinkAt
FChModAt
FAccessAt
PSelect6
PPoll
Unshare
Set_Robust_List
Get_Robust_List
Splice
Tee
Sync_File_Range
VMSplice
Move_Pages
UTimeNSAt
EPoll_PWait
SignalFD
TimerFD_Create
EventFD
FAllocate
TimerFD_SetTime
TimerFD_GetTime
Accept4
SignalFD4
EventFD2
EPoll_Create1
Dup3
Pipe2
INotify_Init1
PReadV
PWriteV
RT_TGSigQueueInfo
Perf_Event_Open
RecvMMsg
FANotify_Init
FANotify_Mark
PRLimit64
Name_To_Handle_At
Open_By_Handle_At
Clock_AdjTime
SyncFS
SendMMsg
SetNS
GetCPU
Process_VM_ReadV
Process_VM_WriteV
KCmp
FInit_Module
Schec_SetAttr
Schec_GetAttr
RenameAt2
SecComp
GetRandom
MemFD_Create
KExec_File_Load
BPF
ExecVEAt
UserFaultFD
MemBarrier
MLock2
Copy_File_Range
PReadV2
PWriteV2
PKey_MProtect
PKey_Alloc
PKey_Free
StatX
IO_PGetEvents
RSeq
PIDFD_Send_Signal
IO_URing_Setup
IO_URing_Enter
IO_URing_Register
Open_Tree
Move_Mount
FSOpen
FSConfig
FSMount
FSPick
PIDFD_Open
Clone3
OpenAt2
PIDFD_GetFD

Implementations

impl Syscall[src]

pub fn read<T>(file: RawFd, buffer: T, count: usize) -> Result<Success, Failure> where
    T: Pointer
[src]

Safeish wrapper for Read. Read from count bytes from file descriptor file into buffer.

Errors

Fails if result is negativ.

Safety

Assuming this Syscall exists on this machine, is conforming to the standard and the buffer is large enough, this wrapper is safe.

Examples

Read 16 bytes from Standard Input to buffer:

  let buffer = [u8;16];
  let length = Syscall::read(fs::STDIN, &buffer, buffer.len());

pub fn write<T>(
    file: RawFd,
    buffer: T,
    count: usize
) -> Result<Success, Failure> where
    T: Pointer
[src]

Safeish wrapper for Write. Write count bytes from buffer to file descriptor file.

Errors

Fails if result is negativ.

Safety

Assuming this Syscall exists on this machine, is conforming to the standard and the buffer is large enough, this wrapper is safe.

Examples

Write »Hello World« to Standard Output:

  let buffer = "HelloWorld\n";
  let length = Syscall::write(fs::STDOUT, &buffer, buffer.len());

pub fn open(
    pathName: &str,
    flags: Flags,
    mode: Mode
) -> Result<Success, Failure>
[src]

Safeish wrapper for Open. Open and possibly create the file pathName with given flags. Set permissions to mode if creating the file.

Errors

Fails if result is negativ.

Safety

Assuming this Syscall exists on this machine, is conforming to the standard and the pathName is null-terminated, this wrapper is safe.

Examples

Read 16 bytes from Standard Input to buffer:

  let buffer = [u8;16];
  let length = Syscall::read(fs::STDIN, &buffer, buffer.len());

impl Syscall[src]

pub unsafe fn call0(self) -> Result<Success, Failure>[src]

Calls the Syscall without arguments.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call1(self, argument0: impl Argument) -> Result<Success, Failure>[src]

Calls the Syscall with one argument.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call2(
    self,
    argument0: impl Argument,
    argument1: impl Argument
) -> Result<Success, Failure>
[src]

Calls the Syscall with two arguments.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call3(
    self,
    argument0: impl Argument,
    argument1: impl Argument,
    argument2: impl Argument
) -> Result<Success, Failure>
[src]

Calls the Syscall with three arguments.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call4(
    self,
    argument0: impl Argument,
    argument1: impl Argument,
    argument2: impl Argument,
    argument3: impl Argument
) -> Result<Success, Failure>
[src]

Calls the Syscall with four arguments.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call5(
    self,
    argument0: impl Argument,
    argument1: impl Argument,
    argument2: impl Argument,
    argument3: impl Argument,
    argument4: impl Argument
) -> Result<Success, Failure>
[src]

Calls the Syscall with five arguments.

Errors

Fails if result is negativ.

Safety

Examples

pub unsafe fn call6(
    self,
    argument0: impl Argument,
    argument1: impl Argument,
    argument2: impl Argument,
    argument3: impl Argument,
    argument4: impl Argument,
    argument5: impl Argument
) -> Result<Success, Failure>
[src]

Calls the Syscall with six arguments.

Errors

Fails if result is negativ.

Safety

Examples

Auto Trait Implementations

impl RefUnwindSafe for Syscall

impl Send for Syscall

impl Sync for Syscall

impl Unpin for Syscall

impl UnwindSafe for Syscall

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.