source: network-demos/netlink/init.c @ 3ba2f22

4.11network-demos-4-10-branchnetwork-demos-4-6-branchnetwork-demos-4-7-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since 3ba2f22 was 7054195, checked in by Joel Sherrill <joel.sherrill@…>, on 12/14/99 at 13:23:56

Changed CONFIGURATION_MICROSECONDS_PER_TICK definition to a more reasonable
value.

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[3d7557e]1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *
5 *  Don't forget to change the IP addresses
6 */
7
8#include <bsp.h>
9
10#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
11#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
12#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
13
14#define CONFIGURE_EXECUTIVE_RAM_SIZE    (512*1024)
15#define CONFIGURE_MAXIMUM_SEMAPHORES    20
16#define CONFIGURE_MAXIMUM_TASKS         20
17
18#define CONFIGURE_INIT_TASK_STACK_SIZE  (10*1024)
19#define CONFIGURE_INIT_TASK_PRIORITY    120
20#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
21                                           RTEMS_NO_TIMESLICE | \
22                                           RTEMS_NO_ASR | \
23                                           RTEMS_INTERRUPT_LEVEL(0))
24
25#define CONFIGURE_INIT
26
27rtems_task Init(
28  rtems_task_argument argument
29);
30
31/* configuration information */
32
33#include <confdefs.h>
34
35#include <errno.h>
36#include <time.h>
37
38#include <confdefs.h>
39#include <stdio.h>
40#include <rtems/rtems_bsdnet.h>
41#include <ftpd.h>
42
43     
44#include <rtems/error.h>
45#include <rpc/rpc.h>
46#include <netinet/in.h>
47#include <time.h>
48
49#include <arpa/inet.h>
50#include <sys/socket.h>
51#include "networkconfig.h"
52
53#include <rtems_webserver.h>
54
55#define ARGUMENT 0
56
57extern int _binary_tarfile_start;
58extern int _binary_tarfile_size;
59
60struct rtems_ftpd_configuration rtems_ftpd_configuration = {
61   10,                     /* FTPD task priority            */
62   1024,                   /* Maximum buffersize for hooks  */
63   80,                     /* Well-known port     */
64   NULL                    /* List of hooks       */
65};
66
[7054195]67/*
68 *  Settings for the Application Profiles:
69 *
70 *    Base Networking Profile - neither
71 *    FTP Server Profile - include ftpd
72 *    Web Server Profile -include httpd
73 */
74
[ea62753]75#define INCLUDE_FTPD 0
76#define INCLUDE_HTTPD 1
77
[7054195]78/* XXX until binutils are rebuilt */
79
80int _binary_tarfile_start;
81int _binary_tarfile_size;
82
[3d7557e]83rtems_task Init(
84  rtems_task_argument argument
85)
86{
87  rtems_status_code status;
88
89  rtems_bsdnet_initialize_network ();
90
[ea62753]91#if INCLUDE_FTPD
92  status = Untar_FromMemory((unsigned char *)(&_binary_tarfile_start),
93                            &_binary_tarfile_size);
[3d7557e]94  rtems_initialize_ftpd();
95
[ea62753]96#endif
97   
98#if INCLUDE_HTTPD
[3d7557e]99  status = Untar_FromMemory((unsigned char *)(&_binary_tarfile_start),
100                            &_binary_tarfile_size);
101  rtems_initialize_webserver();
[ea62753]102#endif
[3d7557e]103
[ea62753]104#if 0
[3d7557e]105  status = rtems_task_delete( RTEMS_SELF );
106#endif
107}
108
109
110
111
Note: See TracBrowser for help on using the repository browser.