#include <stdio.h>
#include <io.h>
#include <arpa/inet.h>
#include <net/route.h>
#include <pro/dhcp.h>
#include <pro/sntp.h>
#include <sys/version.h>
#include <sys/confnet.h>
#include <sys/timer.h>
#include <sys/heap.h>
#include <sys/syslog.h>
#include <dev/board.h>
Go to the source code of this file.
Defines | |
#define | MYMAC 0x00, 0x06, 0x98, 0x00, 0x00, 0x00 |
Default MAC. Used if EEPROM is empty. | |
#define | MYIP "192.168.192.100" |
Default local IP address. Used if EEPROM configuration and DHCP is unavailable. | |
#define | MYMASK "255.255.255.0" |
Default IP mask. Used if EEPROM configuration and DHCP is unavailable. | |
#define | MYGATE "192.168.192.1" |
Default gateway address. Used if EEPROM configuration and DHCP is unavailable. Only required if syslog or time server are located in a different network. | |
#define | MYLOGD "192.168.192.222" |
IP address of the host running a syslog daemon. | |
#define | MYTIMED "130.149.17.21" |
IP address of the host running a time daemon. | |
#define | MYUART DEV_CONSOLE_NAME |
Device name used for UART output. | |
#define | MYBAUD 115200 |
UART baudrate. | |
#define | MYDEV DEV_CONSOLE |
Output device. | |
#define | MYTZ -1 |
Local timezone, -1 for Central Europe. | |
#define | COMPILERNAME "GCC" |
#define | UART_OK 0x0001 |
#define | STDOUT_OK 0x0002 |
#define | STDERR_OK 0x0004 |
#define | BAUDRATE_OK 0x0008 |
#define | LANDEV_OK 0x0010 |
#define | NETIF_OK 0x0020 |
#define | NETROUTE_OK 0x0040 |
#define | TIMED_OK 0x0080 |
Functions | |
int | main (void) |
#define MYMAC 0x00, 0x06, 0x98, 0x00, 0x00, 0x00 |
Default MAC. Used if EEPROM is empty.
Definition at line 68 of file logtime.c.
Referenced by main().
#define MYIP "192.168.192.100" |
Default local IP address. Used if EEPROM configuration and DHCP is unavailable.
Definition at line 72 of file logtime.c.
Referenced by main().
#define MYMASK "255.255.255.0" |
Default IP mask. Used if EEPROM configuration and DHCP is unavailable.
Definition at line 76 of file logtime.c.
Referenced by main().
#define MYGATE "192.168.192.1" |
Default gateway address. Used if EEPROM configuration and DHCP is unavailable. Only required if syslog or time server are located in a different network.
Definition at line 82 of file logtime.c.
Referenced by main().
#define MYLOGD "192.168.192.222" |
IP address of the host running a syslog daemon.
Definition at line 85 of file logtime.c.
Referenced by main().
#define MYTIMED "130.149.17.21" |
#define MYUART DEV_CONSOLE_NAME |
Device name used for UART output.
Definition at line 91 of file logtime.c.
Referenced by main().
#define MYBAUD 115200 |
UART baudrate.
Definition at line 94 of file logtime.c.
Referenced by main().
#define MYDEV DEV_CONSOLE |
Output device.
Definition at line 97 of file logtime.c.
Referenced by main().
#define MYTZ -1 |
#define COMPILERNAME "GCC" |
Definition at line 106 of file logtime.c.
Referenced by main().
#define UART_OK 0x0001 |
Definition at line 110 of file logtime.c.
Referenced by main().
#define STDOUT_OK 0x0002 |
Definition at line 111 of file logtime.c.
Referenced by main().
#define STDERR_OK 0x0004 |
Definition at line 112 of file logtime.c.
Referenced by main().
#define BAUDRATE_OK 0x0008 |
Definition at line 113 of file logtime.c.
Referenced by main().
#define LANDEV_OK 0x0010 |
Definition at line 114 of file logtime.c.
Referenced by main().
#define NETIF_OK 0x0020 |
Definition at line 115 of file logtime.c.
Referenced by main().
#define NETROUTE_OK 0x0040 |
Definition at line 116 of file logtime.c.
Referenced by main().
#define TIMED_OK 0x0080 |
int main | ( | void | ) |
Definition at line 122 of file logtime.c.
References _fileno(), _ioctl(), _timezone, BAUDRATE_OK, _CONFNET::cdn_gateway, _CONFNET::cdn_ip_addr, COMPILERNAME, confnet, DEV_ETHER, freopen(), inet_addr(), inet_ntoa(), LANDEV_OK, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_PERROR, LOG_USER, MYBAUD, MYDEV, MYGATE, MYIP, MYLOGD, MYMAC, MYMASK, MYTIMED, MYTZ, MYUART, NETIF_OK, NETROUTE_OK, NutDhcpIfConfig(), NutHeapAvailable, NutIpRouteAdd(), NutNetIfConfig(), NutRegisterDevice(), NutSleep(), NutSNTPGetTime(), NutVersionString(), openlog(), printf, puts, setlogserver(), stderr, STDERR_OK, stdout, STDOUT_OK, stime(), syslog(), TIMED_OK, UART_OK, and UART_SETSPEED.