net.h
Go to the documentation of this file.
1 /**
2  * @file net.h
3  * @brief TCP/IP stack core
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 1.9.6
29  **/
30 
31 #ifndef _NET_H
32 #define _NET_H
33 
34 //Forward declaration of NetInterface structure
35 struct _NetInterface;
36 #define NetInterface struct _NetInterface
37 
38 //Dependencies
39 #include "os_port.h"
40 #include "net_config.h"
41 #include "core/net_legacy.h"
42 #include "core/net_mem.h"
43 #include "core/nic.h"
44 #include "core/ethernet.h"
45 #include "ipv4/ipv4.h"
46 #include "ipv4/ipv4_frag.h"
47 #include "ipv4/auto_ip.h"
48 #include "ipv6/ipv6.h"
49 #include "ipv4/arp.h"
50 #include "ipv6/ndp.h"
51 #include "ipv6/ndp_router_adv.h"
52 #include "ipv6/slaac.h"
53 #include "ppp/ppp.h"
54 #include "dhcp/dhcp_client.h"
55 #include "dhcp/dhcp_server.h"
56 #include "dhcpv6/dhcpv6_client.h"
57 #include "dns/dns_client.h"
58 #include "mdns/mdns_responder.h"
59 #include "mdns/mdns_common.h"
60 #include "dns_sd/dns_sd.h"
61 #include "cpu_endian.h"
62 #include "error.h"
63 
64 
65 /*
66  * CycloneTCP Open is licensed under GPL version 2. In particular:
67  *
68  * - If you link your program to CycloneTCP Open, the result is a derivative
69  * work that can only be distributed under the same GPL license terms.
70  *
71  * - If additions or changes to CycloneTCP Open are made, the result is a
72  * derivative work that can only be distributed under the same license terms.
73  *
74  * - The GPL license requires that you make the source code available to
75  * whoever you make the binary available to.
76  *
77  * - If you sell or distribute a hardware product that runs CycloneTCP Open,
78  * the GPL license requires you to provide public and full access to all
79  * source code on a nondiscriminatory basis.
80  *
81  * If you fully understand and accept the terms of the GPL license, then edit
82  * the os_port_config.h header and add the following directive:
83  *
84  * #define GPL_LICENSE_TERMS_ACCEPTED
85  */
86 
87 #ifndef GPL_LICENSE_TERMS_ACCEPTED
88  #error Before compiling CycloneTCP Open, you must accept the terms of the GPL license
89 #endif
90 
91 //Version string
92 #define CYCLONE_TCP_VERSION_STRING "1.9.6"
93 //Major version
94 #define CYCLONE_TCP_MAJOR_VERSION 1
95 //Minor version
96 #define CYCLONE_TCP_MINOR_VERSION 9
97 //Revision number
98 #define CYCLONE_TCP_REV_NUMBER 6
99 
100 //RTOS support
101 #ifndef NET_RTOS_SUPPORT
102  #define NET_RTOS_SUPPORT ENABLED
103 #elif (NET_RTOS_SUPPORT != ENABLED && NET_RTOS_SUPPORT != DISABLED)
104  #error NET_RTOS_SUPPORT parameter is not valid
105 #endif
106 
107 //Number of network adapters
108 #ifndef NET_INTERFACE_COUNT
109  #define NET_INTERFACE_COUNT 1
110 #elif (NET_INTERFACE_COUNT < 1)
111  #error NET_INTERFACE_COUNT parameter is not valid
112 #endif
113 
114 //Loopback interface support
115 #ifndef NET_LOOPBACK_IF_SUPPORT
116  #define NET_LOOPBACK_IF_SUPPORT DISABLED
117 #elif (NET_LOOPBACK_IF_SUPPORT != ENABLED && NET_LOOPBACK_IF_SUPPORT != DISABLED)
118  #error NET_LOOPBACK_IF_SUPPORT parameter is not valid
119 #endif
120 
121 //Maximum number of callback functions that can be registered
122 //to monitor link changes
123 #ifndef NET_CALLBACK_TABLE_SIZE
124  #define NET_CALLBACK_TABLE_SIZE 6
125 #elif (NET_CALLBACK_TABLE_SIZE < 1)
126  #error NET_CALLBACK_TABLE_SIZE parameter is not valid
127 #endif
128 
129 //Maximum length of interface name
130 #ifndef NET_MAX_IF_NAME_LEN
131  #define NET_MAX_IF_NAME_LEN 8
132 #elif (NET_MAX_IF_NAME_LEN < 1)
133  #error NET_MAX_IF_NAME_LEN parameter is not valid
134 #endif
135 
136 //Maximum length of host name
137 #ifndef NET_MAX_HOSTNAME_LEN
138  #define NET_MAX_HOSTNAME_LEN 24
139 #elif (NET_MAX_HOSTNAME_LEN < 1)
140  #error NET_MAX_HOSTNAME_LEN parameter is not valid
141 #endif
142 
143 //Maximum length of proxy server name
144 #ifndef NET_MAX_PROXY_NAME_LEN
145  #define NET_MAX_PROXY_NAME_LEN 16
146 #elif (NET_MAX_PROXY_NAME_LEN < 1)
147  #error NET_MAX_PROXY_NAME_LEN parameter is not valid
148 #endif
149 
150 //OS resources are statically allocated at compile time
151 #ifndef NET_STATIC_OS_RESOURCES
152  #define NET_STATIC_OS_RESOURCES DISABLED
153 #elif (NET_STATIC_OS_RESOURCES != ENABLED && NET_STATIC_OS_RESOURCES != DISABLED)
154  #error NET_STATIC_OS_RESOURCES parameter is not valid
155 #endif
156 
157 //Stack size required to run the TCP/IP task
158 #ifndef NET_TASK_STACK_SIZE
159  #define NET_TASK_STACK_SIZE 650
160 #elif (NET_TASK_STACK_SIZE < 1)
161  #error NET_TASK_STACK_SIZE parameter is not valid
162 #endif
163 
164 //Priority at which the TCP/IP task should run
165 #ifndef NET_TASK_PRIORITY
166  #define NET_TASK_PRIORITY OS_TASK_PRIORITY_HIGH
167 #endif
168 
169 //TCP/IP stack tick interval
170 #ifndef NET_TICK_INTERVAL
171  #define NET_TICK_INTERVAL 100
172 #elif (NET_TICK_INTERVAL < 10)
173  #error NET_TICK_INTERVAL parameter is not valid
174 #endif
175 
176 //C++ guard
177 #ifdef __cplusplus
178 extern "C" {
179 #endif
180 
181 
182 /**
183  * @brief Structure describing a network interface
184  **/
185 
187 {
188  uint_t index; ///<Zero-based index
189  uint32_t id; ///<A unique number identifying the interface
190  Eui64 eui64; ///<EUI-64 interface identifier
191  char_t name[NET_MAX_IF_NAME_LEN + 1]; ///<A unique name identifying the interface
193  char_t proxyName[NET_MAX_PROXY_NAME_LEN + 1]; ///<Proxy server name
194  uint16_t proxyPort; ///<Proxy server port
195  const NicDriver *nicDriver; ///<NIC driver
196  const PhyDriver *phyDriver; ///<PHY driver
197  uint8_t phyAddr; ///<PHY address
198  const SpiDriver *spiDriver; ///<Underlying SPI driver
199  const UartDriver *uartDriver; ///<Underlying UART driver
200  const ExtIntDriver *extIntDriver; ///<External interrupt line driver
201  uint8_t nicContext[NIC_CONTEXT_SIZE]; ///<Driver specific context
202  OsEvent nicTxEvent; ///<Network controller TX event
203  bool_t nicEvent; ///<A NIC event is pending
204  bool_t phyEvent; ///<A PHY event is pending
205  bool_t linkState; ///<Link state
206  uint32_t linkSpeed; ///<Link speed
207  NicDuplexMode duplexMode; ///<Duplex mode
208  bool_t configured; ///<Configuration done
209 
210 #if (ETH_SUPPORT == ENABLED)
211  MacAddr macAddr; ///<Link-layer address
213 #endif
214 #if (ETH_VLAN_SUPPORT == ENABLED)
215  uint16_t vlanId; ///<VLAN identifier (802.1q)
216 #endif
217 #if (ETH_VMAN_SUPPORT == ENABLED)
218  uint16_t vmanId; ///<VMAN identifier (802.1ad)
219 #endif
220 #if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
221  uint8_t port; ///<Switch port identifier
222 #endif
223 #if (ETH_VIRTUAL_IF_SUPPORT == ENABLED || ETH_VLAN_SUPPORT == ENABLED || \
224  ETH_PORT_TAGGING_SUPPORT == ENABLED)
225  NetInterface *parent; ///<Interface on top of which the virtual interface runs
226 #endif
227 
228 #if (IPV4_SUPPORT == ENABLED)
229  Ipv4Context ipv4Context; ///<IPv4 context
231 #if (IGMP_SUPPORT == ENABLED)
232  systime_t igmpv1RouterPresentTimer; ///<IGMPv1 router present timer
233  bool_t igmpv1RouterPresent; ///<An IGMPv1 query has been recently heard
234 #endif
235 #if (AUTO_IP_SUPPORT == ENABLED)
236  AutoIpContext *autoIpContext; ///<Auto-IP context
237 #endif
238 #if (DHCP_CLIENT_SUPPORT == ENABLED)
239  DhcpClientContext *dhcpClientContext; ///<DHCP client context
240 #endif
241 #if (DHCP_SERVER_SUPPORT == ENABLED)
242  DhcpServerContext *dhcpServerContext; ///<DHCP server context
243 #endif
244 #endif
245 
246 #if (IPV6_SUPPORT == ENABLED)
247  Ipv6Context ipv6Context; ///<IPv6 context
248 #if (NDP_SUPPORT == ENABLED)
249  NdpContext ndpContext; ///<NDP context
250 #endif
251 #if (NDP_ROUTER_ADV_SUPPORT == ENABLED)
252  NdpRouterAdvContext *ndpRouterAdvContext; ///<RA service context
253 #endif
254 #if (SLAAC_SUPPORT == ENABLED)
255  SlaacContext *slaacContext; ///<SLAAC context
256 #endif
257 #if (DHCPV6_CLIENT_SUPPORT == ENABLED)
258  Dhcpv6ClientContext *dhcpv6ClientContext; ///<DHCPv6 client context
259 #endif
260 #endif
261 
262 #if (MDNS_RESPONDER_SUPPORT == ENABLED)
263  MdnsResponderContext *mdnsResponderContext; ///<mDNS responder context
264 #endif
265 
266 #if (DNS_SD_SUPPORT == ENABLED)
267  DnsSdContext *dnsSdContext; ///DNS-SD context
268 #endif
269 
270 #if (PPP_SUPPORT == ENABLED)
271  PppContext *pppContext; ///<PPP context
272 #endif
273 };
274 
275 
276 /**
277  * @brief Link change callback
278  **/
279 
280 typedef void (*LinkChangeCallback)(NetInterface *interface, bool_t linkState, void *param);
281 
282 
283 /**
284  * @brief Entry describing a user callback
285  **/
286 
287 typedef struct
288 {
291  void *param;
293 
294 
295 //Global variables
296 extern OsTask *netTaskHandle;
297 extern OsMutex netMutex;
298 extern OsEvent netEvent;
300 
301 //TCP/IP stack related functions
302 error_t netInit(void);
303 
304 error_t netSetMacAddr(NetInterface *interface, const MacAddr *macAddr);
305 error_t netGetMacAddr(NetInterface *interface, MacAddr *macAddr);
306 
307 error_t netSetEui64(NetInterface *interface, const Eui64 *eui64);
308 error_t netGetEui64(NetInterface *interface, Eui64 *eui64);
309 
310 error_t netSetInterfaceId(NetInterface *interface, uint32_t id);
312 error_t netSetHostname(NetInterface *interface, const char_t *name);
313 error_t netSetProxy(NetInterface *interface, const char_t *name, uint16_t port);
314 
315 error_t netSetVlanId(NetInterface *interface, uint16_t vlanId);
316 error_t netSetVmanId(NetInterface *interface, uint16_t vmanId);
317 error_t netSetSwitchPort(NetInterface *interface, uint8_t port);
318 
320  NetInterface *physicalInterface);
321 
322 error_t netSetDriver(NetInterface *interface, const NicDriver *driver);
323 
324 error_t netSetPhyDriver(NetInterface *interface, const PhyDriver *driver);
325 error_t netSetPhyAddr(NetInterface *interface, uint8_t phyAddr);
326 
327 error_t netSetSpiDriver(NetInterface *interface, const SpiDriver *driver);
328 error_t netSetUartDriver(NetInterface *interface, const UartDriver *driver);
329 error_t netSetExtIntDriver(NetInterface *interface, const ExtIntDriver *driver);
330 
331 error_t netSetLinkState(NetInterface *interface, NicLinkState linkState);
333 
337 
338 void netProcessLinkChange(NetInterface *interface);
339 
340 void netTask(void);
341 void netTick(void);
342 
344 
345 error_t netInitRand(uint32_t seed);
346 uint32_t netGetRand(void);
347 int32_t netGetRandRange(int32_t min, int32_t max);
348 
350  LinkChangeCallback callback, void *param, uint_t *cookie);
351 
353 
354 void netInvokeLinkChangeCallback(NetInterface *interface, bool_t linkState);
355 
356 //C++ guard
357 #ifdef __cplusplus
358 }
359 #endif
360 
361 #endif
#define MdnsResponderContext
IPv6 (Internet Protocol Version 6)
const NicDriver * nicDriver
NIC driver.
Definition: net.h:195
error_t netSetEui64(NetInterface *interface, const Eui64 *eui64)
Set EUI-64 interface identifier.
Definition: net.c:377
error_t netStartInterface(NetInterface *interface)
Start network interface.
Definition: net.c:1076
error_t netInitRand(uint32_t seed)
Seed pseudo-random number generator.
Definition: net.c:1795
error_t netSetExtIntDriver(NetInterface *interface, const ExtIntDriver *driver)
Set external interrupt line driver.
Definition: net.c:803
error_t netSetLinkState(NetInterface *interface, NicLinkState linkState)
Set link state (for virtual drivers only)
Definition: net.c:828
MacAddr macAddr
Link-layer address.
Definition: net.h:211
error_t netSetInterfaceName(NetInterface *interface, const char_t *name)
Set interface name.
Definition: net.c:459
int bool_t
Definition: compiler_port.h:49
error_t netSetUartDriver(NetInterface *interface, const UartDriver *driver)
Set UART driver.
Definition: net.c:778
DhcpServerContext * dhcpServerContext
DHCP server context.
Definition: net.h:242
DHCP client (Dynamic Host Configuration Protocol)
error_t netGetEui64(NetInterface *interface, Eui64 *eui64)
Retrieve EUI-64 interface identifier.
Definition: net.c:402
NdpContext ndpContext
NDP context.
Definition: net.h:249
__start_packed struct @109 Eui64
EUI-64 identifier.
Eui64 eui64
EUI-64 interface identifier.
Definition: net.h:190
error_t netGetMacAddr(NetInterface *interface, MacAddr *macAddr)
Retrieve MAC address.
Definition: net.c:340
MdnsResponderContext * mdnsResponderContext
mDNS responder context
Definition: net.h:263
error_t netSetParentInterface(NetInterface *interface, NetInterface *physicalInterface)
Attach a virtual interface to a given physical interface.
Definition: net.c:642
error_t netSetSpiDriver(NetInterface *interface, const SpiDriver *driver)
Set SPI driver.
Definition: net.c:753
Memory management.
uint16_t vlanId
VLAN identifier (802.1q)
Definition: net.h:215
const UartDriver * uartDriver
Underlying UART driver.
Definition: net.h:199
uint8_t nicContext[NIC_CONTEXT_SIZE]
Driver specific context.
Definition: net.h:201
#define MAC_ADDR_FILTER_SIZE
Definition: ethernet.h:74
PHY driver.
Definition: nic.h:214
UART driver.
Definition: nic.h:245
Event object.
External interrupt line driver.
Definition: nic.h:258
#define AutoIpContext
Definition: auto_ip.h:139
char_t name[NET_MAX_IF_NAME_LEN+1]
A unique name identifying the interface.
Definition: net.h:191
error_t netStopInterface(NetInterface *interface)
Stop network interface.
Definition: net.c:1157
#define NET_INTERFACE_COUNT
Definition: net.h:109
Legacy definitions.
char_t name[]
DhcpClientContext * dhcpClientContext
DHCP client context.
Definition: net.h:239
void(* LinkChangeCallback)(NetInterface *interface, bool_t linkState, void *param)
Link change callback.
Definition: net.h:280
SPI driver.
Definition: nic.h:230
bool_t igmpv1RouterPresent
An IGMPv1 query has been recently heard.
Definition: net.h:233
error_t netSetProxy(NetInterface *interface, const char_t *name, uint16_t port)
Set proxy server.
Definition: net.c:514
SlaacContext * slaacContext
SLAAC context.
Definition: net.h:255
error_t netSetInterfaceId(NetInterface *interface, uint32_t id)
Set interface identifier.
Definition: net.c:434
error_t netSetMacAddr(NetInterface *interface, const MacAddr *macAddr)
Set MAC address.
Definition: net.c:305
#define PppContext
Definition: ppp.h:38
IPv6 Stateless Address Autoconfiguration.
IPv6 context.
Definition: ipv6.h:462
IPv4 context.
Definition: ipv4.h:338
Ethernet.
char_t proxyName[NET_MAX_PROXY_NAME_LEN+1]
Proxy server name.
Definition: net.h:193
#define DhcpClientContext
Definition: dhcp_client.h:154
Router advertisement service.
Definitions common to mDNS client and mDNS responder.
bool_t phyEvent
A PHY event is pending.
Definition: net.h:204
DNS-SD (DNS-Based Service Discovery)
ArpCacheEntry arpCache[ARP_CACHE_SIZE]
ARP cache.
Definition: net.h:230
error_t netSetVmanId(NetInterface *interface, uint16_t vmanId)
Specify VMAN identifier (802.1ad)
Definition: net.c:577
bool_t netGetLinkState(NetInterface *interface)
Get link state.
Definition: net.c:860
#define ARP_CACHE_SIZE
Definition: arp.h:46
error_t netSetPhyAddr(NetInterface *interface, uint8_t phyAddr)
Set Ethernet PHY address.
Definition: net.c:724
error_t netSetHostname(NetInterface *interface, const char_t *name)
Set host name.
Definition: net.c:486
#define SlaacContext
Definition: slaac.h:50
error_t
Error codes.
Definition: error.h:42
NetInterface netInterface[NET_INTERFACE_COUNT]
Definition: net.c:79
NDP context.
Definition: ndp.h:575
DHCPv6 client (Dynamic Host Configuration Protocol for IPv6)
error_t netInit(void)
TCP/IP stack initialization.
Definition: net.c:108
NicLinkState
Link state.
Definition: nic.h:90
error_t netDetachLinkChangeCallback(uint_t cookie)
Unregister link change callback.
Definition: net.c:1920
NetInterface * netGetDefaultInterface(void)
Get default network interface.
Definition: net.c:1782
char_t hostname[NET_MAX_HOSTNAME_LEN+1]
Host name.
Definition: net.h:192
uint16_t proxyPort
Proxy server port.
Definition: net.h:194
error_t netAttachLinkChangeCallback(NetInterface *interface, LinkChangeCallback callback, void *param, uint_t *cookie)
Register link change callback.
Definition: net.c:1871
#define NetInterface
Definition: net.h:36
Ipv6Context ipv6Context
IPv6 context.
Definition: net.h:247
Task object.
OsEvent netEvent
Definition: net.c:77
int32_t netGetRandRange(int32_t min, int32_t max)
Get a random value in the specified range.
Definition: net.c:1841
uint8_t port
Switch port identifier.
Definition: net.h:221
#define Dhcpv6ClientContext
uint16_t vmanId
VMAN identifier (802.1ad)
Definition: net.h:218
Error codes description.
uint_t index
Zero-based index.
Definition: net.h:188
Byte order conversion.
#define NIC_CONTEXT_SIZE
Definition: nic.h:53
NDP (Neighbor Discovery Protocol)
DNS client (Domain Name System)
Mutex object.
uint16_t port
Definition: dns_common.h:223
NdpRouterAdvContext * ndpRouterAdvContext
RA service context.
Definition: net.h:252
error_t netSetVlanId(NetInterface *interface, uint16_t vlanId)
Specify VLAN identifier (802.1q)
Definition: net.c:543
error_t netSetPhyDriver(NetInterface *interface, const PhyDriver *driver)
Set Ethernet PHY driver.
Definition: net.c:699
RA service context.
uint32_t netGetRand(void)
Get a random value.
Definition: net.c:1810
char char_t
Definition: compiler_port.h:43
AutoIpContext * autoIpContext
Auto-IP context.
Definition: net.h:236
error_t netSetDriver(NetInterface *interface, const NicDriver *driver)
Set Ethernet MAC driver.
Definition: net.c:674
const ExtIntDriver * extIntDriver
External interrupt line driver.
Definition: net.h:200
bool_t linkState
Link state.
Definition: net.h:205
uint32_t linkSpeed
Link speed.
Definition: net.h:206
IPv4 fragmentation and reassembly.
#define NET_MAX_IF_NAME_LEN
Definition: net.h:131
MAC filter table entry.
Definition: ethernet.h:220
PppContext * pppContext
DNS-SD context.
Definition: net.h:271
NicDuplexMode
Duplex mode.
Definition: nic.h:115
Network interface controller abstraction layer.
const SpiDriver * spiDriver
Underlying SPI driver.
Definition: net.h:198
systime_t igmpv1RouterPresentTimer
IGMPv1 router present timer.
Definition: net.h:232
uint8_t phyAddr
PHY address.
Definition: net.h:197
OsEvent nicTxEvent
Network controller TX event.
Definition: net.h:202
ARP cache entry.
Definition: arp.h:183
DHCP server context.
Definition: dhcp_server.h:117
void netTask(void)
TCP/IP events handling.
Definition: net.c:1338
uint8_t cookie[]
Definition: dtls_misc.h:203
PPP (Point-to-Point Protocol)
#define NET_MAX_PROXY_NAME_LEN
Definition: net.h:145
OsTask * netTaskHandle
Definition: net.c:73
error_t netSetSwitchPort(NetInterface *interface, uint8_t port)
Specify switch port.
Definition: net.c:611
Dhcpv6ClientContext * dhcpv6ClientContext
DHCPv6 client context.
Definition: net.h:258
void netInvokeLinkChangeCallback(NetInterface *interface, bool_t linkState)
Invoke link change callback.
Definition: net.c:1944
Ipv4Context ipv4Context
IPv4 context.
Definition: net.h:229
const PhyDriver * phyDriver
PHY driver.
Definition: net.h:196
error_t netConfigInterface(NetInterface *interface)
Configure network interface.
Definition: net.c:886
IPv4 (Internet Protocol Version 4)
NicDuplexMode duplexMode
Duplex mode.
Definition: net.h:207
unsigned int uint_t
Definition: compiler_port.h:45
uint32_t id
A unique number identifying the interface.
Definition: net.h:189
void netTick(void)
Manage TCP/IP timers.
Definition: net.c:1472
bool_t nicEvent
A NIC event is pending.
Definition: net.h:203
bool_t configured
Configuration done.
Definition: net.h:208
NIC driver.
Definition: nic.h:179
OsMutex netMutex
Definition: net.c:75
void netProcessLinkChange(NetInterface *interface)
Process link state change event.
Definition: net.c:1214
#define DnsSdContext
Definition: dns_sd.h:90
RTOS abstraction layer.
DHCP server (Dynamic Host Configuration Protocol)
ARP (Address Resolution Protocol)
uint32_t systime_t
Definition: compiler_port.h:46
DnsSdContext * dnsSdContext
Definition: net.h:267
NetInterface * parent
Interface on top of which the virtual interface runs.
Definition: net.h:225
#define NET_MAX_HOSTNAME_LEN
Definition: net.h:138
Structure describing a network interface.
Definition: net.h:186
__start_packed struct @108 MacAddr
MAC address.
mDNS responder (Multicast DNS)
Auto-IP (Dynamic Configuration of IPv4 Link-Local Addresses)
MacFilterEntry macAddrFilter[MAC_ADDR_FILTER_SIZE]
MAC filter table.
Definition: net.h:212