SimpleLink CC3120/CC3220 Host Driver  Version 2.0.1.18
Simplifies the implementation of Internet connectivity
netapp.h
1 /*
2  * Copyright (C) 2016 Texas Instruments Incorporated
3  *
4  * All rights reserved. Property of Texas Instruments Incorporated.
5  * Restricted rights to use, duplicate or disclose this code are
6  * granted through contract.
7  *
8  * The program may not be used without the written permission of
9  * Texas Instruments Incorporated or against the terms and conditions
10  * stipulated in the agreement under which this program has been supplied,
11  * and under no circumstances can it be used with non-TI connectivity device.
12  *
13  */
14 
15 
16 /*****************************************************************************/
17 /* Include files */
18 /*****************************************************************************/
19 #include <ti/drivers/net/wifi/simplelink.h>
20 
21 #ifndef __NETAPP_H__
22 #define __NETAPP_H__
23 
24 
25 
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
44 /*****************************************************************************/
45 /* Macro declarations */
46 /*****************************************************************************/
47 
48 /* NetApp user events */
49 typedef enum
50 {
51  SL_NETAPP_EVENT_IPV4_ACQUIRED = 1,
52  SL_NETAPP_EVENT_IPV6_ACQUIRED,
53  SL_NETAPP_EVENT_IP_COLLISION,
54  SL_NETAPP_EVENT_DHCPV4_LEASED,
55  SL_NETAPP_EVENT_DHCPV4_RELEASED,
56  SL_NETAPP_EVENT_HTTP_TOKEN_GET,
57  SL_NETAPP_EVENT_HTTP_TOKEN_POST,
58  SL_NETAPP_EVENT_IPV4_LOST,
59  SL_NETAPP_EVENT_DHCP_IPV4_ACQUIRE_TIMEOUT,
60  SL_NETAPP_EVENT_IPV6_LOST,
61  SL_NETAPP_EVENT_MAX
62 
63 } SlNetAppEventId_e;
64 
65 
66 #define SL_NETAPP_MDNS_OPTIONS_IS_UNIQUE_BIT 0x1
67 #define SL_NETAPP_MDNS_OPTIONS_ADD_SERVICE_BIT ((_u32)0x1 << 31)
68 #define SL_NETAPP_MDNS_OPTIONS_IS_NOT_PERSISTENT ((_u32)0x1 << 30)
69 #define SL_NETAPP_MDNS_OPTION_UPDATE_TEXT ((_u32)0x1 << 29)
70 #define SL_NETAPP_MDNS_IPV4_ONLY_SERVICE (_u32)(0) /* default mode:zero bits 27,28*/
71 #define SL_NETAPP_MDNS_IPV6_ONLY_SERVICE ((_u32)0x1 << 28)
72 #define SL_NETAPP_MDNS_IPV6_IPV4_SERVICE ((_u32)0x1 << 27)
73 
74 
75 /*ERROR code*/
76 #define SL_NETAPP_RX_BUFFER_LENGTH_ERROR (-230)
77 
78 /* Http Server interface */
79 #define SL_NETAPP_MAX_INPUT_STRING (64) /* because of WPA */
80 
81 #define SL_NETAPP_MAX_AUTH_NAME_LEN (20)
82 #define SL_NETAPP_MAX_AUTH_PASSWORD_LEN (20)
83 #define SL_NETAPP_MAX_AUTH_REALM_LEN (20)
84 
85 #define SL_NETAPP_MAX_DEVICE_URN_LEN (32+1)
86 #define SL_NETAPP_MAX_DOMAIN_NAME_LEN (24+1)
87 
88 #define SL_NETAPP_MAX_ACTION_LEN (30)
89 #define SL_NETAPP_MAX_TOKEN_NAME_LEN (20)
90 
91 
92 #define SL_NETAPP_MAX_TOKEN_VALUE_LEN SL_NETAPP_MAX_INPUT_STRING
93 
94 #define SL_NETAPP_MAX_SERVICE_TEXT_SIZE (256)
95 #define SL_NETAPP_MAX_SERVICE_NAME_SIZE (60)
96 #define SL_NETAPP_MAX_SERVICE_HOST_NAME_SIZE (64)
97 
98 
99 /* Server Responses */
100 #define SL_NETAPP_HTTPRESPONSE_NONE (0)
101 #define SL_NETAPP_HTTPSETTOKENVALUE (1)
102 
103 #define SL_NETAPP_FAMILY_MASK (0x80)
104 
105 /* mDNS types */
106 #define SL_NETAPP_MASK_IPP_TYPE_OF_SERVICE (0x00000001)
107 #define SL_NETAPP_MASK_DEVICE_INFO_TYPE_OF_SERVICE (0x00000002)
108 #define SL_NETAPP_MASK_HTTP_TYPE_OF_SERVICE (0x00000004)
109 #define SL_NETAPP_MASK_HTTPS_TYPE_OF_SERVICE (0x00000008)
110 #define SL_NETAPP_MASK_WORKSATION_TYPE_OF_SERVICE (0x00000010)
111 #define SL_NETAPP_MASK_GUID_TYPE_OF_SERVICE (0x00000020)
112 #define SL_NETAPP_MASK_H323_TYPE_OF_SERVICE (0x00000040)
113 #define SL_NETAPP_MASK_NTP_TYPE_OF_SERVICE (0x00000080)
114 #define SL_NETAPP_MASK_OBJECITVE_TYPE_OF_SERVICE (0x00000100)
115 #define SL_NETAPP_MASK_RDP_TYPE_OF_SERVICE (0x00000200)
116 #define SL_NETAPP_MASK_REMOTE_TYPE_OF_SERVICE (0x00000400)
117 #define SL_NETAPP_MASK_RTSP_TYPE_OF_SERVICE (0x00000800)
118 #define SL_NETAPP_MASK_SIP_TYPE_OF_SERVICE (0x00001000)
119 #define SL_NETAPP_MASK_SMB_TYPE_OF_SERVICE (0x00002000)
120 #define SL_NETAPP_MASK_SOAP_TYPE_OF_SERVICE (0x00004000)
121 #define SL_NETAPP_MASK_SSH_TYPE_OF_SERVICE (0x00008000)
122 #define SL_NETAPP_MASK_TELNET_TYPE_OF_SERVICE (0x00010000)
123 #define SL_NETAPP_MASK_TFTP_TYPE_OF_SERVICE (0x00020000)
124 #define SL_NETAPP_MASK_XMPP_CLIENT_TYPE_OF_SERVICE (0x00040000)
125 #define SL_NETAPP_MASK_RAOP_TYPE_OF_SERVICE (0x00080000)
126 #define SL_NETAPP_MASK_ALL_TYPE_OF_SERVICE (0xFFFFFFFF)
127 
128 /********************************************************************************************************/
129 
130 /* NetApp application IDs */
131 #define SL_NETAPP_HTTP_SERVER_ID (0x01)
132 #define SL_NETAPP_DHCP_SERVER_ID (0x02)
133 #define SL_NETAPP_MDNS_ID (0x04)
134 #define SL_NETAPP_DNS_SERVER_ID (0x08)
135 
136 #define SL_NETAPP_DEVICE_ID (0x10)
137 #define SL_NETAPP_DNS_CLIENT_ID (0x20)
138 #define SL_NETAPP_STATUS (0x40)
139 
140 /* NetApp application set/get options */
141 #define SL_NETAPP_DHCP_SRV_BASIC_OPT (0)
142 
143 /* HTTP server set/get options */
144 #define SL_NETAPP_HTTP_PRIMARY_PORT_NUMBER (0)
145 #define SL_NETAPP_HTTP_AUTH_CHECK (1)
146 #define SL_NETAPP_HTTP_AUTH_NAME (2)
147 #define SL_NETAPP_HTTP_AUTH_PASSWORD (3)
148 #define SL_NETAPP_HTTP_AUTH_REALM (4)
149 #define SL_NETAPP_HTTP_ROM_PAGES_ACCESS (5)
150 #define SL_NETAPP_HTTP_SECONDARY_PORT_NUMBER (6)
151 #define SL_NETAPP_HTTP_SECONDARY_PORT_ENABLE (7) /*Enable / disable of secondary port */
152 #define SL_NETAPP_HTTP_PRIMARY_PORT_SECURITY_MODE (8)
153 #define SL_NETAPP_HTTP_PRIVATE_KEY_FILENAME (9)
154 #define SL_NETAPP_HTTP_DEVICE_CERTIFICATE_FILENAME (10)
155 #define SL_NETAPP_HTTP_CA_CERTIFICATE_FILE_NAME (11)
156 #define SL_NETAPP_HTTP_TEMP_REGISTER_MDNS_SERVICE_NAME (12)
157 #define SL_NETAPP_HTTP_TEMP_UNREGISTER_MDNS_SERVICE_NAME (13)
158 
159 #define SL_NETAPP_MDNS_CONT_QUERY_OPT (1)
160 #define SL_NETAPP_MDNS_QEVETN_MASK_OPT (2)
161 #define SL_NETAPP_MDNS_TIMING_PARAMS_OPT (3)
162 
163 /* DNS server set/get options */
164 #define SL_NETAPP_DNS_OPT_DOMAIN_NAME (0)
165 
166 /* Device Config set/get options */
167 #define SL_NETAPP_DEVICE_URN (0)
168 #define SL_NETAPP_DEVICE_DOMAIN (1)
169 
170 /* DNS client set/get options */
171 #define SL_NETAPP_DNS_CLIENT_TIME (0)
172 
173 /* Get active application bimap */
174 #define SL_NETAPP_STATUS_ACTIVE_APP (0)
175 
176 #ifdef SL_TINY
177 #define SL_NETAPP_MDNS_MAX_SERVICE_NAME_AND_TEXT_LENGTH 63
178 #else
179 #define SL_NETAPP_MDNS_MAX_SERVICE_NAME_AND_TEXT_LENGTH 255
180 #endif
181 
182 /*****************************************************************************/
183 /* Structure/Enum declarations */
184 /*****************************************************************************/
185 
186 
187 typedef struct
188 {
189  _u32 Ip;
190  _u32 Gateway;
191  _u32 Dns;
193 
194 typedef enum
195 {
196  SL_BSD_IPV6_ACQUIRED_TYPE_LOCAL = 1,
197  SL_BSD_IPV6_ACQUIRED_TYPE_GLOBAL = 2
198 }SlIpV6AcquiredAsyncType_e;
199 
200 
201 typedef struct
202 {
203  _u32 Ip[4];
204  _u32 Dns[4];
206 
207 typedef struct
208 {
209  _u32 IpAddress;
210  _u32 LeaseTime;
211  _u8 Mac[6];
212  _u16 Padding;
214 
215 typedef struct
216 {
217  _u32 IpAddress;
218  _u8 Mac[6];
219  _u16 Reason;
221 
222 typedef struct
223 {
224  _u32 IpAddress;
225  _u8 DhcpMac[6];
226  _u8 ConflictMac[6];
228 
229 typedef struct
230 {
231  _i16 Status;
232  _u16 Padding;
233 }SlIpV4Lost_t;
234 
235 typedef struct
236 {
237  _u32 IpLost[4];
238 }SlIpV6Lost_t;
239 
240 typedef struct
241 {
242  _i16 Status;
243  _u16 Padding;
245 
246 
247 typedef union
248 {
249  SlIpV4AcquiredAsync_t IpAcquiredV4; /* SL_NETAPP_EVENT_IPV4_ACQUIRED */
250  SlIpV6AcquiredAsync_t IpAcquiredV6; /* SL_NETAPP_EVENT_IPV6_ACQUIRED */
251  _u32 Sd; /* SL_SOCKET_TX_FAILED_EVENT*/
252  SlIpLeasedAsync_t IpLeased; /* SL_NETAPP_EVENT_DHCPV4_LEASED */
253  SlIpReleasedAsync_t IpReleased; /* SL_NETAPP_EVENT_DHCPV4_RELEASED */
254  SlIpV4Lost_t IpV4Lost; /* SL_NETAPP_EVENT_IPV4_LOST */
255  SlDhcpIpAcquireTimeout_t DhcpIpAcquireTimeout; /* SL_NETAPP_DHCP_ACQUIRE_IPV4_TIMEOUT_EVENT */
256  SlIpCollisionAsync_t IpCollision; /* SL_NETAPP_EVENT_IP_COLLISION */
257  SlIpV6Lost_t IpV6Lost; /* SL_NETAPP_EVENT_IPV6_LOST */
259 
260 typedef struct
261 {
262  _u32 Id;
263  SlNetAppEventData_u Data;
265 
266 
267 typedef struct
268 {
269  _u32 PacketsSent;
270  _u32 PacketsReceived;
271  _u16 MinRoundTime;
272  _u16 MaxRoundTime;
273  _u16 AvgRoundTime;
274  _u32 TestTime;
276 
277 typedef struct
278 {
279  _u32 PingIntervalTime; /* delay between pings, in milliseconds */
280  _u16 PingSize; /* ping packet size in bytes */
281  _u16 PingRequestTimeout; /* timeout time for every ping in milliseconds */
282  _u32 TotalNumberOfAttempts; /* max number of ping requests. 0 - forever */
283  _u32 Flags; /* flag - 0 report only when finished, 1 - return response for every ping, 2 - stop after 1 successful ping. 4 - ipv4 header flag - don`t fragment packet */
284  _u32 Ip; /* IPv4 address or IPv6 first 4 bytes */
285  _u32 Ip1OrPadding;
286  _u32 Ip2OrPadding;
287  _u32 Ip3OrPadding;
289 
290 typedef struct
291 {
292  _u8 Len;
293  _u8 *pData;
295 
296 typedef struct
297 {
298  _u8 ValueLen;
299  _u8 NameLen;
300  _u8 *pTokenValue;
301  _u8 *pTokenName;
303 
304 typedef struct
305 {
307  SlNetAppHttpServerString_t TokenName;
308  SlNetAppHttpServerString_t TokenValue;
310 
311 typedef union
312 {
313  SlNetAppHttpServerString_t HttpTokenName; /* SL_NETAPP_HTTPGETTOKENVALUE */
314  SlNetAppHttpServerPostData_t HttpPostData; /* SL_NETAPP_HTTPPOSTTOKENVALUE */
316 
317 typedef union
318 {
319  SlNetAppHttpServerString_t TokenValue;
321 
322 typedef struct
323 {
324  _u32 Event;
327 
328 typedef struct
329 {
330  _u32 Response;
333 
334 /*****************************************************************************************
335 * NETAPP Request/Response/Send/Receive
336 ******************************************************************************************/
337 /* TODO: check what definitions are eventually needed */
338 /* NETAPP http request types */
339 #define SL_NETAPP_REQUEST_HTTP_GET 1
340 #define SL_NETAPP_REQUEST_HTTP_POST 2
341 #define SL_NETAPP_REQUEST_HTTP_PUT 3
342 #define SL_NETAPP_REQUEST_HTTP_DELETE 4
343 
344 #define SL_NETAPP_REQUEST_MAX_METADATA_LEN 1024
345 #define SL_NETAPP_REQUEST_MAX_DATA_LEN 1364 /* Metadata + Payload */
346 
347 
348 typedef enum
349 {
350  SL_NETAPP_REQUEST_METADATA_TYPE_STATUS = 0,
351  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_VERSION,
352  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_REQUEST_URI,
353  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_QUERY_STRING,
354  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_LEN,
355  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_TYPE,
356  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_LOCATION,
357  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_SERVER,
358  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_USER_AGENT,
359  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_COOKIE,
360  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_SET_COOKIE,
361  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_UPGRADE,
362  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_REFERER,
363  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_ACCEPT,
364  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_ENCODING,
365  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONTENT_DISPOSITION,
366  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_CONNECTION,
367  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_ETAG,
368  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_DATE,
369  SL_NETAPP_REQUEST_METADATA_TYPE_HEADER_HOST,
370  SL_NETAPP_REQUEST_METADATA_TYPE_ACCEPT_ENCODING,
371  SL_NETAPP_REQUEST_METADATA_TYPE_ACCEPT_LANGUAGE,
372  SL_NETAPP_REQUEST_METADATA_TYPE_CONTENT_LANGUAGE,
373  SL_NETAPP_REQUEST_METADATA_TYPE_ORIGIN,
374  SL_NETAPP_REQUEST_METADATA_TYPE_ORIGIN_CONTROL_ACCESS,
375  SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_NONE
376 
377 } SlNetAppMetadataHTTPTypes_e;
378 
379 typedef enum
380 {
381  SL_NETAPP_RESPONSE_NONE = 0, /* No response */
382  SL_NETAPP_RESPONSE_PENDING = 1, /* status will arrive in future NetApp Send call (in metadata) */
383 
384  SL_NETAPP_HTTP_RESPONSE_101_SWITCHING_PROTOCOLS = 101, /* 101 Switching Protocol*/
385  SL_NETAPP_HTTP_RESPONSE_200_OK = 200, /* 200 OK */
386  SL_NETAPP_HTTP_RESPONSE_201_CREATED = 201, /* "HTTP/1.0 201 Created" */
387  SL_NETAPP_HTTP_RESPONSE_202_ACCEPTED = 202, /* "HTTP/1.0 202 Accepted" */
388  SL_NETAPP_HTTP_RESPONSE_204_OK_NO_CONTENT = 204, /* 204 No Content */
389  SL_NETAPP_HTTP_RESPONSE_301_MOVED_PERMANENTLY = 301, /* "HTTP/1.0 301 Moved Permanently" */
390  SL_NETAPP_HTTP_RESPONSE_302_MOVED_TEMPORARILY = 302, /* 302 Moved Temporarily (http 1.0) */
391  SL_NETAPP_HTTP_RESPONSE_303_SEE_OTHER = 303, /* "HTTP/1.1 303 See Other" */
392  SL_NETAPP_HTTP_RESPONSE_304_NOT_MODIFIED = 304, /* "HTTP/1.0 304 Not Modified" */
393  SL_NETAPP_HTTP_RESPONSE_400_BAD_REQUEST = 400, /* "HTTP/1.0 400 Bad Request" */
394  SL_NETAPP_HTTP_RESPONSE_403_FORBIDDEN = 403, /* "HTTP/1.0 403 Forbidden" */
395  SL_NETAPP_HTTP_RESPONSE_404_NOT_FOUND = 404, /* 404 Not Found */
396  SL_NETAPP_HTTP_RESPONSE_405_METHOD_NOT_ALLOWED = 405, /* "HTTP/1.0 405 Method Not Allowed" */
397  SL_NETAPP_HTTP_RESPONSE_500_INTERNAL_SERVER_ERROR = 500,/* 500 Internal Server Error */
398  SL_NETAPP_HTTP_RESPONSE_503_SERVICE_UNAVAILABLE = 503, /* "HTTP/1.0 503 Service Unavailable" */
399  SL_NETAPP_HTTP_RESPONSE_504_GATEWAY_TIMEOUT = 504 /* "HTTP/1.0 504 Gateway Timeout" */
400 } SlNetAppResponseCode_e;
401 
402 
403 #define SL_NETAPP_REQUEST_RESPONSE_FLAGS_CONTINUATION 0x00000001
404 #define SL_NETAPP_REQUEST_RESPONSE_FLAGS_METADATA 0x00000002 /* 0 - data is payload, 1 - data is metadata */
405 #define SL_NETAPP_REQUEST_RESPONSE_FLAGS_ACCUMULATION 0x00000004
406 #define SL_NETAPP_REQUEST_RESPONSE_FLAGS_ERROR 0x80000000 /* in that case the last two bytes represents the error code */
407 
408 typedef struct
409 {
410  _u16 MetadataLen;
411  _u8 *pMetadata;
412  _u16 PayloadLen;
413  _u8 *pPayload;
414  _u32 Flags;
416 
417 typedef struct
418 {
419  _u8 AppId;
420  _u8 Type;
421  _u16 Handle;
422  SlNetAppData_t requestData;
423 
425 
426 typedef struct
427 {
428  _u16 Status;
429  SlNetAppData_t ResponseData;
430 
432 
433 
434 typedef struct
435 {
436  _u32 lease_time;
437  _u32 ipv4_addr_start;
438  _u32 ipv4_addr_last;
440 
441 /* mDNS parameters */
442 typedef enum
443 {
444  SL_NETAPP_FULL_SERVICE_WITH_TEXT_IPV4_TYPE = 1,
445  SL_NETAPP_FULL_SERVICE_IPV4_TYPE,
446  SL_NETAPP_SHORT_SERVICE_IPV4_TYPE,
447  SL_NETAPP_FULL_SERVICE_WITH_TEXT_IPV6_TYPE ,
448  SL_NETAPP_FULL_SERVICE_IPV6_TYPE,
449  SL_NETAPP_SHORT_SERVICE_IPV6_TYPE
450 } SlNetAppGetServiceListType_e;
451 
452 typedef struct
453 {
454  _u32 service_ipv4;
455  _u16 service_port;
456  _u16 Reserved;
458 
459 typedef struct
460 {
461  _u32 service_ipv4;
462  _u16 service_port;
463  _u16 Reserved;
464  _u8 service_name[SL_NETAPP_MAX_SERVICE_NAME_SIZE];
465  _u8 service_host[SL_NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
467 
468 typedef struct
469 {
470  _u32 service_ipv4;
471  _u16 service_port;
472  _u16 Reserved;
473  _u8 service_name[SL_NETAPP_MAX_SERVICE_NAME_SIZE];
474  _u8 service_host[SL_NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
475  _u8 service_text[SL_NETAPP_MAX_SERVICE_TEXT_SIZE];
477 
478 /* IPv6 entries */
479 typedef struct
480 {
481  _u32 service_ipv6[4];
482  _u16 service_port;
483  _u16 Reserved;
485 
486 typedef struct
487 {
488  _u32 service_ipv6[4];
489  _u16 service_port;
490  _u16 Reserved;
491  _u8 service_name[SL_NETAPP_MAX_SERVICE_NAME_SIZE];
492  _u8 service_host[SL_NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
494 
495 typedef struct
496 {
497  _u32 service_ipv6[4];
498  _u16 service_port;
499  _u16 Reserved;
500  _u8 service_name[SL_NETAPP_MAX_SERVICE_NAME_SIZE];
501  _u8 service_host[SL_NETAPP_MAX_SERVICE_HOST_NAME_SIZE];
502  _u8 service_text[SL_NETAPP_MAX_SERVICE_TEXT_SIZE];
504 
505 
506 typedef struct
507 {
508  /*The below parameters are used to configure the advertise times and interval
509  For example:
510  If:
511  Period is set to T
512  Repetitions are set to P
513  Telescopic factor is K=2
514  The transmission shall be:
515  advertise P times
516  wait T
517  advertise P times
518  wait 4 * T
519  advertise P time
520  wait 16 * T ... (till max time reached / configuration changed / query issued)
521  */
522  _u32 t; /* Number of ticks for the initial period. Default is 100 ticks for 1 second. */
523  _u32 p; /* Number of repetitions. Default value is 1 */
524  _u32 k; /* Telescopic factor. Default value is 2. */
525  _u32 RetransInterval;/* Announcing retransmission interval */
526  _u32 Maxinterval; /* Announcing max period interval */
527  _u32 max_time; /* Announcing max time */
529 
530 
531 typedef struct
532 {
533  _u16 MaxResponseTime;
534  _u16 NumOfRetries;
536 
537 /*****************************************************************************/
538 /* Types declarations */
539 /*****************************************************************************/
540 typedef void (*P_SL_DEV_PING_CALLBACK)(SlNetAppPingReport_t*);
541 
542 /*****************************************************************************/
543 /* Function prototypes */
544 /*****************************************************************************/
545 
546 
571 #if _SL_INCLUDE_FUNC(sl_NetAppStart)
572 _i16 sl_NetAppStart(const _u32 AppBitMap);
573 #endif
574 
600 #if _SL_INCLUDE_FUNC(sl_NetAppStop)
601 _i16 sl_NetAppStop(const _u32 AppBitMap);
602 #endif
603 
654 #if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByName)
655 _i16 sl_NetAppDnsGetHostByName(_i8 * pHostName,const _u16 NameLen, _u32* OutIpAddr,const _u8 Family );
656 #endif
657 
711 #if _SL_INCLUDE_FUNC(sl_NetAppDnsGetHostByService)
712 _i16 sl_NetAppDnsGetHostByService(_i8 *pServiceName, /* string containing all (or only part): name + subtype + service */
713  const _u8 ServiceLen,
714  const _u8 Family, /* 4-IPv4 , 16-IPv6 */
715  _u32 pAddr[],
716  _u32 *pPort,
717  _u16 *pTextLen, /* in: max len , out: actual len */
718  _i8 *pText
719  );
720 
721 #endif
722 
773 #if _SL_INCLUDE_FUNC(sl_NetAppGetServiceList)
774 _i16 sl_NetAppGetServiceList(const _u8 IndexOffset,
775  const _u8 MaxServiceCount,
776  const _u8 Flags,
777  _i8 *pBuffer,
778  const _u32 BufferLength
779  );
780 
781 #endif
782 
812 #if _SL_INCLUDE_FUNC(sl_NetAppMDNSUnRegisterService)
813 _i16 sl_NetAppMDNSUnRegisterService(const _i8 *pServiceName,const _u8 ServiceNameLen,_u32 Options);
814 #endif
815 
880 #if _SL_INCLUDE_FUNC(sl_NetAppMDNSRegisterService)
881 _i16 sl_NetAppMDNSRegisterService( const _i8* pServiceName,
882  const _u8 ServiceNameLen,
883  const _i8* pText,
884  const _u8 TextLen,
885  const _u16 Port,
886  const _u32 TTL,
887  _u32 Options);
888 #endif
889 
954 #if _SL_INCLUDE_FUNC(sl_NetAppPing)
955 _i16 sl_NetAppPing(const SlNetAppPingCommand_t* pPingParams,const _u8 Family, SlNetAppPingReport_t *pReport, const P_SL_DEV_PING_CALLBACK pPingCallback);
956 #endif
957 
1159 #if _SL_INCLUDE_FUNC(sl_NetAppSet)
1160 _i16 sl_NetAppSet(const _u8 AppId ,const _u8 Option,const _u8 OptionLen,const _u8 *pOptionValue);
1161 #endif
1162 
1259 #if _SL_INCLUDE_FUNC(sl_NetAppGet)
1260 _i16 sl_NetAppGet(const _u8 AppId, const _u8 Option,_u8 *pOptionLen, _u8 *pOptionValue);
1261 #endif
1262 
1281 #if _SL_INCLUDE_FUNC(sl_NetAppSend)
1282 _u16 sl_NetAppSend( _u16 Handle, _u16 DataLen, _u8 *pData, _u32 Flags);
1283 #endif
1284 
1301 #if _SL_INCLUDE_FUNC(sl_NetAppRecv)
1302 _SlReturnVal_t sl_NetAppRecv( _u16 Handle, _u16 *DataLen, _u8 *pData, _u32 *Flags);
1303 #endif
1304 
1305 
1314 #ifdef __cplusplus
1315 }
1316 #endif /* __cplusplus */
1317 
1318 #endif /* __NETAPP_H__ */
1319 
Definition: netapp.h:304
_i16 sl_NetAppSet(const _u8 AppId, const _u8 Option, const _u8 OptionLen, const _u8 *pOptionValue)
Setting network application configurations.
Definition: netapp.c:1113
_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...
Definition: netapp.c:472
_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...
Definition: netapp.c:1261
_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 s...
Definition: netapp.c:592
_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. ...
Definition: netapp.c:834
_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
Definition: netapp.c:980
_i16 sl_NetAppStart(const _u32 AppBitMap)
Starts a network application.
Definition: netapp.c:86
_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 D...
Definition: netapp.c:418
_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&#39;s services that are in the NWP without issui...
Definition: netapp.c:157
_i16 sl_NetAppStop(const _u32 AppBitMap)
Stops a network application.
Definition: netapp.c:115
_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)
Definition: netapp.c:1394
_i16 sl_NetAppGet(const _u8 AppId, const _u8 Option, _u8 *pOptionLen, _u8 *pOptionValue)
Getting network applications configurations.
Definition: netapp.c:1440