source: network-demos/mcast/init.c @ 0417fe3

4.11network-demos-4-10-branch
Last change on this file since 0417fe3 was 0417fe3, checked in by Joel Sherrill <joel.sherrill@…>, on 05/12/09 at 19:59:54

2009-05-12 Joel Sherrill <joel.sherrill@…>

  • init.c: Now build with libbsdport.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 * RTEMS configuration/initialization
3 *
4 * This program may be distributed and used for any purpose.
5 * I ask only that you:
6 *    1. Leave this author information intact.
7 *    2. Document any changes you make.
8 *
9 * W. Eric Norum
10 * Saskatchewan Accelerator Laboratory
11 * University of Saskatchewan
12 * Saskatoon, Saskatchewan, CANADA
13 * eric@skatter.usask.ca
14 *
15 *  $Id$
16 */
17
18#include <bsp.h>
19
20#include <stdio.h>
21#include <stdlib.h>
22#include <rtems/rtems_bsdnet.h>
23#include "../networkconfig.h"
24
25#include <rtems/untar.h>
26#include "FilesystemImage.h"
27
28#if 0
29int add_mcast_route(
30  char *multi_address,
31  char *multi_netmask,
32  char *multi_gateway
33);
34
35#define MULTI_ADDRESS        "239.9.8.0"
36#define MULTI_NETMASK        "255.255.255.0"
37#define MULTI_GATEWAY       "192.168.1.244"
38#endif
39
40/*
41 * RTEMS Startup Task
42 */
43rtems_task
44Init (rtems_task_argument ignored)
45{
46  int mcast_main(int ac, char **av);
47  rtems_status_code status;
48
49  printf("Loading filesystem image\n");
50  status = Untar_FromMemory( (char *)FilesystemImage, FilesystemImage_size );
51   
52  printk( "Initializing network\n" );
53  rtems_bsdnet_initialize_network ();
54
55  // This appears to have no effect.
56  // add_mcast_route( MULTI_ADDRESS, MULTI_NETMASK, MULTI_GATEWAY );
57
58  printk( "Network initialized\n" );
59  rtems_bsdnet_show_inet_routes ();
60
61  printk( "Initiating mcast test\n" );
62  mcast_main ( 0, 0 );
63  exit (0);
64}
65
66#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
67#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
68#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
69#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
70#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
71
72#define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
73#define CONFIGURE_MAXIMUM_SEMAPHORES 20
74#define CONFIGURE_MAXIMUM_TASKS      20
75
76#define CONFIGURE_MICROSECONDS_PER_TICK 10000
77
78#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024)
79#define CONFIGURE_INIT_TASK_PRIORITY   120
80#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
81                                           RTEMS_NO_TIMESLICE | \
82                                           RTEMS_NO_ASR | \
83                                           RTEMS_INTERRUPT_LEVEL(0))
84
85#define CONFIGURE_INIT
86rtems_task Init (rtems_task_argument argument);
87
88#include <rtems/confdefs.h>
89
Note: See TracBrowser for help on using the repository browser.