CC3000  1.12
 All Classes Functions Groups
netapp.h
1 /*****************************************************************************
2 *
3 * netapp.h - CC3000 Host Driver Implementation.
4 * Copyright (C) 2011 Texas Instruments Incorporated - https://www.ti.com/
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the
16 * distribution.
17 *
18 * Neither the name of Texas Instruments Incorporated nor the names of
19 * its contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 *****************************************************************************/
35 #ifndef __NETAPP_H__
36 #define __NETAPP_H__
37 
38 #include "data_types.h"
39 
40 //*****************************************************************************
41 //
42 // If building with a C++ compiler, make all of the definitions in this header
43 // have a C binding.
44 //
45 //*****************************************************************************
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 //*****************************************************************************
51 //
54 //
55 //*****************************************************************************
56 
58 {
59  UINT8 aucIP[4];
60  UINT8 aucSubnetMask[4];
61  UINT8 aucDefaultGateway[4];
62  UINT8 aucDHCPServer[4];
63  UINT8 aucDNSServer[4];
65 
67 {
68  UINT8 aucIP[4];
69  UINT8 aucSubnetMask[4];
70  UINT8 aucDefaultGateway[4];
71  UINT8 aucDHCPServer[4];
72  UINT8 aucDNSServer[4];
73  UINT8 uaMacAddr[6];
74  UINT8 uaSSID[32];
76 
77 
78 /*Ping send report parameters*/
80 {
81  UINT32 packets_sent;
82  UINT32 packets_received;
83  UINT32 min_round_time;
84  UINT32 max_round_time;
85  UINT32 avg_round_time;
87 
88 
89 //*****************************************************************************
90 //
101 //
102 //*****************************************************************************
103 extern INT32 netapp_config_mac_adrress( UINT8 *mac );
104 
105 //*****************************************************************************
106 //
130 //*****************************************************************************
131 extern INT32 netapp_dhcp(UINT32 *aucIP, UINT32 *aucSubnetMask,UINT32 *aucDefaultGateway, UINT32 *aucDNSServer);
132 
133 
134 
135 //*****************************************************************************
136 //
183 //*****************************************************************************
184 #ifndef CC3000_TINY_DRIVER
185 extern INT32 netapp_timeout_values(UINT32 *aucDHCP, UINT32 *aucARP, UINT32 *aucKeepalive, UINT32 *aucInactivity);
186 #endif
187 
188 //*****************************************************************************
189 //
207 //*****************************************************************************
208 
209  #ifndef CC3000_TINY_DRIVER
210 extern INT32 netapp_ping_send(UINT32 *ip, UINT32 ulPingAttempts, UINT32 ulPingSize, UINT32 ulPingTimeout);
211 #endif
212 
213 //*****************************************************************************
214 //
224 //*****************************************************************************
225 
226 #ifndef CC3000_TINY_DRIVER
227 extern INT32 netapp_ping_stop();
228 #endif
229 //*****************************************************************************
230 //
250 //*****************************************************************************
251 #ifndef CC3000_TINY_DRIVER
252 extern void netapp_ping_report();
253 #endif
254 
255 
256 //*****************************************************************************
257 //
280 //*****************************************************************************
281 
282 extern void netapp_ipconfig( tNetappIpconfigRetArgs * ipconfig );
283 
284 
285 //*****************************************************************************
286 //
295 //*****************************************************************************
296 
297 #ifndef CC3000_TINY_DRIVER
298 extern INT32 netapp_arp_flush();
299 #endif
300 
301 
302 //*****************************************************************************
303 //
318 //*****************************************************************************
319 
320 
321 #ifndef CC3000_TINY_DRIVER
322 INT32 netapp_set_debug_level(UINT32 ulLevel);
323 #endif
324 //*****************************************************************************
325 //
326 // Close the Doxygen group.
328 //
329 //*****************************************************************************
330 
331 
332 
333 //*****************************************************************************
334 //
335 // Mark the end of the C bindings section for C++ compilers.
336 //
337 //*****************************************************************************
338 #ifdef __cplusplus
339 }
340 #endif // __cplusplus
341 
342 #endif // __NETAPP_H__
343 
Definition: netapp.h:66
INT32 netapp_dhcp(UINT32 *aucIP, UINT32 *aucSubnetMask, UINT32 *aucDefaultGateway, UINT32 *aucDNSServer)
netapp_dhcp is used to configure the network interface, static or dynamic (DHCP). In order to activa...
Definition: netapp.c:100
void netapp_ipconfig(tNetappIpconfigRetArgs *ipconfig)
Obtain the CC3000 Network interface information. Note that the information is available only after th...
Definition: netapp.c:359
INT32 netapp_config_mac_adrress(UINT8 *mac)
Configure device MAC address and store it in NVMEM. The value of the MAC address configured through t...
Definition: netapp.c:69
void netapp_ping_report()
Request for ping status. This API triggers the CC3000 to send asynchronous events: HCI_EVNT_WLAN_ASYN...
Definition: netapp.c:284
INT32 netapp_arp_flush()
Flushes ARP table.
Definition: netapp.c:392
Definition: netapp.h:57
INT32 netapp_set_debug_level(UINT32 ulLevel)
Debug messages sent via the UART debug channel, this function enable/disable the debug level...
Definition: netapp.c:430
INT32 netapp_ping_stop()
Stop any ping request.
Definition: netapp.c:314
Definition: netapp.h:79
INT32 netapp_timeout_values(UINT32 *aucDHCP, UINT32 *aucARP, UINT32 *aucKeepalive, UINT32 *aucInactivity)
Set new timeout values. Function set new timeout values for: DHCP lease timeout, ARP refresh timeout...
Definition: netapp.c:178
INT32 netapp_ping_send(UINT32 *ip, UINT32 ulPingAttempts, UINT32 ulPingSize, UINT32 ulPingTimeout)
send ICMP ECHO_REQUEST to network hosts
Definition: netapp.c:234