Network Services API  2.75.00.17
Data Structures | Macros | Typedefs | Enumerations | Functions
slnetif.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <ti/net/slnetsock.h>
Include dependency graph for slnetif.h:

Go to the source code of this file.

Data Structures

struct  SlNetIf_Config_t
 SlNetIf_Config_t structure contains all the function callbacks that are expected to be filled by the relevant network stack interface
Each interface has different capabilities, so not all the API's must be supported therefore an API's can be defined as: More...
 
struct  SlNetIf_t
 The SlNetIf_t structure holds the configuration of the interface Its ID, name, flags and the configuration list - SlNetIf_Config_t. More...
 

Macros

#define SLNETIF_ID_1   (1 << 0)
 
#define SLNETIF_ID_2   (1 << 1)
 
#define SLNETIF_ID_3   (1 << 2)
 
#define SLNETIF_ID_4   (1 << 3)
 
#define SLNETIF_ID_5   (1 << 4)
 
#define SLNETIF_ID_6   (1 << 5)
 
#define SLNETIF_ID_7   (1 << 6)
 
#define SLNETIF_ID_8   (1 << 7)
 
#define SLNETIF_ID_9   (1 << 8)
 
#define SLNETIF_ID_10   (1 << 9)
 
#define SLNETIF_ID_11   (1 << 10)
 
#define SLNETIF_ID_12   (1 << 11)
 
#define SLNETIF_ID_13   (1 << 12)
 
#define SLNETIF_ID_14   (1 << 13)
 
#define SLNETIF_ID_15   (1 << 14)
 
#define SLNETIF_ID_16   (1 << 15)
 
#define SLNETIF_MAX_IF   (16)
 
#define ONLY_ONE_BIT_IS_SET(x)   (((x > 0) && ((x & (x - 1)) == 0))?true:false)
 
#define SLNETIF_STATUS_DISCONNECTED   (0)
 
#define SLNETIF_STATUS_CONNECTED   (1)
 
#define SLNETIF_ADDR_CFG_UNKNOWN   (0)
 
#define SLNETIF_ADDR_CFG_DHCP   (1)
 
#define SLNETIF_ADDR_CFG_DHCP_LLA   (2)
 
#define SLNETIF_ADDR_CFG_STATIC   (4)
 
#define SLNETIF_ADDR_CFG_STATELESS   (5)
 
#define SLNETIF_ADDR_CFG_STATEFUL   (6)
 
#define SLNETIF_SEC_OBJ_TYPE_RSA_PRIVATE_KEY   (1)
 
#define SLNETIF_SEC_OBJ_TYPE_CERTIFICATE   (2)
 
#define SLNETIF_SEC_OBJ_TYPE_DH_KEY   (3)
 
#define SLNETIF_QUERY_IF_STATE_BIT   (1 << 0)
 
#define SLNETIF_QUERY_IF_CONNECTION_STATUS_BIT   (1 << 1)
 
#define SLNETIF_QUERY_IF_ALLOW_PARTIAL_MATCH_BIT   (1 << 2)
 

Typedefs

typedef struct SlNetIf_Config_t SlNetIf_Config_t
 SlNetIf_Config_t structure contains all the function callbacks that are expected to be filled by the relevant network stack interface
Each interface has different capabilities, so not all the API's must be supported therefore an API's can be defined as: More...
 
typedef struct SlNetIf_t SlNetIf_t
 The SlNetIf_t structure holds the configuration of the interface Its ID, name, flags and the configuration list - SlNetIf_Config_t. More...
 

Enumerations

enum  SlNetIfState_e {
  SLNETIF_STATE_DISABLE = 0,
  SLNETIF_STATE_ENABLE = 1
}
 Interface state bit pool to be used in set interface state function. More...
 
enum  SlNetIfAddressType_e {
  SLNETIF_IPV4_ADDR = 0,
  SLNETIF_IPV6_ADDR_LOCAL = 1,
  SLNETIF_IPV6_ADDR_GLOBAL = 2
}
 Address type enum to be used in get ip address function. More...
 

Functions

int32_t SlNetIf_init (int32_t flags)
 Initialize the SlNetIf module. More...
 
int32_t SlNetIf_add (uint16_t ifID, char *ifName, const SlNetIf_Config_t *ifConf, uint8_t priority)
 Add a new SlNetIf-compatible interface to the system. More...
 
SlNetIf_tSlNetIf_getIfByID (uint16_t ifID)
 Get interface configuration from interface ID. More...
 
SlNetIf_tSlNetIf_queryIf (uint32_t ifBitmap, uint32_t queryBitmap)
 Query for the highest priority interface, given a list of interfaces and properties. More...
 
const char * SlNetIf_getNameByID (uint16_t ifID)
 Get interface Name from interface ID. More...
 
int32_t SlNetIf_getIDByName (char *ifName)
 Get interface ID from interface name. More...
 
int32_t SlNetIf_getPriority (uint16_t ifID)
 Get interface priority. More...
 
int32_t SlNetIf_setPriority (uint16_t ifID, uint8_t priority)
 Set interface priority. More...
 
int32_t SlNetIf_setState (uint16_t ifID, SlNetIfState_e ifState)
 Set interface state. More...
 
int32_t SlNetIf_getState (uint16_t ifID)
 Get interface state. More...
 
int32_t SlNetIf_getConnectionStatus (uint16_t ifID)
 Get the connection status of an interface. More...
 
int32_t SlNetIf_getIPAddr (uint16_t ifID, SlNetIfAddressType_e addrType, uint16_t *addrConfig, uint32_t *ipAddr)
 Get IP Address of specific interface. More...
 
int32_t SlNetIf_loadSecObj (uint16_t objType, char *objName, int16_t objNameLen, uint8_t *objBuff, int16_t objBuffLen, uint32_t ifBitmap)
 Load/unload/replace a secure object into a network interface/stack. More...
 
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale