Skip to main content

EvalContextPrivExt

Trait EvalContextPrivExt 

Source
trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn socket_address(
        &self,
        address: &OpTy<'tcx>,
        address_len: &OpTy<'tcx>,
        foreign_name: &'static str,
    ) -> InterpResult<'tcx, Result<SocketAddr, IoError>> { ... }
    fn write_socket_address(
        &mut self,
        address: &SocketAddr,
        address_ptr: Pointer,
        address_len_ptr: Pointer,
        foreign_name: &'static str,
    ) -> InterpResult<'tcx, Result<(), IoError>> { ... }
    fn block_for_accept(
        &mut self,
        address_ptr: Pointer,
        address_len_ptr: Pointer,
        is_client_sock_nonblock: bool,
        socket: FileDescriptionRef<Socket>,
        dest: MPlaceTy<'tcx>,
    ) { ... }
    fn block_for_connect(
        &mut self,
        socket: FileDescriptionRef<Socket>,
        dest: MPlaceTy<'tcx>,
    ) { ... }
    fn block_for_send(
        &mut self,
        socket: FileDescriptionRef<Socket>,
        buffer_ptr: Pointer,
        length: usize,
        finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
    ) { ... }
    fn block_for_recv(
        &mut self,
        socket: FileDescriptionRef<Socket>,
        buffer_ptr: Pointer,
        length: usize,
        should_peek: bool,
        finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
    ) { ... }
}

Provided Methods§

Source

fn socket_address( &self, address: &OpTy<'tcx>, address_len: &OpTy<'tcx>, foreign_name: &'static str, ) -> InterpResult<'tcx, Result<SocketAddr, IoError>>

Attempt to turn an address and length operand into a standard library socket address.

Returns an IO error should the address length not match the address family length.

Source

fn write_socket_address( &mut self, address: &SocketAddr, address_ptr: Pointer, address_len_ptr: Pointer, foreign_name: &'static str, ) -> InterpResult<'tcx, Result<(), IoError>>

Attempt to write a standard library socket address into a pointer.

The address_len_ptr parameter serves both as input and output parameter. On input, it points to the size of the buffer address_ptr points to, and on output it points to the non-truncated size of the written address in the buffer pointed to by address_ptr.

If the address buffer doesn’t fit the whole address, the address is truncated to not overflow the buffer.

Source

fn block_for_accept( &mut self, address_ptr: Pointer, address_len_ptr: Pointer, is_client_sock_nonblock: bool, socket: FileDescriptionRef<Socket>, dest: MPlaceTy<'tcx>, )

Block the thread until there’s an incoming connection or an error occurred.

This recursively calls itself should the operation still block for some reason.

Source

fn block_for_connect( &mut self, socket: FileDescriptionRef<Socket>, dest: MPlaceTy<'tcx>, )

Block the thread until the stream is connected or an error occurred.

Source

fn block_for_send( &mut self, socket: FileDescriptionRef<Socket>, buffer_ptr: Pointer, length: usize, finish: DynMachineCallback<'tcx, Result<usize, IoError>>, )

Block the thread until we can send bytes into the connected socket or an error occurred.

This recursively calls itself should the operation still block for some reason.

Source

fn block_for_recv( &mut self, socket: FileDescriptionRef<Socket>, buffer_ptr: Pointer, length: usize, should_peek: bool, finish: DynMachineCallback<'tcx, Result<usize, IoError>>, )

Block the thread until we can receive bytes from the connected socket or an error occurred.

This recursively calls itself should the operation still block for some reason.

Implementors§

Source§

impl<'tcx> EvalContextPrivExt<'tcx> for MiriInterpCx<'tcx>