BSD Socket API for Simulator enables untouched Real World
Appli-cation(RWA) binaries to run on the powerful modern general-purpose
network simulators. It is simulator independent, so it can make use of
the powerful functionality and versatile tools provided by modern
general-purpose simulators such as NS-2. It is fully compatible with BSD
Socket API, so RWA can run on it without re-linking and re-compiling. It
is transparent to RWA, so RWAs are run on BSD Socket API for Simulator
as they are on normal operating systems. BSD Socket API for Simulator is
built on the concept of message redirecting. It has two critical parts:
shared library and customized simulator application. The shared library
is loaded into the address space of RWA. On one hand, messages sent by
RWA are captured by the shared library and redirected to the customized
simulator application. On the other hand, messages from simulator are
redirected by the customized simulator application to the shared
library.