1 // Copyright 2019 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef _ESP_NETIF_LWIP_SLIP_H_
16 #define _ESP_NETIF_LWIP_SLIP_H_
17 
18 /**
19  * @brief  Creates new SLIP related structure
20  *
21  * @param[in]     esp_netif pointer esp-netif instance
22  * @param[in]     stack_config TCP/IP stack configuration structure
23  *
24  * @return
25  *         - pointer to slip-netif object on success
26  *         - NULL otherwise
27  */
28 netif_related_data_t * esp_netif_new_slip(esp_netif_t *esp_netif, const esp_netif_netstack_config_t *esp_netif_stack_config);
29 
30 /**
31  * @brief   Destroys the slip netif object
32  *
33  * @param[in]    slip pointer to internal slip context instance
34  */
35 void esp_netif_destroy_slip(netif_related_data_t *slip);
36 
37 /**
38  * @brief Stop the esp slip netif
39  *
40  * @param[in]    esp_netif handle to slip esp-netif instance
41  *
42  * @return
43  *         - ESP_OK on success
44  */
45 esp_err_t esp_netif_stop_slip(esp_netif_t *esp_netif);
46 
47 /**
48  * @brief Start the esp slip netif
49  *
50  * @param[in]    esp_netif handle to slip esp-netif instance
51  *
52  * @return
53  *         - ESP_OK on success
54  */
55 esp_err_t esp_netif_start_slip(esp_netif_t *esp_netif);
56 
57 
58 #endif // _ESP_NETIF_LWIP_SLIP_H_
59