36#define NetTxAncillary struct _NetTxAncillary
40#define NetRxAncillary struct _NetRxAncillary
48#define NET_RAND_GET_BIT(s, n) ((s[(n - 1) / 8] >> ((n - 1) % 8)) & 1)
51#define NET_RAND_STATE_SET_BIT(s, n, v) s[(n - 1) / 8] = \
52 (s[(n - 1) / 8] & ~(1 << ((n - 1) % 8))) | (v) << ((n - 1) % 8)
65 bool_t linkState,
void *param);
74 NetInterface *interface;
121#if (ETH_SUPPORT == ENABLED)
125#if (ETH_VLAN_SUPPORT == ENABLED)
129#if (ETH_VMAN_SUPPORT == ENABLED)
133#if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
138#if (ETH_TIMESTAMP_SUPPORT == ENABLED)
152#if (ETH_SUPPORT == ENABLED)
157#if (ETH_PORT_TAGGING_SUPPORT == ENABLED)
160#if (ETH_TIMESTAMP_SUPPORT == ENABLED)
190extern const NetTxAncillary NET_DEFAULT_TX_ANCILLARY;
191extern const NetRxAncillary NET_DEFAULT_RX_ANCILLARY;
194error_t netAttachLinkChangeCallback(NetInterface *interface,
197error_t netDetachLinkChangeCallback(NetInterface *interface,
200void netProcessLinkChange(NetInterface *interface);
211bool_t netTimerRunning(
NetTimer *timer);
212bool_t netTimerExpired(
NetTimer *timer);
214void netInitRand(
void);
215uint32_t netGenerateRand(
void);
216uint32_t netGenerateRandRange(uint32_t min, uint32_t max);
217void netGenerateRandData(uint8_t *data,
size_t length);
error_t
Error codes.
Definition error.h:43
IPv4 and IPv6 common routines.
void(* NetLinkChangeCallback)(NetInterface *interface, bool_t linkState, void *param)
Link change callback.
Definition net_misc.h:64
void(* NetTimerCallback)(void *param)
Timer callback.
Definition net_misc.h:84
uint32_t systime_t
System time.
Definition os_port_none.h:90
Link change callback entry.
Definition net_misc.h:73
Pseudo-random number generator state.
Definition net_misc.h:183
Timer callback entry.
Definition net_misc.h:92
Timer.
Definition net_misc.h:171
Timestamp.
Definition net_misc.h:105
Additional options passed to the stack (RX path)
Definition net_misc.h:149
MacAddr destMacAddr
Destination MAC address.
Definition net_misc.h:154
NetTimestamp timestamp
Captured time stamp.
Definition net_misc.h:161
uint8_t port
Ingress port identifier.
Definition net_misc.h:158
uint8_t tos
Type-of-service value.
Definition net_misc.h:151
uint16_t ethType
Ethernet type field.
Definition net_misc.h:155
uint8_t ttl
Time-to-live value.
Definition net_misc.h:150
MacAddr srcMacAddr
Source MAC address.
Definition net_misc.h:153
Additional options passed to the stack (TX path)
Definition net_misc.h:116
bool_t dontRoute
Do not send the packet via a router.
Definition net_misc.h:119
MacAddr destMacAddr
Destination MAC address.
Definition net_misc.h:123
uint8_t port
Egress port identifier.
Definition net_misc.h:134
int8_t vmanDei
Drop eligible indicator.
Definition net_misc.h:131
uint8_t tos
Type-of-service value.
Definition net_misc.h:118
uint32_t ports
Egress port map.
Definition net_misc.h:135
uint8_t ttl
Time-to-live value.
Definition net_misc.h:117
int8_t vmanPcp
VMAN priority (802.1ad)
Definition net_misc.h:130
int8_t vlanPcp
VLAN priority (802.1Q)
Definition net_misc.h:126
int32_t timestampId
Unique identifier for hardware time stamping.
Definition net_misc.h:139
bool_t routerAlert
Add an IP Router Alert option.
Definition net_misc.h:120
MacAddr srcMacAddr
Source MAC address.
Definition net_misc.h:122
int8_t vlanDei
Drop eligible indicator.
Definition net_misc.h:127