net_misc.c File Reference

Helper functions for TCP/IP stack. More...

#include "core/net.h"
#include "core/net_misc.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/igmp.h"
#include "ipv6/ipv6.h"
#include "ipv6/ipv6_routing.h"
#include "ipv6/mld.h"
#include "ipv6/ndp.h"
#include "ipv6/ndp_router_adv.h"
#include "dhcp/dhcp_client.h"
#include "dhcp/dhcp_server.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.h"
#include "netbios/nbns_client.h"
#include "netbios/nbns_responder.h"
#include "netbios/nbns_common.h"
#include "llmnr/llmnr_responder.h"
#include "mibs/mib2_module.h"
#include "mibs/if_mib_module.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

error_t netAttachLinkChangeCallback (NetInterface *interface, NetLinkChangeCallback callback, void *param)
 Register link change callback. More...
 
error_t netDetachLinkChangeCallback (NetInterface *interface, NetLinkChangeCallback callback, void *param)
 Unregister link change callback. More...
 
void netProcessLinkChange (NetInterface *interface)
 Process link state change event. More...
 
error_t netAttachTimerCallback (systime_t period, NetTimerCallback callback, void *param)
 Register timer callback. More...
 
error_t netDetachTimerCallback (NetTimerCallback callback, void *param)
 Unregister timer callback. More...
 
void netTick (void)
 Manage TCP/IP timers. More...
 

Variables

const NetTxAncillary NET_DEFAULT_TX_ANCILLARY
 
const NetRxAncillary NET_DEFAULT_RX_ANCILLARY
 

Detailed Description

Helper functions for TCP/IP stack.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2020 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.8

Definition in file net_misc.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 32 of file net_misc.c.

Function Documentation

◆ netAttachLinkChangeCallback()

error_t netAttachLinkChangeCallback ( NetInterface interface,
NetLinkChangeCallback  callback,
void *  param 
)

Register link change callback.

Parameters
[in]interfaceUnderlying network interface
[in]callbackCallback function to be called when the link state changed
[in]paramCallback function parameter
Returns
Error code

Definition at line 120 of file net_misc.c.

◆ netAttachTimerCallback()

error_t netAttachTimerCallback ( systime_t  period,
NetTimerCallback  callback,
void *  param 
)

Register timer callback.

Parameters
[in]periodTimer reload value, in milliseconds
[in]callbackCallback function to be called when the timer expires
[in]paramCallback function parameter
Returns
Error code

Definition at line 337 of file net_misc.c.

◆ netDetachLinkChangeCallback()

error_t netDetachLinkChangeCallback ( NetInterface interface,
NetLinkChangeCallback  callback,
void *  param 
)

Unregister link change callback.

Parameters
[in]interfaceUnderlying network interface
[in]callbackCallback function to be unregistered
[in]paramCallback function parameter
Returns
Error code

Definition at line 158 of file net_misc.c.

◆ netDetachTimerCallback()

error_t netDetachTimerCallback ( NetTimerCallback  callback,
void *  param 
)

Unregister timer callback.

Parameters
[in]callbackCallback function to be unregistered
[in]paramCallback function parameter
Returns
Error code

Definition at line 375 of file net_misc.c.

◆ netProcessLinkChange()

void netProcessLinkChange ( NetInterface interface)

Process link state change event.

Parameters
[in]interfaceUnderlying network interface

Definition at line 191 of file net_misc.c.

◆ netTick()

void netTick ( void  )

Manage TCP/IP timers.

Definition at line 406 of file net_misc.c.

Variable Documentation

◆ NET_DEFAULT_RX_ANCILLARY

const NetRxAncillary NET_DEFAULT_RX_ANCILLARY
Initial value:
=
{
0,
{0},
{0},
0,
{0},
}

Definition at line 96 of file net_misc.c.

◆ NET_DEFAULT_TX_ANCILLARY

const NetTxAncillary NET_DEFAULT_TX_ANCILLARY
Initial value:
=
{
0,
0,
{0},
{0},
-1,
-1,
-1,
-1,
0,
-1,
}

Definition at line 68 of file net_misc.c.

#define FALSE
Definition: os_port.h:46