nic.h
Go to the documentation of this file.
1 /**
2  * @file nic.h
3  * @brief Network interface controller abstraction layer
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2022 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 2.2.0
29  **/
30 
31 #ifndef _NIC_H
32 #define _NIC_H
33 
34 //Dependencies
35 #include "core/net.h"
36 
37 //Tick interval to handle NIC periodic operations
38 #ifndef NIC_TICK_INTERVAL
39  #define NIC_TICK_INTERVAL 1000
40 #elif (NIC_TICK_INTERVAL < 10)
41  #error NIC_TICK_INTERVAL parameter is not valid
42 #endif
43 
44 //Maximum duration a write operation may block
45 #ifndef NIC_MAX_BLOCKING_TIME
46  #define NIC_MAX_BLOCKING_TIME INFINITE_DELAY
47 #elif (NIC_MAX_BLOCKING_TIME < 0)
48  #error NIC_MAX_BLOCKING_TIME parameter is not valid
49 #endif
50 
51 //Size of the NIC driver context
52 #ifndef NIC_CONTEXT_SIZE
53  #define NIC_CONTEXT_SIZE 16
54 #elif (NIC_CONTEXT_SIZE < 1)
55  #error NIC_CONTEXT_SIZE parameter is not valid
56 #endif
57 
58 //Switch CPU port
59 #define SWITCH_CPU_PORT 32
60 #define SWITCH_CPU_PORT_MASK 0x80000000
61 
62 //Serial Management Interface
63 #define SMI_SYNC 0xFFFFFFFF
64 #define SMI_START 1
65 #define SMI_OPCODE_0 0
66 #define SMI_OPCODE_WRITE 1
67 #define SMI_OPCODE_READ 2
68 #define SMI_TA 2
69 
70 //C++ guard
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 
76 /**
77  * @brief NIC types
78  **/
79 
80 typedef enum
81 {
82  NIC_TYPE_UNKNOWN = 0, ///<Unknown interface type
83  NIC_TYPE_ETHERNET = 1, ///<Ethernet interface
84  NIC_TYPE_PPP = 2, ///<PPP interface
85  NIC_TYPE_6LOWPAN = 3, ///<6LoWPAN interface
86  NIC_TYPE_LOOPBACK = 4 ///<Loopback interface
88 
89 
90 /**
91  * @brief Link state
92  **/
93 
94 typedef enum
95 {
100 
101 
102 /**
103  * @brief Link speed
104  **/
105 
106 typedef enum
107 {
111  NIC_LINK_SPEED_1GBPS = 1000000000
113 
114 
115 /**
116  * @brief Duplex mode
117  **/
118 
119 typedef enum
120 {
125 
126 
127 /**
128  * @brief Switch port state
129  **/
130 
131 typedef enum
132 {
140 
141 
142 /**
143  * @brief Forwarding database entry
144  **/
145 
146 typedef struct
147 {
149  uint8_t srcPort;
150  uint32_t destPorts;
151  bool_t override;
153 
154 
155 /**
156  * @brief VLAN entry
157  **/
158 
159 typedef struct
160 {
161  uint16_t vlanId;
163  uint16_t fid;
164  uint32_t ports;
166 
167 
168 //NIC driver abstraction layer
169 typedef error_t (*NicInit)(NetInterface *interface);
170 typedef void (*NicTick)(NetInterface *interface);
171 typedef void (*NicEnableIrq)(NetInterface *interface);
172 typedef void (*NicDisableIrq)(NetInterface *interface);
173 typedef void (*NicEventHandler)(NetInterface *interface);
174 
175 typedef error_t (*NicSendPacket)(NetInterface *interface,
176  const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
177 
179 typedef error_t (*NicUpdateMacConfig)(NetInterface *interface);
180 
181 typedef void (*NicWritePhyReg)(uint8_t opcode, uint8_t phyAddr,
182  uint8_t regAddr, uint16_t data);
183 
184 typedef uint16_t (*NicReadPhyReg)(uint8_t opcode, uint8_t phyAddr,
185  uint8_t regAddr);
186 
187 //Ethernet PHY driver abstraction layer
188 typedef error_t (*PhyInit)(NetInterface *interface);
189 typedef void (*PhyTick)(NetInterface *interface);
190 typedef void (*PhyEnableIrq)(NetInterface *interface);
191 typedef void (*PhyDisableIrq)(NetInterface *interface);
192 typedef void (*PhyEventHandler)(NetInterface *interface);
193 
194 //Ethernet switch driver abstraction layer
195 typedef error_t (*SwitchInit)(NetInterface *interface);
196 typedef void (*SwitchTick)(NetInterface *interface);
197 typedef void (*SwitchEnableIrq)(NetInterface *interface);
198 typedef void (*SwitchDisableIrq)(NetInterface *interface);
199 typedef void (*SwitchEventHandler)(NetInterface *interface);
200 
201 typedef error_t (*SwitchTagFrame)(NetInterface *interface, NetBuffer *buffer,
202  size_t *offset, NetTxAncillary *ancillary);
203 
204 typedef error_t (*SwitchUntagFrame)(NetInterface *interface, uint8_t **frame,
205  size_t *length, NetRxAncillary *ancillary);
206 
207 typedef bool_t (*SwitchGetLinkState)(NetInterface *interface, uint8_t port);
208 typedef uint32_t (*SwitchGetLinkSpeed)(NetInterface *interface, uint8_t port);
209 
211  uint8_t port);
212 
213 typedef void (*SwitchSetPortState)(NetInterface *interface, uint8_t port,
214  SwitchPortState state);
215 
217  uint8_t port);
218 
219 typedef void (*SwitchSetAgingTime)(NetInterface *interface, uint32_t agingTime);
220 
221 typedef void (*SwitchEnableIgmpSnooping)(NetInterface *interface,
222  bool_t enable);
223 
224 typedef void (*SwitchEnableMldSnooping)(NetInterface *interface,
225  bool_t enable);
226 
227 typedef void (*SwitchEnableRsvdMcastTable)(NetInterface *interface,
228  bool_t enable);
229 
230 typedef error_t (*SwitchAddFdbEntry)(NetInterface *interface,
231  const SwitchFdbEntry *entry);
232 
234  const SwitchFdbEntry *entry);
235 
236 typedef error_t (*SwitchGetFdbEntry)(NetInterface *interface, uint_t index,
237  SwitchFdbEntry *entry);
238 
239 typedef void (*SwitchFlushStaticFdbTable)(NetInterface *interface);
240 
241 typedef void (*SwitchFlushDynamicFdbTable)(NetInterface *interface,
242  uint8_t port);
243 
244 typedef void (*SwitchSetUnknownMcastFwdPorts)(NetInterface *interface,
245  bool_t enable, uint32_t forwardPorts);
246 
247 //SMI driver abstraction layer
248 typedef error_t (*SmiInit)(void);
249 
250 typedef void (*SmiWritePhyReg)(uint8_t opcode, uint8_t phyAddr,
251  uint8_t regAddr, uint16_t data);
252 
253 typedef uint16_t (*SmiReadPhyReg)(uint8_t opcode, uint8_t phyAddr,
254  uint8_t regAddr);
255 
256 //SPI driver abstraction layer
257 typedef error_t (*SpiInit)(void);
259 typedef error_t (*SpiSetBitrate)(uint_t bitrate);
260 typedef void (*SpiAssertCs)(void);
261 typedef void (*SpiDeassertCs)(void);
262 typedef uint8_t (*SpiTransfer)(uint8_t data);
263 
264 //UART driver abstraction layer
265 typedef error_t (*UartInit)(void);
266 typedef void (*UartEnableIrq)(void);
267 typedef void (*UartDisableIrq)(void);
268 typedef void (*UartStartTx)(void);
269 
270 //External interrupt line driver abstraction layer
271 typedef error_t (*ExtIntInit)(void);
272 typedef void (*ExtIntEnableIrq)(void);
273 typedef void (*ExtIntDisableIrq)(void);
274 
275 
276 /**
277  * @brief NIC driver
278  **/
279 
280 typedef struct
281 {
283  size_t mtu;
298 } NicDriver;
299 
300 
301 /**
302  * @brief Ethernet PHY driver
303  **/
304 
305 typedef struct
306 {
312 } PhyDriver;
313 
314 
315 /**
316  * @brief Ethernet switch driver
317  **/
318 
319 typedef struct
320 {
344 } SwitchDriver;
345 
346 
347 /**
348  * @brief SMI driver
349  **/
350 
351 typedef struct
352 {
356 } SmiDriver;
357 
358 
359 /**
360  * @brief SPI driver
361  **/
362 
363 typedef struct
364 {
371 } SpiDriver;
372 
373 
374 /**
375  * @brief UART driver
376  **/
377 
378 typedef struct
379 {
384 } UartDriver;
385 
386 
387 /**
388  * @brief External interrupt line driver
389  **/
390 
391 typedef struct
392 {
396 } ExtIntDriver;
397 
398 
399 //Tick counter to handle periodic operations
401 
402 //NIC abstraction layer
405 uint8_t nicGetSwitchPort(NetInterface *interface);
406 uint16_t nicGetVlanId(NetInterface *interface);
407 uint16_t nicGetVmanId(NetInterface *interface);
408 
410 
411 void nicTick(NetInterface *interface);
412 
413 error_t nicSendPacket(NetInterface *interface, const NetBuffer *buffer,
414  size_t offset, NetTxAncillary *ancillary);
415 
417 
418 void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length,
419  NetRxAncillary *ancillary);
420 
421 void nicNotifyLinkChange(NetInterface *interface);
422 
423 //C++ guard
424 #ifdef __cplusplus
425 }
426 #endif
427 
428 #endif
uint8_t(* SpiTransfer)(uint8_t data)
Definition: nic.h:262
uint8_t length
Definition: coap_common.h:193
@ NIC_LINK_SPEED_1GBPS
Definition: nic.h:111
void nicTick(NetInterface *interface)
Network controller timer handler.
Definition: nic.c:250
SwitchEventHandler eventHandler
Definition: nic.h:325
ExtIntEnableIrq enableIrq
Definition: nic.h:394
SwitchDeleteFdbEntry deleteStaticFdbEntry
Definition: nic.h:338
uint8_t opcode
Definition: dns_common.h:172
void(* UartDisableIrq)(void)
Definition: nic.h:267
int bool_t
Definition: compiler_port.h:48
uint16_t(* SmiReadPhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Definition: nic.h:253
@ NIC_LINK_SPEED_UNKNOWN
Definition: nic.h:108
uint32_t destPorts
Definition: nic.h:150
size_t mtu
Definition: nic.h:283
NicWritePhyReg writePhyReg
Definition: nic.h:292
uint8_t data[]
Definition: ethernet.h:220
@ NIC_FULL_DUPLEX_MODE
Definition: nic.h:123
NicType type
Definition: nic.h:282
SwitchSetPortState setPortState
Definition: nic.h:331
@ SWITCH_PORT_STATE_LISTENING
Definition: nic.h:136
NicDuplexMode(* SwitchGetDuplexMode)(NetInterface *interface, uint8_t port)
Definition: nic.h:210
NicEnableIrq enableIrq
Definition: nic.h:286
SwitchSetUnknownMcastFwdPorts setUnknownMcastFwdPorts
Definition: nic.h:343
error_t(* SwitchAddFdbEntry)(NetInterface *interface, const SwitchFdbEntry *entry)
Definition: nic.h:230
SpiAssertCs assertCs
Definition: nic.h:368
ExtIntInit init
Definition: nic.h:393
@ SWITCH_PORT_STATE_DISABLED
Definition: nic.h:134
NicDisableIrq disableIrq
Definition: nic.h:287
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:89
error_t(* NicSendPacket)(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Definition: nic.h:175
NicUpdateMacConfig updateMacConfig
Definition: nic.h:291
Ethernet PHY driver.
Definition: nic.h:306
void(* SwitchSetUnknownMcastFwdPorts)(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Definition: nic.h:244
UART driver.
Definition: nic.h:379
SwitchTick tick
Definition: nic.h:322
External interrupt line driver.
Definition: nic.h:392
void(* SwitchEnableMldSnooping)(NetInterface *interface, bool_t enable)
Definition: nic.h:224
bool_t valid
Definition: nic.h:162
@ SWITCH_PORT_STATE_LEARNING
Definition: nic.h:137
SwitchGetPortState getPortState
Definition: nic.h:332
error_t(* SpiSetBitrate)(uint_t bitrate)
Definition: nic.h:259
void(* PhyDisableIrq)(NetInterface *interface)
Definition: nic.h:191
uint16_t(* NicReadPhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Definition: nic.h:184
SwitchAddFdbEntry addStaticFdbEntry
Definition: nic.h:337
SMI driver.
Definition: nic.h:352
error_t(* NicInit)(NetInterface *interface)
Definition: nic.h:169
void(* UartStartTx)(void)
Definition: nic.h:268
SwitchEnableIgmpSnooping enableIgmpSnooping
Definition: nic.h:334
SwitchFlushStaticFdbTable flushStaticFdbTable
Definition: nic.h:340
PhyInit init
Definition: nic.h:307
SwitchGetLinkState getLinkState
Definition: nic.h:328
SPI driver.
Definition: nic.h:364
void(* SwitchTick)(NetInterface *interface)
Definition: nic.h:196
void(* SwitchFlushStaticFdbTable)(NetInterface *interface)
Definition: nic.h:239
void(* PhyTick)(NetInterface *interface)
Definition: nic.h:189
SwitchGetDuplexMode getDuplexMode
Definition: nic.h:330
bool_t autoCrcStrip
Definition: nic.h:297
bool_t(* SwitchGetLinkState)(NetInterface *interface, uint8_t port)
Definition: nic.h:207
void(* PhyEnableIrq)(NetInterface *interface)
Definition: nic.h:190
NicInit init
Definition: nic.h:284
error_t(* NicUpdateMacConfig)(NetInterface *interface)
Definition: nic.h:179
SwitchGetLinkSpeed getLinkSpeed
Definition: nic.h:329
@ NIC_LINK_STATE_UP
Definition: nic.h:97
SwitchFlushDynamicFdbTable flushDynamicFdbTable
Definition: nic.h:342
error_t(* SwitchInit)(NetInterface *interface)
Definition: nic.h:195
void(* SpiDeassertCs)(void)
Definition: nic.h:261
UartDisableIrq disableIrq
Definition: nic.h:382
NetInterface * nicGetLogicalInterface(NetInterface *interface)
Retrieve logical interface.
Definition: nic.c:52
void(* SmiWritePhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Definition: nic.h:250
@ NIC_TYPE_LOOPBACK
Loopback interface.
Definition: nic.h:86
@ SWITCH_PORT_STATE_UNKNOWN
Definition: nic.h:133
systime_t nicTickCounter
Definition: nic.c:43
void(* SwitchEnableRsvdMcastTable)(NetInterface *interface, bool_t enable)
Definition: nic.h:227
SwitchDisableIrq disableIrq
Definition: nic.h:324
__start_packed struct @0 MacAddr
MAC address.
error_t nicSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet to the network controller.
Definition: nic.c:280
SmiWritePhyReg writePhyReg
Definition: nic.h:354
void(* NicEventHandler)(NetInterface *interface)
Definition: nic.h:173
SpiDeassertCs deassertCs
Definition: nic.h:369
VLAN entry.
Definition: nic.h:160
NicLinkSpeed
Link speed.
Definition: nic.h:107
error_t
Error codes.
Definition: error.h:43
SpiTransfer transfer
Definition: nic.h:370
NicType
NIC types.
Definition: nic.h:81
PhyDisableIrq disableIrq
Definition: nic.h:310
void(* SwitchDisableIrq)(NetInterface *interface)
Definition: nic.h:198
void(* SwitchEnableIgmpSnooping)(NetInterface *interface, bool_t enable)
Definition: nic.h:221
error_t(* SmiInit)(void)
Definition: nic.h:248
SwitchEnableIrq enableIrq
Definition: nic.h:323
NicLinkState
Link state.
Definition: nic.h:95
void(* SwitchFlushDynamicFdbTable)(NetInterface *interface, uint8_t port)
Definition: nic.h:241
#define NetRxAncillary
Definition: net_misc.h:40
#define NetInterface
Definition: net.h:36
@ NIC_LINK_SPEED_10MBPS
Definition: nic.h:109
error_t(* SwitchGetFdbEntry)(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Definition: nic.h:236
NicTick tick
Definition: nic.h:285
NicSendPacket sendPacket
Definition: nic.h:289
#define NetTxAncillary
Definition: net_misc.h:36
void(* ExtIntEnableIrq)(void)
Definition: nic.h:272
SpiSetBitrate setBitrate
Definition: nic.h:367
error_t(* SwitchUntagFrame)(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Definition: nic.h:204
SwitchUntagFrame untagFrame
Definition: nic.h:327
NicReadPhyReg readPhyReg
Definition: nic.h:293
error_t(* UartInit)(void)
Definition: nic.h:265
@ NIC_TYPE_UNKNOWN
Unknown interface type.
Definition: nic.h:82
SwitchPortState
Switch port state.
Definition: nic.h:132
void(* NicDisableIrq)(NetInterface *interface)
Definition: nic.h:172
NicEventHandler eventHandler
Definition: nic.h:288
error_t(* SwitchTagFrame)(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Definition: nic.h:201
SwitchTagFrame tagFrame
Definition: nic.h:326
PhyEventHandler eventHandler
Definition: nic.h:311
SwitchSetAgingTime setAgingTime
Definition: nic.h:333
error_t nicUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: nic.c:352
error_t(* ExtIntInit)(void)
Definition: nic.h:271
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:538
SwitchInit init
Definition: nic.h:321
SwitchEnableRsvdMcastTable enableRsvdMcastTable
Definition: nic.h:336
bool_t autoCrcCalc
Definition: nic.h:295
@ SWITCH_PORT_STATE_BLOCKING
Definition: nic.h:135
@ NIC_LINK_STATE_DOWN
Definition: nic.h:96
UartInit init
Definition: nic.h:380
@ SWITCH_PORT_STATE_FORWARDING
Definition: nic.h:138
uint32_t systime_t
System time.
uint16_t port
Definition: dns_common.h:251
UartStartTx startTx
Definition: nic.h:383
@ NIC_TYPE_PPP
PPP interface.
Definition: nic.h:84
SpiInit init
Definition: nic.h:365
void(* NicWritePhyReg)(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Definition: nic.h:181
SwitchGetFdbEntry getDynamicFdbEntry
Definition: nic.h:341
uint16_t fid
Definition: nic.h:163
error_t(* SpiInit)(void)
Definition: nic.h:257
uint16_t regAddr
void(* SwitchEventHandler)(NetInterface *interface)
Definition: nic.h:199
bool_t autoPadding
Definition: nic.h:294
Ethernet switch driver.
Definition: nic.h:320
uint16_t nicGetVmanId(NetInterface *interface)
Retrieve VMAN identifier.
Definition: nic.c:175
uint16_t vlanId
Definition: nic.h:161
void(* NicEnableIrq)(NetInterface *interface)
Definition: nic.h:171
void(* ExtIntDisableIrq)(void)
Definition: nic.h:273
void(* PhyEventHandler)(NetInterface *interface)
Definition: nic.h:192
bool_t nicIsParentInterface(NetInterface *interface, NetInterface *parent)
Test parent/child relationship between 2 interfaces.
Definition: nic.c:207
NicDuplexMode
Duplex mode.
Definition: nic.h:120
void(* SwitchSetAgingTime)(NetInterface *interface, uint32_t agingTime)
Definition: nic.h:219
MacAddr macAddr
Definition: nic.h:148
uint8_t srcPort
Definition: nic.h:149
@ NIC_HALF_DUPLEX_MODE
Definition: nic.h:122
NicUpdateMacAddrFilter updateMacAddrFilter
Definition: nic.h:290
bool_t autoCrcVerif
Definition: nic.h:296
NetInterface * nicGetPhysicalInterface(NetInterface *interface)
Retrieve physical interface.
Definition: nic.c:84
UartEnableIrq enableIrq
Definition: nic.h:381
void(* SpiAssertCs)(void)
Definition: nic.h:260
@ NIC_UNKNOWN_DUPLEX_MODE
Definition: nic.h:121
SmiInit init
Definition: nic.h:353
PhyTick tick
Definition: nic.h:308
uint8_t mode
Definition: ntp_common.h:149
uint32_t ports
Definition: nic.h:164
void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary)
Handle a packet received by the network controller.
Definition: nic.c:391
SwitchPortState(* SwitchGetPortState)(NetInterface *interface, uint8_t port)
Definition: nic.h:216
@ NIC_LINK_SPEED_100MBPS
Definition: nic.h:110
SpiSetMode setMode
Definition: nic.h:366
void(* UartEnableIrq)(void)
Definition: nic.h:266
SwitchEnableMldSnooping enableMldSnooping
Definition: nic.h:335
ExtIntDisableIrq disableIrq
Definition: nic.h:395
PhyEnableIrq enableIrq
Definition: nic.h:309
uint16_t nicGetVlanId(NetInterface *interface)
Retrieve VLAN identifier.
Definition: nic.c:144
error_t(* SwitchDeleteFdbEntry)(NetInterface *interface, const SwitchFdbEntry *entry)
Definition: nic.h:233
@ NIC_TYPE_6LOWPAN
6LoWPAN interface
Definition: nic.h:85
unsigned int uint_t
Definition: compiler_port.h:45
TCP/IP stack core.
@ NIC_LINK_STATE_AUTO
Definition: nic.h:98
uint32_t(* SwitchGetLinkSpeed)(NetInterface *interface, uint8_t port)
Definition: nic.h:208
NIC driver.
Definition: nic.h:281
void(* NicTick)(NetInterface *interface)
Definition: nic.h:170
uint8_t nicGetSwitchPort(NetInterface *interface)
Retrieve switch port identifier.
Definition: nic.c:113
void(* SwitchSetPortState)(NetInterface *interface, uint8_t port, SwitchPortState state)
Definition: nic.h:213
error_t(* PhyInit)(NetInterface *interface)
Definition: nic.h:188
error_t(* SpiSetMode)(uint_t mode)
Definition: nic.h:258
SwitchGetFdbEntry getStaticFdbEntry
Definition: nic.h:339
void(* SwitchEnableIrq)(NetInterface *interface)
Definition: nic.h:197
Forwarding database entry.
Definition: nic.h:147
error_t(* NicUpdateMacAddrFilter)(NetInterface *interface)
Definition: nic.h:178
SmiReadPhyReg readPhyReg
Definition: nic.h:355
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83