Network interface controller abstraction layer. More...
#include "core/net.h"
#include "core/nic.h"
#include "core/ethernet.h"
#include "ipv4/ipv4_multicast.h"
#include "ipv4/ipv4_misc.h"
#include "ipv6/ipv6_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
NetInterface * | nicGetLogicalInterface (NetInterface *interface) |
Retrieve logical interface. More... | |
NetInterface * | nicGetPhysicalInterface (NetInterface *interface) |
Retrieve physical interface. More... | |
uint8_t | nicGetSwitchPort (NetInterface *interface) |
Retrieve switch port identifier. More... | |
uint16_t | nicGetVlanId (NetInterface *interface) |
Retrieve VLAN identifier. More... | |
uint16_t | nicGetVmanId (NetInterface *interface) |
Retrieve VMAN identifier. More... | |
bool_t | nicIsParentInterface (NetInterface *interface, NetInterface *parent) |
Test parent/child relationship between 2 interfaces. More... | |
void | nicTick (NetInterface *interface) |
Network controller timer handler. More... | |
error_t | nicSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
Send a packet to the network controller. More... | |
error_t | nicUpdateMacAddrFilter (NetInterface *interface) |
Configure MAC address filtering. More... | |
void | nicProcessPacket (NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary) |
Handle a packet received by the network controller. More... | |
void | nicNotifyLinkChange (NetInterface *interface) |
Process link state change notification. More... | |
Variables | |
systime_t | nicTickCounter |
Detailed Description
Network interface controller abstraction layer.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file nic.c.
Macro Definition Documentation
◆ TRACE_LEVEL
Function Documentation
◆ nicGetLogicalInterface()
NetInterface* nicGetLogicalInterface | ( | NetInterface * | interface | ) |
◆ nicGetPhysicalInterface()
NetInterface* nicGetPhysicalInterface | ( | NetInterface * | interface | ) |
◆ nicGetSwitchPort()
uint8_t nicGetSwitchPort | ( | NetInterface * | interface | ) |
◆ nicGetVlanId()
uint16_t nicGetVlanId | ( | NetInterface * | interface | ) |
◆ nicGetVmanId()
uint16_t nicGetVmanId | ( | NetInterface * | interface | ) |
◆ nicIsParentInterface()
bool_t nicIsParentInterface | ( | NetInterface * | interface, |
NetInterface * | parent | ||
) |
◆ nicNotifyLinkChange()
void nicNotifyLinkChange | ( | NetInterface * | interface | ) |
◆ nicProcessPacket()
void nicProcessPacket | ( | NetInterface * | interface, |
uint8_t * | packet, | ||
size_t | length, | ||
NetRxAncillary * | ancillary | ||
) |
◆ nicSendPacket()
error_t nicSendPacket | ( | NetInterface * | interface, |
const NetBuffer * | buffer, | ||
size_t | offset, | ||
NetTxAncillary * | ancillary | ||
) |
Send a packet to the network controller.
- Parameters
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
◆ nicTick()
void nicTick | ( | NetInterface * | interface | ) |
◆ nicUpdateMacAddrFilter()
error_t nicUpdateMacAddrFilter | ( | NetInterface * | interface | ) |