Activates networking applications, such as: HTTP Server, DHCP Server, Ping, DNS and mDNS.
More...
Activates networking applications, such as: HTTP Server, DHCP Server, Ping, DNS and mDNS.
§ ATCmdNetapp_getCallback()
int32_t ATCmdNetapp_getCallback |
( |
void * |
arg | ) |
|
Netapp Get callback.
This routine gets network applications configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Get callback.
This routine gets network applications configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 2037 of file atcmd_netapp.c.
2040 ATCmdNetapp_Set_t *params;
2042 params = malloc(
sizeof(ATCmdNetapp_Set_t));
2046 ATCmd_errorResult(ATCmd_errorAllocStr,0);
2049 memset(params, 0x0,
sizeof(ATCmdNetapp_Set_t));
2052 ret = ATCmdNetapp_getParse((
char *)arg, params);
2056 ATCmd_errorResult(ATCmd_errorParseStr,ret);
2057 ATCmdNetapp_getFree(params);
2062 ret = sl_NetAppGet(params->id,params->option,¶ms->len,params->value);
2066 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
2067 ATCmdNetapp_getFree(params);
2071 ATCmd_commandResult(ATCmdNetapp_getResult,params,0);
§ ATCmdNetapp_getHostByNameCallback()
int32_t ATCmdNetapp_getHostByNameCallback |
( |
void * |
arg | ) |
|
Netapp Get Host By Name callback.
This routine get host IP by name
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Get Host By Name callback.
This routine get host IP by name
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 339 of file atcmd_netapp.c.
342 ATCmdNetapp_GetHostByName_t *params;
344 params = malloc(
sizeof(ATCmdNetapp_GetHostByName_t));
348 ATCmd_errorResult(ATCmd_errorAllocStr,0);
351 memset(params, 0x0,
sizeof(ATCmdNetapp_GetHostByName_t));
354 ret = ATCmdNetapp_getHostByNameParse((
char *)arg, params);
358 ATCmd_errorResult(ATCmd_errorParseStr,ret);
359 ATCmdNetapp_getHostByNameFree(params);
364 ret = sl_NetAppDnsGetHostByName(params->hostName, params->nameLen, (_u32 *)params->addr, params->family);
368 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
369 ATCmdNetapp_getHostByNameFree(params);
373 ATCmd_commandResult(ATCmdNetapp_getHostByNameResult,params,0);
§ ATCmdNetapp_getHostByServiceCallback()
int32_t ATCmdNetapp_getHostByServiceCallback |
( |
void * |
arg | ) |
|
Netapp Get Host By Service callback.
This routine get host IP by service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Get Host By Service callback.
This routine get host IP by service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 483 of file atcmd_netapp.c.
486 ATCmdNetapp_GetHostByService_t *params;
488 params = malloc(
sizeof(ATCmdNetapp_GetHostByService_t));
492 ATCmd_errorResult(ATCmd_errorAllocStr,0);
495 memset(params, 0x0,
sizeof(ATCmdNetapp_GetHostByService_t));
498 ret = ATCmdNetapp_getHostByServiceParse((
char *)arg, params);
502 ATCmd_errorResult(ATCmd_errorParseStr,ret);
503 ATCmdNetapp_getHostByServiceFree(params);
507 params->textLen = SL_NETAPP_MAX_SERVICE_TEXT_SIZE;
508 params->text = malloc(params->textLen);
509 if (params->text == NULL)
511 ATCmd_errorResult(ATCmd_errorAllocStr,0);
512 ATCmdNetapp_getHostByServiceFree(params);
516 ret = sl_NetAppDnsGetHostByService(params->serviceName, params->serviceLen, params->family,(_u32 *)params->addr,(_u32 *)¶ms->port,¶ms->textLen,params->text);
520 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
521 ATCmdNetapp_getHostByServiceFree(params);
525 ATCmd_commandResult(ATCmdNetapp_getHostByServiceResult,params,0);
§ ATCmdNetapp_getServiceListCallback()
int32_t ATCmdNetapp_getServiceListCallback |
( |
void * |
arg | ) |
|
Netapp GetServiceList callback.
This routine get service list
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp GetServiceList callback.
This routine get service list
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 1135 of file atcmd_netapp.c.
1138 ATCmdNetapp_GetServiceList_t *params;
1140 params = malloc(
sizeof(ATCmdNetapp_GetServiceList_t));
1144 ATCmd_errorResult(ATCmd_errorAllocStr,0);
1147 memset(params, 0x0,
sizeof(ATCmdNetapp_GetServiceList_t));
1150 ret = ATCmdNetapp_getServiceListParse((
char *)arg, params);
1154 ATCmd_errorResult(ATCmd_errorParseStr,ret);
1155 ATCmdNetapp_getServiceListFree(params);
1158 params->bufferLen = params->maxCount * ATCmdNetapp_serviceSize[params->flags];
1159 if (params->bufferLen > ATCMDNETAPP_MAX_BUFFER_LEN)
1161 params->bufferLen = ATCMDNETAPP_MAX_BUFFER_LEN;
1163 params->buffer = malloc(params->bufferLen);
1164 if (params->buffer == NULL)
1166 ATCmd_errorResult(ATCmd_errorAllocStr,0);
1167 ATCmdNetapp_getServiceListFree(params);
1171 params->count = sl_NetAppGetServiceList(params->offest, params->maxCount, params->flags,params->buffer,params->bufferLen);
1173 if (params->count < 0)
1175 ATCmd_errorResult(ATCmd_errorCmdStr,params->count);
1176 ATCmdNetapp_getServiceListFree(params);
1181 ATCmd_commandResult(ATCmdNetapp_getServiceListResult,params,0);
§ ATCmdNetapp_pingCallback()
int32_t ATCmdNetapp_pingCallback |
( |
void * |
arg | ) |
|
Netapp Ping callback.
This routine send ping to network hosts
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Ping callback.
This routine send ping to network hosts
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 942 of file atcmd_netapp.c.
945 ATCmdNetapp_Ping_t params;
947 memset(¶ms, 0x0,
sizeof(ATCmdNetapp_Ping_t));
950 ret = ATCmdNetapp_pingParse((
char *)arg, ¶ms);
954 ATCmd_errorResult(ATCmd_errorParseStr,ret);
959 ret = sl_NetAppPing(¶ms.pingParams, params.family,¶ms.report,ATCmdNetapp_pingReport);
963 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
§ ATCmdNetapp_recvCallback()
int32_t ATCmdNetapp_recvCallback |
( |
void * |
arg | ) |
|
Netapp Recv callback.
This routine receives data from the network processor
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Recv callback.
This routine receives data from the network processor following a Netapp response event
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 774 of file atcmd_netapp.c.
777 ATCmdNetapp_t *params;
779 params = malloc(
sizeof(ATCmdNetapp_t));
783 ATCmd_errorResult(ATCmd_errorAllocStr,0);
787 memset(params, 0x0,
sizeof(ATCmdNetapp_t));
790 ret = ATCmdNetapp_recvParse((
char *)arg, params);
794 ATCmd_errorResult(ATCmd_errorParseStr,ret);
795 ATCmdNetapp_recvFree(params);
800 ret = sl_NetAppRecv(params->handle, ¶ms->len, params->data,(_u32 *)¶ms->flags);
804 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
805 ATCmdNetapp_recvFree(params);
809 ATCmd_commandResult(ATCmdNetapp_recvResult,params,0);
§ ATCmdNetapp_registerServiceCallback()
int32_t ATCmdNetapp_registerServiceCallback |
( |
void * |
arg | ) |
|
Netapp RegisterMDNS callback.
This routine register a new mDNS service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp RegisterMDNS callback.
This routine register a new mDNS service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 1269 of file atcmd_netapp.c.
1272 ATCmdNetapp_RegisterService_t params;
1274 memset(¶ms, 0x0,
sizeof(ATCmdNetapp_RegisterService_t));
1277 ret = ATCmdNetapp_registerServiceParse((
char *)arg, ¶ms);
1281 ATCmd_errorResult(ATCmd_errorParseStr,ret);
1282 ATCmdNetapp_registerServiceFree(¶ms);
1286 if ((params.serviceNameLen + params.textLen) > SL_NETAPP_MDNS_MAX_SERVICE_NAME_AND_TEXT_LENGTH)
1288 ATCmd_errorResult(ATCmd_errorParseStr,0);
1289 ATCmdNetapp_registerServiceFree(¶ms);
1294 ret = sl_NetAppMDNSRegisterService(params.serviceName, params.serviceNameLen, params.text,params.textLen,params.port,params.ttl,params.options);
1298 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
1304 ATCmdNetapp_registerServiceFree(¶ms);
§ ATCmdNetapp_sendCallback()
int32_t ATCmdNetapp_sendCallback |
( |
void * |
arg | ) |
|
Netapp Send callback.
This routine sends Netapp response or data
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Send callback.
This routine sends Netapp response or data following a Netapp request event
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 629 of file atcmd_netapp.c.
632 ATCmdNetapp_t params;
634 memset(¶ms, 0x0,
sizeof(ATCmdNetapp_t));
637 ret = ATCmdNetapp_sendParse((
char *)arg, ¶ms);
641 ATCmd_errorResult(ATCmd_errorParseStr,ret);
642 ATCmdNetapp_sendFree(¶ms);
647 ret = sl_NetAppSend(params.handle, params.len, params.data,params.flags);
651 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
658 ATCmdNetapp_sendFree(¶ms);
§ ATCmdNetapp_setCallback()
int32_t ATCmdNetapp_setCallback |
( |
void * |
arg | ) |
|
Netapp Set callback.
This routine sets network applications configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp Set callback.
This routine sets network applications configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 1698 of file atcmd_netapp.c.
1701 ATCmdNetapp_Set_t params;
1703 memset(¶ms, 0x0,
sizeof(ATCmdNetapp_Set_t));
1706 ret = ATCmdNetapp_setParse((
char *)arg, ¶ms);
1710 ATCmd_errorResult(ATCmd_errorParseStr,ret);
1711 ATCmdNetapp_setFree(¶ms);
1716 ret = sl_NetAppSet(params.id,params.option,params.len,params.value);
1720 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
1727 ATCmdNetapp_setFree(¶ms);
§ ATCmdNetapp_startCallback()
int32_t ATCmdNetapp_startCallback |
( |
void * |
arg | ) |
|
Netapp start callback.
This routine starts a network application
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp start callback.
This routine starts a network application
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 162 of file atcmd_netapp.c.
170 if ((ret = StrMpl_getBitmaskListVal(ATCmd_netappType,
sizeof(ATCmd_netappType)/
sizeof(StrMpl_List_t), (
char **)&arg, &appBitMap, ATCMD_DELIM_TRM,ATCMD_DELIM_BIT, ATCmd_excludeDelimArray, STRMPL_FLAG_PARAM_SIZE_32 )) < 0)
172 ATCmd_errorResult(ATCmd_errorParseStr,ret);
177 if (appBitMap > 0x0F)
179 ATCmd_errorResult(ATCmd_errorParseStr,0);
183 ret = sl_NetAppStart(appBitMap);
187 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
§ ATCmdNetapp_stopCallback()
int32_t ATCmdNetapp_stopCallback |
( |
void * |
arg | ) |
|
Netapp stop callback.
This routine stops a network application
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp stop callback.
This routine stops a network application
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 208 of file atcmd_netapp.c.
216 if ((ret = StrMpl_getBitmaskListVal(ATCmd_netappType,
sizeof(ATCmd_netappType)/
sizeof(StrMpl_List_t), (
char **)&arg, &appBitMap, ATCMD_DELIM_TRM,ATCMD_DELIM_BIT, ATCmd_excludeDelimArray, STRMPL_FLAG_PARAM_SIZE_32 )) < 0)
218 ATCmd_errorResult(ATCmd_errorParseStr,ret);
222 if (appBitMap > 0x0F)
224 ATCmd_errorResult(ATCmd_errorParseStr,0);
229 ret = sl_NetAppStop(appBitMap);
233 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
§ ATCmdNetapp_unregisterServiceCallback()
int32_t ATCmdNetapp_unregisterServiceCallback |
( |
void * |
arg | ) |
|
Netapp UnregisterMDNS callback.
This routine unregister a mDNS service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
Netapp UnregisterMDNS callback.
This routine unregister a mDNS service
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 1374 of file atcmd_netapp.c.
1377 ATCmdNetapp_UnregisterService_t params;
1379 memset(¶ms, 0x0,
sizeof(ATCmdNetapp_UnregisterService_t));
1382 ret = ATCmdNetapp_unregisterServiceParse((
char *)arg, ¶ms);
1386 ATCmd_errorResult(ATCmd_errorParseStr,ret);
1387 ATCmdNetapp_unregisterServiceFree(¶ms);
1392 ret = sl_NetAppMDNSUnRegisterService(params.serviceName, params.serviceNameLen, params.options);
1396 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
1402 ATCmdNetapp_unregisterServiceFree(¶ms);