weAutSys' (low level) system calls, services and types for LAN / Ethernet communication
This file contains the definitions for weAutSys' (low level) system calls, services and types for LAN / Ethernet communication. They imply an ENC28J60 used for Ethernet driver anduIP used as TCP/IP stack. To change that this file and many other sources would have to be touched (and not just configuration macros).
This is system software and must not be modified for user or application programs.
Please find detailed description of the variables, functions etc. in the modules Ethernet communications and LAN communications.
This file is part of weAutSys <weinert-automation.de>
Copyright © 2012 Albrecht Weinert, Bochum
Data Structures | |
struct | ipConf_t |
The IP configuration. More... | |
Defines | |
#define | BUF2EH |
The uip buffer cast to Ethernet header. | |
#define | DHCP_MSK |
Mask for DHCP (use / set by) bit. | |
#define | DNS1_MSK |
Mask for DNS server 1 set bit. | |
#define | DNS2_MSK |
Mask for DNS server 2 set bit. | |
#define | DNS_CLIENT_MSK |
Mask for be DNS client bit. | |
#define | DNS_MSK |
Mask for DNS servers (set / use if set) bits. | |
#define | ECHO_PORT 7 |
The well known Echo port. | |
#define | ENC_HWP |
Mask for the ENC HW problem bit in networkNotReady. | |
#define | ENC_MSK |
Mask for the ENC bits in networkNotReady. | |
#define | ENC_NRD |
Mask for the ENC not ready bit in networkNotReady. | |
#define | ENC_PWS |
Mask for the ENC powersave bit in networkNotReady. | |
#define | IP_ADD(addr0, addr1, addr2, addr3) |
Initializer of an IP (V4) address from four byte values. | |
#define | IPBUF |
The uip buffer cast to Ethernet IP header. | |
#define | LNC_IDN |
Mask for the link is down (at last status request) in networkNotReady. | |
#define | LNC_WDN |
Mask for the link was down (before last status request) in networkNotReady. | |
#define | MODBUS_PORT 502 |
The well known Modbus port. | |
#define | NTP1_MSK |
Mask for NTP server 1 set bit. | |
#define | NTP2_MSK |
Mask for NTP server 2 set bit. | |
#define | NTP_CLIENT_MSK |
Mask for be NTP client bit. | |
#define | NTP_MSK |
Mask for NTP server bits. | |
#define | NTP_SERVERT_MSK |
Mask for be NTP server bit. | |
#define | STC_MSK |
Mask for the stack bits in networkNotReady. | |
#define | STC_NST |
Mask for the stack' IP not set bit in networkNotReady. | |
#define | TELNET_PORT 23 |
The well known Telnet port. | |
Typedefs | |
typedef struct uip_eth_addr | eth_addr_t |
Representation of a 48-bit Ethernet address / MAC address. | |
Functions | |
uint16_t | deviceDriverPoll (void) |
Hand over received packages. | |
void | deviceDriverSend (void) |
Send the actual uIP buffer. | |
char * | formIpAdd (char *s, uip_ipaddr_t ipAddr) |
Format an ipV4 Ethernet address. | |
char * | formIpConf (char *s, ipConf_t *ipConf) |
Format an IP configuration (w/o DHCP) | |
char * | formIpConfDHCP (char *s, ipConf_t *ipConf) |
Format an IP configuration, the DHCP part. | |
char * | formMacAdd (char *s, eth_addr_t *mac) |
Format a MAC address. | |
struct uip_eth_addr * | getMACforIPaddr (uip_ipaddr_t ipAddr) |
Get the MAC address for an IP address. | |
void | lanComStdInit (void) |
Initialise the LAN communication (standard way) | |
uint8_t | linkState (void) |
Check the link state. | |
void | networkInit (void) |
Initialise the network stack. | |
void | networkPolling (void) |
Receive and then perhaps send the actual uIP buffer. | |
ptfnct_t | outEncLanInfoThreadF (hierThr_data_t *threadD, FILE *toStream) |
Output Ethernet and driver (ENC28J60) state info, the thread function. | |
uint8_t | parseIpAdd (uip_ipaddr_t ipAddr, char s[], uint8_t si) |
Parse an ipV4 Ethernet address. | |
uint8_t | parseMACadd (eth_addr_t *macAddr, char s[], uint8_t si) |
Parse a MAC address. | |
void | setMACadd (eth_addr_t *mac) |
Set the IP stack's MAC address. | |
void | setMACaddP (const eth_addr_t *mac) |
Set the stack's MAC address. | |
void | udpAppcall (void) |
The uIP udp event function for the application software. | |
void | uipAppcall (void) |
The uIP event function for the application software. | |
void | uipGetAddresses (ipConf_t *ipConf) |
Get the addresses from the uIP stack. | |
void | uipSetAddresses (ipConf_t *ipConf) |
Set the addresses in the uIP stack. | |
Variables | |
uint8_t | arpTickPeriod |
The period of the ARP timeout tick in seconds. | |
uint8_t | arpTimeOut |
The ARP timeout counter in seconds. | |
ipConf_t | curIpConf |
The actual IP configuration. | |
uint8_t | networkNotReady |
Network not ready. |