TCP/IP stack core. More...
#include "core/net.h"
#include "core/socket.h"
#include "core/raw_socket.h"
#include "core/tcp_timer.h"
#include "core/tcp_misc.h"
#include "core/ethernet.h"
#include "ipv4/arp.h"
#include "ipv4/ipv4.h"
#include "ipv4/ipv4_routing.h"
#include "ipv4/auto_ip_misc.h"
#include "igmp/igmp_host.h"
#include "igmp/igmp_router.h"
#include "igmp/igmp_snooping.h"
#include "ipv6/ipv6.h"
#include "ipv6/ipv6_routing.h"
#include "ipv6/ndp.h"
#include "ipv6/ndp_router_adv.h"
#include "mld/mld_node.h"
#include "dhcp/dhcp_client_misc.h"
#include "dhcp/dhcp_server_misc.h"
#include "dhcpv6/dhcpv6_client_misc.h"
#include "dns/dns_cache.h"
#include "dns/dns_client.h"
#include "mdns/mdns_client.h"
#include "mdns/mdns_responder.h"
#include "mdns/mdns_common.h"
#include "dns_sd/dns_sd_responder.h"
#include "netbios/nbns_client.h"
#include "netbios/nbns_responder.h"
#include "netbios/nbns_common.h"
#include "llmnr/llmnr_responder.h"
#include "str.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
void | netGetDefaultSettings (NetSettings *settings) |
Initialize settings with default values. More... | |
error_t | netInit (void) |
Initialize TCP/IP stack (deprecated) More... | |
error_t | netInitEx (NetContext *context, const NetSettings *settings) |
Initialize TCP/IP stack. More... | |
error_t | netStart (NetContext *context) |
Start TCP/IP stack. More... | |
error_t | netSeedRand (const uint8_t *seed, size_t length) |
Seed the pseudo-random number generator. More... | |
uint32_t | netGetRand (void) |
Generate a random 32-bit value. More... | |
uint32_t | netGetRandRange (uint32_t min, uint32_t max) |
Generate a random value in the specified range. More... | |
void | netGetRandData (uint8_t *data, size_t length) |
Get a string of random data. More... | |
NetInterface * | netGetDefaultInterface (void) |
Get default network interface. More... | |
error_t | netSetMacAddr (NetInterface *interface, const MacAddr *macAddr) |
Set MAC address. More... | |
error_t | netGetMacAddr (NetInterface *interface, MacAddr *macAddr) |
Retrieve MAC address. More... | |
error_t | netSetEui64 (NetInterface *interface, const Eui64 *eui64) |
Set EUI-64 interface identifier. More... | |
error_t | netGetEui64 (NetInterface *interface, Eui64 *eui64) |
Retrieve EUI-64 interface identifier. More... | |
error_t | netSetInterfaceId (NetInterface *interface, uint32_t id) |
Set interface identifier. More... | |
error_t | netSetInterfaceName (NetInterface *interface, const char_t *name) |
Set interface name. More... | |
error_t | netSetHostname (NetInterface *interface, const char_t *name) |
Set host name. More... | |
error_t | netSetVlanId (NetInterface *interface, uint16_t vlanId) |
Specify VLAN identifier (802.1Q) More... | |
error_t | netSetVmanId (NetInterface *interface, uint16_t vmanId) |
Specify VMAN identifier (802.1ad) More... | |
error_t | netSetParentInterface (NetInterface *interface, NetInterface *physicalInterface) |
Attach a virtual interface to a given physical interface. More... | |
error_t | netSetDriver (NetInterface *interface, const NicDriver *driver) |
Set Ethernet MAC driver. More... | |
error_t | netSetPhyDriver (NetInterface *interface, const PhyDriver *driver) |
Set Ethernet PHY driver. More... | |
error_t | netSetPhyAddr (NetInterface *interface, uint8_t phyAddr) |
Specify Ethernet PHY address. More... | |
error_t | netSetSwitchDriver (NetInterface *interface, const SwitchDriver *driver) |
Set Ethernet switch driver. More... | |
error_t | netSetSwitchPort (NetInterface *interface, uint8_t port) |
Specify switch port. More... | |
error_t | netSetSmiDriver (NetInterface *interface, const SmiDriver *driver) |
Set SMI driver. More... | |
error_t | netSetSpiDriver (NetInterface *interface, const SpiDriver *driver) |
Set SPI driver. More... | |
error_t | netSetUartDriver (NetInterface *interface, const UartDriver *driver) |
Set UART driver. More... | |
error_t | netSetExtIntDriver (NetInterface *interface, const ExtIntDriver *driver) |
Set external interrupt line driver. More... | |
error_t | netSetLinkState (NetInterface *interface, bool_t linkState) |
Set administrative link state. More... | |
bool_t | netGetLinkState (NetInterface *interface) |
Get link state. More... | |
uint_t | netGetLinkSpeed (NetInterface *interface) |
Get link speed. More... | |
NicDuplexMode | netGetDuplexMode (NetInterface *interface) |
Get duplex mode. More... | |
error_t | netEnablePromiscuousMode (NetInterface *interface, bool_t enable) |
Enable promiscuous mode. More... | |
error_t | netConfigInterface (NetInterface *interface) |
Configure network interface. More... | |
error_t | netStartInterface (NetInterface *interface) |
Start network interface. More... | |
error_t | netStopInterface (NetInterface *interface) |
Stop network interface. More... | |
void | netTask (void) |
TCP/IP events handling (deprecated) More... | |
void | netTaskEx (NetContext *context) |
TCP/IP events handling. More... | |
Variables | |
NetContext | netContext |
Detailed Description
TCP/IP stack core.
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 net.c.
Macro Definition Documentation
◆ TRACE_LEVEL
Function Documentation
◆ netConfigInterface()
error_t netConfigInterface | ( | NetInterface * | interface | ) |
◆ netEnablePromiscuousMode()
error_t netEnablePromiscuousMode | ( | NetInterface * | interface, |
bool_t | enable | ||
) |
◆ netGetDefaultInterface()
NetInterface* netGetDefaultInterface | ( | void | ) |
◆ netGetDefaultSettings()
void netGetDefaultSettings | ( | NetSettings * | settings | ) |
◆ netGetDuplexMode()
NicDuplexMode netGetDuplexMode | ( | NetInterface * | interface | ) |
◆ netGetEui64()
error_t netGetEui64 | ( | NetInterface * | interface, |
Eui64 * | eui64 | ||
) |
◆ netGetLinkSpeed()
uint_t netGetLinkSpeed | ( | NetInterface * | interface | ) |
◆ netGetLinkState()
bool_t netGetLinkState | ( | NetInterface * | interface | ) |
◆ netGetMacAddr()
error_t netGetMacAddr | ( | NetInterface * | interface, |
MacAddr * | macAddr | ||
) |
◆ netGetRand()
uint32_t netGetRand | ( | void | ) |
◆ netGetRandData()
void netGetRandData | ( | uint8_t * | data, |
size_t | length | ||
) |
◆ netGetRandRange()
uint32_t netGetRandRange | ( | uint32_t | min, |
uint32_t | max | ||
) |
◆ netInit()
error_t netInit | ( | void | ) |
◆ netInitEx()
error_t netInitEx | ( | NetContext * | context, |
const NetSettings * | settings | ||
) |
◆ netSeedRand()
error_t netSeedRand | ( | const uint8_t * | seed, |
size_t | length | ||
) |
◆ netSetDriver()
error_t netSetDriver | ( | NetInterface * | interface, |
const NicDriver * | driver | ||
) |
◆ netSetEui64()
error_t netSetEui64 | ( | NetInterface * | interface, |
const Eui64 * | eui64 | ||
) |
◆ netSetExtIntDriver()
error_t netSetExtIntDriver | ( | NetInterface * | interface, |
const ExtIntDriver * | driver | ||
) |
◆ netSetHostname()
error_t netSetHostname | ( | NetInterface * | interface, |
const char_t * | name | ||
) |
◆ netSetInterfaceId()
error_t netSetInterfaceId | ( | NetInterface * | interface, |
uint32_t | id | ||
) |
◆ netSetInterfaceName()
error_t netSetInterfaceName | ( | NetInterface * | interface, |
const char_t * | name | ||
) |
◆ netSetLinkState()
error_t netSetLinkState | ( | NetInterface * | interface, |
bool_t | linkState | ||
) |
◆ netSetMacAddr()
error_t netSetMacAddr | ( | NetInterface * | interface, |
const MacAddr * | macAddr | ||
) |
◆ netSetParentInterface()
error_t netSetParentInterface | ( | NetInterface * | interface, |
NetInterface * | physicalInterface | ||
) |
◆ netSetPhyAddr()
error_t netSetPhyAddr | ( | NetInterface * | interface, |
uint8_t | phyAddr | ||
) |
◆ netSetPhyDriver()
error_t netSetPhyDriver | ( | NetInterface * | interface, |
const PhyDriver * | driver | ||
) |
◆ netSetSmiDriver()
error_t netSetSmiDriver | ( | NetInterface * | interface, |
const SmiDriver * | driver | ||
) |
◆ netSetSpiDriver()
error_t netSetSpiDriver | ( | NetInterface * | interface, |
const SpiDriver * | driver | ||
) |
◆ netSetSwitchDriver()
error_t netSetSwitchDriver | ( | NetInterface * | interface, |
const SwitchDriver * | driver | ||
) |
◆ netSetSwitchPort()
error_t netSetSwitchPort | ( | NetInterface * | interface, |
uint8_t | port | ||
) |
◆ netSetUartDriver()
error_t netSetUartDriver | ( | NetInterface * | interface, |
const UartDriver * | driver | ||
) |
◆ netSetVlanId()
error_t netSetVlanId | ( | NetInterface * | interface, |
uint16_t | vlanId | ||
) |
◆ netSetVmanId()
error_t netSetVmanId | ( | NetInterface * | interface, |
uint16_t | vmanId | ||
) |
◆ netStart()
error_t netStart | ( | NetContext * | context | ) |
◆ netStartInterface()
error_t netStartInterface | ( | NetInterface * | interface | ) |
◆ netStopInterface()
error_t netStopInterface | ( | NetInterface * | interface | ) |
◆ netTask()
◆ netTaskEx()
void netTaskEx | ( | NetContext * | context | ) |
Variable Documentation
◆ netContext
NetContext netContext |