#include "nip_init.h"
#include "mem.h"
#include "os_core.h"
Go to the source code of this file.
Data Structures | |
union | nip_net_if_trans_params_t |
struct | nip_net_if_trans_flags_t |
flags to define transmission behavior. More... | |
struct | nip_net_if_trans_t |
Network Interface transmission. More... | |
struct | nip_net_if_stats_t |
Network Interface statistics. More... | |
struct | nip_phy_if_t |
Physical layer driver interface. More... | |
struct | nip_if_ip_conf |
Network Interface IP configuration. More... | |
struct | nip_net_if |
Network Interface. More... | |
Defines | |
#define | NIP_NET_IF_COUNT 1 |
Define number of Network Interfaces. | |
#define | NIP_NET_IF_TRANS_COUNT 2 |
Define maximum number of queued transmissions per interface Defaults to 2. | |
#define | NIP_NET_MAX_TRANSMISSIONS NIP_NET_IF_TRANS_COUNT |
#define | NIP_MAX_HW_ADDR_SIZE 6 |
Define maximum hardware address size. | |
#define | NIP_MAX_NET_ADDR_SIZE 4 |
Define maximum network address size. | |
#define | NIP_NET_LOOPBACK_ENABLE 1 |
Enable local loopback of network packages. | |
#define | NIP_NET_NULL_TRANSMISSION NIP_NET_MAX_TRANSMISSIONS |
to be used as NULL indicator on transmission ids | |
#define | NIP_NET_NO_IF 0xFF |
#define | NIP_IP_ADDR(if_id) nip_net_if_list[if_id].ip_conf.addr |
Physical Interface Flags | |
Interface flags (IFF) are used to influence the behavior of network interfaces.
| |
#define | NIP_PHY_IFF_UP 0x01 |
Interface is active and ready to transfer packets. | |
#define | NIP_PHY_IFF_BROADCAST 0x02 |
Interface allows broadasting. | |
#define | NIP_PHY_IFF_MULTICAST 0x04 |
Interface allows multicasting. | |
#define | NIP_PHY_IFF_NOARP 0x08 |
Interface does not use ARP. | |
#define | NIP_PHY_IFF_LOOPBACK 0x10 |
Interface does local loopback. | |
#define | NIP_PHY_IFF_CNT_OVW 0x20 |
Interface should count receive buffer overruns. | |
#define | NIP_PHY_IFF_CNT_RXE 0x40 |
Interface should count receive errors. | |
#define | NIP_PHY_IFF_CNT_TXE 0x80 |
Interface should count transmit errors. | |
Macros for Interface statistics | |
#define | NIP_PHY_LOG_OVW(net_if_ptr) |
Macro to count receive buffer overruns. | |
#define | NIP_PHY_LOG_RXE(net_if_ptr) |
Macro to count receive errors. | |
#define | NIP_PHY_LOG_TXE(net_if_ptr) |
Macro to count transmit errors. | |
Typedefs | |
typedef uint8_t | nip_net_trans_id_t |
typedef uint8_t | nip_net_if_id_t |
typedef uint8_t | nip_phy_if_flags_t |
Type to be used when referencing IFFs. | |
typedef uint16_t | nip_net_stats_cnt_t |
typedef struct nip_if_ip_conf | nip_if_ip_conf_t |
typedef struct nip_net_if | nip_net_if_t |
Enumerations | |
enum | nip_net_trans_status_t { NIP_NET_IF_IDLE, NIP_NET_IF_RECEIVING, NIP_NET_IF_ROUTE, NIP_NET_IF_ROUTING, NIP_NET_IF_ROUTED, NIP_NET_IF_RESOLV_ADDR, NIP_NET_IF_RTS, NIP_NET_IF_SENDING, NIP_NET_IF_SEND_HNF, NIP_NET_IF_SEND_NRT, NIP_NET_IF_DONE } |
Network Interface status. More... | |
enum | nip_phy_if_type_t { NIP_PHY_IF_OTHER, NIP_PHY_IF_ETH = 1 } |
Physical layer interface types. More... | |
enum | nip_if_ip_conf_stat_t { NIP_IP_CONF_STAT_UNCONFIGURED = 0, NIP_IP_CONF_STAT_CONFIGURED } |
Functions | |
nip_net_if_id_t | nip_net_if_create (nip_phy_if_type_t type) |
void | nip_net_if_free (nip_net_if_id_t id) |
nip_success_t | nip_set_if_flags (nip_net_if_id_t id, nip_phy_if_flags_t flags) |
nip_net_if_t * | nip_net_if_ptr (nip_net_if_id_t) |
nip_success_t | nip_net_if_up (nip_net_if_id_t) |
nip_success_t | nip_net_if_down (nip_net_if_id_t) |
void | nip_reset_trans (nip_net_if_trans_t *trans) |
Variables | |
nip_net_if_t | nip_net_if_list [] |
nip_net_if_trans_t | nip_net_trans_list [] |
Definition in file net_if.h.
#define NIP_IP_ADDR | ( | if_id | ) | nip_net_if_list[if_id].ip_conf.addr |
Definition at line 405 of file net_if.h.
Referenced by nip_mdns_disp_check(), nip_mdns_init(), and nip_mdns_register_hostname().
#define NIP_MAX_HW_ADDR_SIZE 6 |
#define NIP_MAX_NET_ADDR_SIZE 4 |
#define NIP_NET_IF_COUNT 1 |
Define number of Network Interfaces.
Defaults to 1.
Definition at line 41 of file net_if.h.
Referenced by nip_init().
#define NIP_NET_IF_TRANS_COUNT 2 |
#define NIP_NET_LOOPBACK_ENABLE 1 |
#define NIP_NET_NO_IF 0xFF |
Definition at line 84 of file net_if.h.
Referenced by init_networking(), nip_init(), nip_mdns_init(), nip_mdns_interface_down(), nip_tcp_disp_receive(), and nip_tcp_disp_send().
#define NIP_NET_NULL_TRANSMISSION NIP_NET_MAX_TRANSMISSIONS |
#define NIP_PHY_IFF_BROADCAST 0x02 |
Interface allows broadasting.
Definition at line 102 of file net_if.h.
Referenced by init_networking().
#define NIP_PHY_IFF_CNT_OVW 0x20 |
#define NIP_PHY_IFF_CNT_RXE 0x40 |
#define NIP_PHY_IFF_CNT_TXE 0x80 |
#define NIP_PHY_IFF_LOOPBACK 0x10 |
#define NIP_PHY_IFF_MULTICAST 0x04 |
Interface allows multicasting.
Definition at line 103 of file net_if.h.
Referenced by init_networking().
#define NIP_PHY_IFF_NOARP 0x08 |
#define NIP_PHY_IFF_UP 0x01 |
#define NIP_PHY_LOG_OVW | ( | net_if_ptr | ) |
#define NIP_PHY_LOG_RXE | ( | net_if_ptr | ) |
#define NIP_PHY_LOG_TXE | ( | net_if_ptr | ) |
typedef struct nip_if_ip_conf nip_if_ip_conf_t |
typedef uint8_t nip_net_if_id_t |
typedef struct nip_net_if nip_net_if_t |
typedef uint16_t nip_net_stats_cnt_t |
typedef uint8_t nip_net_trans_id_t |
typedef uint8_t nip_phy_if_flags_t |
Network Interface status.
enum nip_phy_if_type_t |
nip_net_if_id_t nip_net_if_create | ( | nip_phy_if_type_t | type | ) |
nip_success_t nip_net_if_down | ( | nip_net_if_id_t | ) |
void nip_net_if_free | ( | nip_net_if_id_t | id | ) |
nip_net_if_t* nip_net_if_ptr | ( | nip_net_if_id_t | ) |
nip_success_t nip_net_if_up | ( | nip_net_if_id_t | ) |
void nip_reset_trans | ( | nip_net_if_trans_t * | trans | ) |
Referenced by nip_tcp_disp_receive(), nip_tcp_disp_send(), and nip_udp_disp_receive().
nip_success_t nip_set_if_flags | ( | nip_net_if_id_t | id, | |
nip_phy_if_flags_t | flags | |||
) |
Referenced by nip_dhcp_disp_check(), and nip_mdns_register_hostname().