This patch consists of:
-Add NetworkInterface to wrap objects bound to a stack and update
socket code to handle this in addition to NetworkStacks
-Update MeshInterface to inherit from NetworkInterface
-Update NanostackInterface so it only inherits from NetworkStack
-Add MeshInterfaceNanostack and update LoWPANNDInterface and
ThreadInterface to inherit from this
Pros
- Easier to implement
- More similar to SIGIO in BDS sockets
Cons
- Less information, but this information had a high risk of being
faulty/spurious
Pros
- Allows memory to be statically allocated
- Avoids issues with Thread creation before entering main
- Matches existing APIs such as FunctionPointer and Ticker
Cons
- Does not enforce passing a NetworkInterface