nip_init.h File Reference

#include "nip_types.h"

Include dependency graph for nip_init.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define QMAKESTR(s)   #s
#define MAKESTR(s)   QMAKESTR(s)
Architecture
#define NIP_ARCH   avr
 define what architecture the NIP network stack will be compiled for.
#define NIP_ARCH_PATH   arch/NIP_ARCH
 path for architecture-dependent files.
#define NIP_ARCH_FILE(file)   MAKESTR(NIP_ARCH_PATH/file)
 Build filename for includes depending on the architecture.
nIP Modules
#define NIP_ICMP_ENABLE   1
#define NIP_UDP_ENABLE   1
#define NIP_TCP_ENABLE   0
#define NIP_DHCP_ENABLE   1
#define NIP_AUTOIP_ENABLE   1
#define NIP_MULTICAST_ENABLE   1
#define NIP_IGMP_ENABLE   0
#define NIP_MDNS_ENABLE   1
Network Interface Configuration
#define NIP_NET_IF_COUNT   1
 Define Number of network interfaces.
#define NIP_NET_RX_TRANS_COUNT   2
 Define maximum number of queued transmissions per interface.
#define NIP_NET_TX_TRANS_COUNT   2
 Define maximum number transmissions in global send queue.
#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.
Network Interface Statistics
#define NIP_NET_IF_CNT_OVERRUN
 count network interface receive buffer overruns
#define NIP_NET_IF_CNT_RXE
 count receive errors
#define NIP_NET_IF_CNT_TXE
 count transmit errors
#define NIP_NET_IF_CNT_DISCARDED
 count discarded packets
#define NIP_NET_IF_CNT_RECEIVED
 count received packets
Transport Layer Configuration
#define NIP_UDP_USE_FIXED_SOCKETS   1
 Use fixed socket array (static allocation of memory for fixed numer of sockets) or use dynamic array of sockets with at most NIP_UDP_MAX_SOCKETS sockets.
#define NIP_UDP_FIXED_SOCKETS   4
 Fixed number of UDP sockets to be used for fixed socket configuration.
#define NIP_UDP_PACKET_QUEUE_SIZE   4
 Fixed size of UDP queue for incoming packets.
Memory management
#define NIP_MEM_MAX_BLOCKS   255
 Define maximum number of memory blocks.
#define NIP_MEM_DYNAMIC_SIZE   600
 Number of bytes reserved for dynamic buffer management.
#define NIP_MEM_DEBUG   1
 enable additional sanity check which may be useful points to halt the debugger at.

Functions

void nip_init (void)
 Initialize NIP Internetstack.


Define Documentation

#define MAKESTR (  )     QMAKESTR(s)

Definition at line 37 of file nip_init.h.

#define NIP_ARCH   avr

define what architecture the NIP network stack will be compiled for.

