![]() |
![]() |
Network Services API
2.00.00.16
|
The generic SlNetSock layer sits between the application/service and the interface stack. This guide describes the details of adding a network stack into the SlNetSock environment.
The porting steps for adding new interface:
Each interface needs to provide a set of API's to work with the interface. Some are mandatory, others are optional (but recommended).
The non-mandatory API's set:
The capabilities prototype should be declared in your slnetifxxx.h and implemented in your slnetifxxx.c
Each mandatory API's must be set, additional API's can be set or must be set to NULL.
An example config declaration for TI's SimpleLink CC31XX/CC32xx
In the example above the following API's are not supported by the interface, and are set to NULL:
Include the new file in the board header file in the application.
After configuring the capabilities of the interface, Adding the interface to the SlNetSock is required.
Use SlNetIf_add in order to add the interface and set his ID, Name, function list and priority. Later on you need to use the BSD API's or SlNetSock API's for socket handling.
After porting the layer into your setup, validate that your code work as expected