SimpleLink CC31xx/CC32xx Host Driver
Version 3.0.1.71
Simplifies the implementation of Internet connectivity
|
Activates networking applications, such as: HTTP Server, DHCP Server, Ping, DNS and mDNS. More...
Functions | |
_i16 | sl_NetAppStart (const _u32 AppBitMap) |
Starts a network application. More... | |
_i16 | sl_NetAppStop (const _u32 AppBitMap) |
Stops a network application. More... | |
_i16 | sl_NetAppArpFlush () |
Flush IPv4 ARP table. More... | |
_i16 | sl_NetAppNdFlush () |
Flush IPv6 Neighbor Discovery table. More... | |
_i16 | sl_NetAppDnsGetHostByName (_i8 *pHostName, const _u16 NameLen, _u32 *OutIpAddr, const _u8 Family) |
Get host IP by name Obtain the IP Address of machine on network, by machine name. More... | |
_i16 | sl_NetAppDnsGetHostByService (_i8 *pServiceName, const _u8 ServiceLen, const _u8 Family, _u32 pAddr[], _u32 *pPort, _u16 *pTextLen, _i8 *pText) |
Return service attributes like IP address, port and text according to service name The user sets a service name Full/Part (see example below), and should get: More... | |
_i16 | sl_NetAppGetServiceList (const _u8 IndexOffset, const _u8 MaxServiceCount, const _u8 Flags, _i8 *pBuffer, const _u32 BufferLength) |
Get service list Insert into out pBuffer a list of peer's services that are in the NWP without issuing any queries (relying on previous collected data). The list is in a form of service struct. The user should chose the type of the service struct like: More... | |
_i16 | sl_NetAppMDNSUnRegisterService (const _i8 *pServiceName, const _u8 ServiceNameLen, _u32 Options) |
Unregister mDNS service This function deletes the mDNS service from the mDNS package and the database. More... | |
_i16 | sl_NetAppMDNSRegisterService (const _i8 *pServiceName, const _u8 ServiceNameLen, const _i8 *pText, const _u8 TextLen, const _u16 Port, const _u32 TTL, _u32 Options) |
Register a new mDNS service This function registers a new mDNS service to the mDNS package and the DB. This registered service is a service offered by the application. The service name should be full service name according to RFC of the DNS-SD - meaning the value in name field in the SRV answer. Example for service name: More... | |
_i16 | sl_NetAppPing (const SlNetAppPingCommand_t *pPingParams, const _u8 Family, SlNetAppPingReport_t *pReport, const P_SL_DEV_PING_CALLBACK pPingCallback) |
send ICMP ECHO_REQUEST to network hosts More... | |
_i16 | sl_NetAppSet (const _u8 AppId, const _u8 Option, const _u8 OptionLen, const _u8 *pOptionValue) |
Setting network application configurations. More... | |
_i16 | sl_NetAppGet (const _u8 AppId, const _u8 Option, _u8 *pOptionLen, _u8 *pOptionValue) |
Getting network applications configurations. More... | |
_u16 | sl_NetAppSend (_u16 Handle, _u16 DataLen, _u8 *pData, _u32 Flags) |
Function for sending Netapp response or data following a Netapp request event (i.e. HTTP GET request) More... | |
_SlReturnVal_t | sl_NetAppRecv (_u16 Handle, _u16 *DataLen, _u8 *pData, _u32 *Flags) |
Function for retrieving data from the network processor following a Netapp request event (i.e. HTTP POST request) More... | |
Typedefs | |
typedef void(* | P_SL_DEV_PING_CALLBACK) (SlNetAppPingReport_t *) |
Activates networking applications, such as: HTTP Server, DHCP Server, Ping, DNS and mDNS.
_i16 sl_NetAppArpFlush | ( | ) |
Flush IPv4 ARP table.
[in] | None |
_i16 sl_NetAppDnsGetHostByName | ( | _i8 * | pHostName, |
const _u16 | NameLen, | ||
_u32 * | OutIpAddr, | ||
const _u8 | Family | ||
) |
Get host IP by name
Obtain the IP Address of machine on network, by machine name.
[in] | pHostName | Host name |
[in] | NameLen | Name length |
[out] | OutIpAddr | This parameter is filled in with host IP address. In case that host name is not resolved, out_ip_addr is zero. |
[in] | Family | Protocol family |
Definition at line 849 of file netapp.c.
_i16 sl_NetAppDnsGetHostByService | ( | _i8 * | pServiceName, |
const _u8 | ServiceLen, | ||
const _u8 | Family, | ||
_u32 | pAddr[], | ||
_u32 * | pPort, | ||
_u16 * | pTextLen, | ||
_i8 * | pText | ||
) |
Return service attributes like IP address, port and text according to service name
The user sets a service name Full/Part (see example below), and should get:
[in] | pServiceName | Service name can be full or partial. Example for full service name:
|
[in] | ServiceLen | The length of the service name (in_pService). |
[in] | Family | IPv4 or IPv6 (SL_AF_INET , SL_AF_INET6). |
[out] | pAddr | Contains the IP address of the service. |
[out] | pPort | Contains the port of the service. |
[out] | pTextLen | Has 2 options. One as Input field and the other one as output:
|
[out] | pText | Contains the text of the service full or partial |
Definition at line 613 of file netapp.c.
_i16 sl_NetAppGet | ( | const _u8 | AppId, |
const _u8 | Option, | ||
_u8 * | pOptionLen, | ||
_u8 * | pOptionValue | ||
) |
Getting network applications configurations.
[in] | AppId | Application id, could be one of the following:
|
[in] | Option | Get option, could be one of the following:
|
[in] | pOptionLen | The length of the allocated memory as input, when the function complete, the value of this parameter would be the len that actually read from the device. If the device return length that is longer from the input value, the function will cut the end of the returned structure and will return ESMALLBUF |
[out] | pOptionValue | pointer to the option structure which will be filled with the response from the device |
Definition at line 1456 of file netapp.c.
_i16 sl_NetAppGetServiceList | ( | const _u8 | IndexOffset, |
const _u8 | MaxServiceCount, | ||
const _u8 | Flags, | ||
_i8 * | pBuffer, | ||
const _u32 | BufferLength | ||
) |
Get service list
Insert into out pBuffer a list of peer's services that are in the NWP without issuing any queries (relying on previous collected data).
The list is in a form of service struct. The user should chose the type of the service struct like:
The different types of struct are made to give the possibility to save memory in the host.
The user can also chose how many max services to get and start point index NWP peer cache.
For example:
[in] | IndexOffset | - The start index in the peer cache that from it the first service is returned. |
[in] | MaxServiceCount | - The Max services that can be returned if existed or if not exceed the max index in the peer cache |
[in] | Flags | - an ENUM number that means which service struct to use (means which types of service to fill)
|
[out] | pBuffer | - The Services are inserted into this buffer. In the struct form according to the bit that is set in the Flags input parameter. |
[in] | BufferLength | - The allocated buffer length (pointed by pBuffer). |
Definition at line 205 of file netapp.c.
_i16 sl_NetAppMDNSRegisterService | ( | const _i8 * | pServiceName, |
const _u8 | ServiceNameLen, | ||
const _i8 * | pText, | ||
const _u8 | TextLen, | ||
const _u16 | Port, | ||
const _u32 | TTL, | ||
_u32 | Options | ||
) |
Register a new mDNS service
This function registers a new mDNS service to the mDNS package and the DB.
This registered service is a service offered by the application. The service name should be full service name according to RFC of the DNS-SD - meaning the value in name field in the SRV answer.
Example for service name:
If the option is_unique is set, mDNS probes the service name to make sure it is unique before starting to announce the service on the network. Instance is the instance portion of the service name.
[in] | ServiceNameLen | The length of the service. |
[in] | TextLen | The length of the service should be smaller than 64. |
[in] | Port | The port on this target host port. |
[in] | TTL | The TTL of the service |
[in] | Options | bitwise parameters:
|
[in] | pServiceName | The service name. |
[in] | pText | The description of the service. should be as mentioned in the RFC (according to type of the service IPP,FTP...) |
_i16 sl_NetAppMDNSUnRegisterService | ( | const _i8 * | pServiceName, |
const _u8 | ServiceNameLen, | ||
_u32 | Options | ||
) |
Unregister mDNS service
This function deletes the mDNS service from the mDNS package and the database.
The mDNS service that is to be unregistered is a service that the application no longer wishes to provide.
The service name should be the full service name according to RFC of the DNS-SD - meaning the value in name field in the SRV answer.
Examples for service names:
[in] | pServiceName | Full service name. |
[in] | ServiceNameLen | The length of the service. |
[in] | Options | bitwise parameters:
|
_i16 sl_NetAppNdFlush | ( | ) |
Flush IPv6 Neighbor Discovery table.
[in] | None |
_i16 sl_NetAppPing | ( | const SlNetAppPingCommand_t * | pPingParams, |
const _u8 | Family, | ||
SlNetAppPingReport_t * | pReport, | ||
const P_SL_DEV_PING_CALLBACK | pPingCallback | ||
) |
send ICMP ECHO_REQUEST to network hosts
Ping uses the ICMP protocol's mandatory ECHO_REQUEST
[in] | pPingParams | Pointer to the ping request structure:
|
[in] | Family | SL_AF_INET or SL_AF_INET6 |
[out] | pReport | Ping pReport |
[out] | pPingCallback | Callback function upon completion. If callback is NULL, the API is blocked until data arrives |
Definition at line 1003 of file netapp.c.
_SlReturnVal_t sl_NetAppRecv | ( | _u16 | Handle, |
_u16 * | DataLen, | ||
_u8 * | pData, | ||
_u32 * | Flags | ||
) |
Function for retrieving data from the network processor following a Netapp request event (i.e. HTTP POST request)
[in] | Handle | Handle to receive data from. Should match the handle received in the Netapp request event |
[in,out] | *DataLen | Max buffer size (in) / Actual data received (out) |
[out] | *pData | Data received |
[in,out] | *Flags | Can have the following values:
|
Definition at line 1276 of file netapp.c.
_u16 sl_NetAppSend | ( | _u16 | Handle, |
_u16 | DataLen, | ||
_u8 * | pData, | ||
_u32 | Flags | ||
) |
Function for sending Netapp response or data following a Netapp request event (i.e. HTTP GET request)
[in] | Handle | Handle to send the data to. Should match the handle received in the Netapp request event |
[in] | DataLen | Data Length |
[in] | pData | Data to send. Can be just data payload or metadata (depends on flags) |
[out] | Flags | Can have the following values:
|
Definition at line 1412 of file netapp.c.
_i16 sl_NetAppSet | ( | const _u8 | AppId, |
const _u8 | Option, | ||
const _u8 | OptionLen, | ||
const _u8 * | pOptionValue | ||
) |
Setting network application configurations.
[in] | AppId | Application id, could be one of the following:
|
[in] | Option | Set option, could be one of the following:
|
[in] | OptionLen | Option structure length |
[in] | pOptionValue | Pointer to the option structure |
Definition at line 1136 of file netapp.c.
_i16 sl_NetAppStart | ( | const _u32 | AppBitMap | ) |
Starts a network application.
Gets and starts network application for the current WLAN mode
[in] | AppBitMap | Application bitmap, could be one or combination of the following:
|
Definition at line 103 of file netapp.c.
_i16 sl_NetAppStop | ( | const _u32 | AppBitMap | ) |
Stops a network application.
Gets and stops network application for the current WLAN mode
[in] | AppBitMap | Application id, could be one of the following:
|
Definition at line 129 of file netapp.c.
struct SlIpV4AcquiredAsync_t |
struct SlIpV6AcquiredAsync_t |
struct SlIpLeasedAsync_t |
struct SlIpReleasedAsync_t |
struct SlIpCollisionAsync_t |
struct SlNoIpV4CollisionDetectedAsync_t |
struct SlNoIpV6CollisionDetectedAsync_t |
struct SlDhcpIpAcquireTimeout_t |
union SlNetAppEventData_u |
Data Fields | ||
---|---|---|
SlDhcpIpAcquireTimeout_t | DhcpIpAcquireTimeout | |
SlIpV4AcquiredAsync_t | IpAcquiredV4 | |
SlIpV6AcquiredAsync_t | IpAcquiredV6 | |
SlIpCollisionAsync_t | IpCollision | |
SlIpLeasedAsync_t | IpLeased | |
SlIpReleasedAsync_t | IpReleased | |
SlNoIpV4CollisionDetectedAsync_t | Ipv4CollisionDetected | |
SlIpV4Lost_t | IpV4Lost | |
SlNoIpV6CollisionDetectedAsync_t | Ipv6CollisionDetected | |
SlIpV6Lost_t | IpV6Lost | |
_u32 | Sd |
struct SlNetAppEvent_t |
Data Fields | ||
---|---|---|
SlNetAppEventData_u | Data | |
_u32 | Id |
struct SlNetAppPingReport_t |
struct SlNetAppPingCommand_t |
struct SlNetAppHttpServerString_t |
struct SlNetAppHttpServerData_t |
struct SlNetAppHttpServerPostData_t |
Data Fields | ||
---|---|---|
SlNetAppHttpServerString_t | Action | |
SlNetAppHttpServerString_t | TokenName | |
SlNetAppHttpServerString_t | TokenValue |
union SlNetAppHttpServerEventData_u |
Data Fields | ||
---|---|---|
SlNetAppHttpServerPostData_t | HttpPostData | |
SlNetAppHttpServerString_t | HttpTokenName |
union SlNetAppHttpServerResponsedata_u |
Data Fields | ||
---|---|---|
SlNetAppHttpServerString_t | TokenValue |
struct SlNetAppHttpServerEvent_t |
Data Fields | ||
---|---|---|
_u32 | Event | |
SlNetAppHttpServerEventData_u | EventData |
struct SlNetAppHttpServerResponse_t |
Data Fields | ||
---|---|---|
_u32 | Response | |
SlNetAppHttpServerResponsedata_u | ResponseData |
struct SlNetAppData_t |
struct SlNetAppRequest_t |
Data Fields | ||
---|---|---|
_u8 | AppId | |
_u16 | Handle | |
SlNetAppData_t | requestData | |
_u8 | Type |
struct SlNetAppResponse_t |
Data Fields | ||
---|---|---|
SlNetAppData_t | ResponseData | |
_u16 | Status |
struct SlNetAppDhcpServerBasicOpt_t |
struct SlNetAppGetShortServiceIpv4List_t |
struct SlNetAppGetFullServiceIpv4List_t |
struct SlNetAppGetFullServiceWithTextIpv4List_t |
struct SlNetAppGetShortServiceIpv6List_t |
struct SlNetAppGetFullServiceIpv6List_t |
struct SlNetAppGetFullServiceWithTextIpv6List_t |
struct SlNetAppServiceAdvertiseTimingParameters_t |