annotate packages/net/httpd/current/tests/httpd1.c @ 2863:7d8c61e6225c default tip

* Added execute permissions to files missed in conversion from CVS
author alexs
date Thu, 26 Mar 2009 20:39:18 +0000
parents 74dbf4c3f2e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
1 //==========================================================================
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
2 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
3 // ./net/http/current/tests/httpd1.c
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
4 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
5 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
6 //==========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
7 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
8 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
9 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
10 // Copyright (C) 2003 Free Software Foundation, Inc.
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
11 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
12 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
13 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
14 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
15 // version.
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
16 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
17 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
18 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
19 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
20 // for more details.
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
21 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
22 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
23 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
24 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
25 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
26 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
27 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
28 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
29 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
30 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
31 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
32 // General Public License v2.
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
33 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
34 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
35 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
36 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1008
diff changeset
37 // ####ECOSGPLCOPYRIGHTEND####
1008
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
38 //==========================================================================
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
39 //#####DESCRIPTIONBEGIN####
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
40 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
41 // Author(s): andrew.lunn@ascom.ch
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
42 // Contributors: andrew.lunn@ascom.ch
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
43 // Date: 2003-04-29
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
44 // Purpose:
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
45 // Description:
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
46 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
47 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
48 //####DESCRIPTIONEND####
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
49 //
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
50 //==========================================================================
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
51
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
52 #include <network.h>
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
53 #include <cyg/infra/testcase.h>
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
54
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
55 #define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_TYPICAL + 0x1000)
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
56 static char stack[STACK_SIZE];
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
57 static cyg_thread thread_data;
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
58 static cyg_handle_t thread_handle;
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
59
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
60 void
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
61 httpd_test(cyg_addrword_t p)
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
62 {
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
63
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
64 CYG_TEST_INIT();
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
65
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
66 init_all_network_interfaces();
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
67
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
68 cyg_thread_delay(1 * 60 * 100);
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
69
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
70 CYG_TEST_PASS_FINISH( "httpd test finished" );
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
71 }
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
72
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
73 void
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
74 cyg_start(void)
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
75 {
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
76 // Create a main thread, so we can run the scheduler and have time 'pass'
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
77 cyg_thread_create(10, // Priority - just a number
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
78 httpd_test, // entry
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
79 0, // entry parameter
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
80 "httpd test", // Name
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
81 &stack[0], // Stack
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
82 STACK_SIZE, // Size
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
83 &thread_handle, // Handle
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
84 &thread_data // Thread data structure
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
85 );
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
86 cyg_thread_resume(thread_handle); // Start it
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
87 cyg_scheduler_start();
4ca8a5f30c03 * src/monitor.c (cyg_monitor_network): Added IPv6 information to
asl
parents:
diff changeset
88 }