An external C Library can be loaded into NS2 using Luas built in require function.
When making the DLL to be loaded, if using C++, Lua can be exposed to C or vice versa with Luabind