Engine Capabilities & Reference
EMU supports intercepting a vast array of system calls and ships with standard Linux subsystem headers for immediate decoding. It operates in two primary modes depending on your hardware availability.
Standard Intercept Mode (Default)
By default, EMU acts as a transparent virtualization layer between your application and existing system resources.
In this mode, when the application calls open() on a device path or connect() to a server, the OS processes the request normally. The physical driver, file, or server must actually exist on the system.
EMU pauses the subsequent data transfer functions (such as read, write, ioctl, or recvfrom), allowing your TCL scripts to:
- Inspect or modify the payloads.
- Pass modified data to the real hardware.
- Return spoofed data back to the application.
Best For: Extending existing hardware, fault injection into real data streams, or modifying live configurations.
Pure Virtual Mode
Traditionally, if an application attempts to open() a missing device path like /dev/ttyUSB0, the OS rejects the call with an error, often crashing the application. EMU bypasses this limitation using Pure Virtual Mode, allowing you to create synthetic hardware without real drivers or servers.
| Resource Type | Interception Logic |
|---|---|
| Character Devices | EMU intercepts the open failure, opens a handle to /dev/null, and hands that valid File Descriptor to the application. |
| Network Sockets | EMU generates a kernel-level socketpair, hands one end to the app, and reserves the other for the TCL engine. |
This allows the application’s blocking loops (like poll()) to run natively against synthetic file descriptors, achieving a true “no hardware” test environment.
Intercepted System Calls
EMU’s engine is capable of hooking into the following POSIX operations:
Initialization & Teardown
open,openat,open64,openat64fopen,fopen64close
Character Devices
read,writelseek,ioctl,mmap
Networking
socket,connect,bindshutdown,send,recv,sendto,recvfrom
Discovery (sysfs)
stat,fstat,accessreaddir,opendir,closedirgetdents64
Polling
poll,epoll_wait