#include <inttypes.h>
#include "net/buffers.h"
Go to the source code of this file.
Data Structures | |
struct | net_addr_t |
Network address structure. More... | |
struct | net_ind_t |
Network layer indication information. More... | |
struct | net_requ_t |
Network layer request block. More... | |
Defines | |
#define | NAF_LOGIC 0x00 |
Logic address. | |
#define | NAF_GROUP 0x01 |
Group address. | |
#define | NAF_PHYSIC 0x02 |
Physical address. | |
#define | NAF_BROADCAST 0x03 |
Broadcast. | |
#define | AT_LOGIC 0x00 |
Node's logical address. | |
#define | AT_PHYSIC 0x01 |
Node's physical address. | |
#define | AT_GROUP0 0x02 |
#define | AT_GROUP1 0x03 |
#define | AT_GROUP2 0x04 |
#define | AT_GROUP3 0x05 |
#define | AT_GROUP4 0x06 |
#define | AT_GROUP5 0x07 |
#define | AT_GROUP6 0x08 |
#define | AT_GROUP7 0x09 |
#define | NPDU_SINGLE 0x00 |
Single message. | |
#define | NPDU_TRANSACTION 0x01 |
Transaction. | |
#define | NPDU_SESSION 0x02 |
Session. | |
Functions | |
uint8_t | net_requ (net_buf_t *buf, const net_requ_t *requ) |
Send a packet. | |
uint8_t | net_compare_src_addr (const net_addr_t *addr1, const net_addr_t *addr2) |
Compares two source network addresses. | |
uint8_t | net_get_local_member_id (uint8_t group) |
Returns local member number for a group. | |
uint8_t | net_clear_to_send (void) |
Check if another packet can be scheduled for transmission. | |
void | net_set_logic_addr (uint16_t addr) |
Set logic address. | |
uint16_t | net_get_logic_addr (void) |
Get logic address. | |
void | net_set_group_addr (uint8_t group, uint16_t addr) |
Set address of a group. | |
uint16_t | net_get_group_addr (uint8_t group) |
Get group address. |
Constants and definitions of the network layer.
Definition in file network.h.
|
Check if another packet can be scheduled for transmission.
Definition at line 238 of file network.c. References lnk_clear_to_send(). Referenced by tsp_process(). |
|
Compares two source network addresses. Since source and destination addresses differ in the group address format this function only compares two SOURCE network addresses.
Definition at line 210 of file network.c. References net_addr_t::addr, and net_addr_t::format. |
|
Get group address.
|
|
Returns local member number for a group.
Definition at line 227 of file network.c. Referenced by net_ind(). |
|
Get logic address.
|
|
Send a packet. This functions adds the network layer specific header and passes the packet to the link layer. Also checks if it should be delivered locally.
Definition at line 162 of file network.c. References net_addr_t::addr, AT_LOGIC, AT_PHYSIC, net_requ_t::backlog, net_requ_t::dest, net_addr_t::format, lnk_clear_to_send(), lnk_ind(), lnk_requ(), NAF_GROUP, NAF_LOGIC, NAF_PHYSIC, net_con(), net_requ_t::pdu, and net_requ_t::src. Referenced by tsp_process(). |
|
Set address of a group.
|
|
Set logic address.
|