The architecture has to match a directory name in the `'arch'' directory.

Definition at line 44 of file nip_init.h.

#define NIP_ARCH_FILE ( file   )     MAKESTR(NIP_ARCH_PATH/file)

Build filename for includes depending on the architecture.

Definition at line 50 of file nip_init.h.

#define NIP_ARCH_PATH   arch/NIP_ARCH

path for architecture-dependent files.

Definition at line 47 of file nip_init.h.

#define NIP_AUTOIP_ENABLE   1

Definition at line 61 of file nip_init.h.

Referenced by nip_arp_fill_defaults_and_send(), and nip_ip_route().

#define NIP_DHCP_ENABLE   1

Definition at line 60 of file nip_init.h.

#define NIP_ICMP_ENABLE   1

Definition at line 57 of file nip_init.h.

#define NIP_IGMP_ENABLE   0

Definition at line 63 of file nip_init.h.

#define NIP_MAX_HW_ADDR_SIZE   6

Define maximum hardware address size.

Defaults to 6 for ethernet addresses.

Definition at line 81 of file nip_init.h.

#define NIP_MAX_NET_ADDR_SIZE   4

Define maximum network address size.

Defaults to 4 for ip addressing.

Definition at line 84 of file nip_init.h.

#define NIP_MDNS_ENABLE   1

Definition at line 64 of file nip_init.h.

#define NIP_MEM_DEBUG   1

enable additional sanity check which may be useful points to halt the debugger at.

Check for DEBUG comments in nip_mem.c.

Definition at line 152 of file nip_init.h.

#define NIP_MEM_DYNAMIC_SIZE   600

Number of bytes reserved for dynamic buffer management.

Note:
Not all of the reservied memory will actually be available for allocation, as some of it will be spent on management information.

Definition at line 146 of file nip_init.h.

Referenced by nip_mem_alloc(), nip_mem_defrag(), nip_mem_init(), and nip_mem_locate_block().

#define NIP_MEM_MAX_BLOCKS   255

Define maximum number of memory blocks.

Note:
Any number larger than 255 will cause memory addresses to be larger than 8 Bit, which may be disadvantagous on 8-bit architectures.

Definition at line 140 of file nip_init.h.

Referenced by nip_mem_alloc().

#define NIP_MULTICAST_ENABLE   1

Definition at line 62 of file nip_init.h.

#define NIP_NET_IF_CNT_DISCARDED

count discarded packets

Definition at line 104 of file nip_init.h.

#define NIP_NET_IF_CNT_OVERRUN

count network interface receive buffer overruns

Definition at line 95 of file nip_init.h.

#define NIP_NET_IF_CNT_RECEIVED

count received packets

Definition at line 107 of file nip_init.h.

#define NIP_NET_IF_CNT_RXE

count receive errors

Definition at line 98 of file nip_init.h.

#define NIP_NET_IF_CNT_TXE

count transmit errors

Definition at line 101 of file nip_init.h.

#define NIP_NET_IF_COUNT   1

Define Number of network interfaces.

Definition at line 72 of file nip_init.h.

#define NIP_NET_LOOPBACK_ENABLE   1

Enable local loopback of network packages.

Definition at line 87 of file nip_init.h.

#define NIP_NET_RX_TRANS_COUNT   2

Define maximum number of queued transmissions per interface.

Defaults to 2.

Definition at line 75 of file nip_init.h.

#define NIP_NET_TX_TRANS_COUNT   2

Define maximum number transmissions in global send queue.

Defaults to 2.

Definition at line 78 of file nip_init.h.

#define NIP_TCP_ENABLE   0

Definition at line 59 of file nip_init.h.

#define NIP_UDP_ENABLE   1

Definition at line 58 of file nip_init.h.

#define NIP_UDP_FIXED_SOCKETS   4

Fixed number of UDP sockets to be used for fixed socket configuration.

Definition at line 124 of file nip_init.h.

#define NIP_UDP_PACKET_QUEUE_SIZE   4

Fixed size of UDP queue for incoming packets.

Definition at line 127 of file nip_init.h.

#define NIP_UDP_USE_FIXED_SOCKETS   1

Use fixed socket array (static allocation of memory for fixed numer of sockets) or use dynamic array of sockets with at most NIP_UDP_MAX_SOCKETS sockets.

Definition at line 121 of file nip_init.h.

#define QMAKESTR (  )     #s

Definition at line 36 of file nip_init.h.


Function Documentation

void nip_init ( void   ) 

Initialize NIP Internetstack.

Todo:
check if doing interface transmission memory allocation at this point makes more sense than doing it whenever the transmission is used. PRO: no need to initialize before usage -> saves program memory CON: each allocated block eats up sizeof( nip_mem_block_t ) even when not in use. There should be a Switch to decide which way to go.

Definition at line 44 of file nip_init.c.

Referenced by init_networking(), and main().

Here is the caller graph for this function:


Generated on Thu Feb 14 12:55:32 2008 for NIP by  doxygen 1.5.3