source: network-demos/netlink/init.c @ 5c663c0

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since 5c663c0 was 5c663c0, checked in by Joel Sherrill <joel.sherrill@…>, on 06/21/07 at 15:11:36

2007-06-21 Joel Sherrill <joel.sherrill@…>

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