]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Sockets/WebServer/WebServer.h
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Sockets / WebServer / WebServer.h
CommitLineData
4684b66f 1/** @file\r
2 Definitions for the web server.\r
3\r
bcb96695
MK
4 Copyright (c) 2011-2012, Intel Corporation. All rights reserved.\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
4684b66f 6\r
7**/\r
8\r
9#ifndef _WEB_SERVER_H_\r
10#define _WEB_SERVER_H_\r
11\r
12#include <errno.h>\r
13#include <Uefi.h>\r
14\r
15#include <Guid/EventGroup.h>\r
16\r
17#include <Library/BaseMemoryLib.h>\r
18#include <Library/DebugLib.h>\r
9f7f5161 19#include <Library/MemoryAllocationLib.h>\r
4684b66f 20#include <Library/PcdLib.h>\r
21#include <Library/UefiApplicationEntryPoint.h>\r
22#include <Library/UefiBootServicesTableLib.h>\r
23#include <Library/UefiLib.h>\r
24#include <Protocol/BlockIo.h>\r
25\r
26#include <netinet/in.h>\r
27\r
28#include <sys/EfiSysCall.h>\r
29#include <sys/poll.h>\r
30#include <sys/socket.h>\r
31\r
d3a595ce 32#if defined(_MSC_VER) // Handle Microsoft VC++ compiler specifics.\r
4684b66f 33#pragma warning ( disable : 4054 )\r
34#pragma warning ( disable : 4152 )\r
d3a595ce 35#endif // defined(_MSC_VER)\r
4684b66f 36\r
37//------------------------------------------------------------------------------\r
38// Pages\r
39//------------------------------------------------------------------------------\r
40\r
9f7f5161 41#define PAGE_ACPI_APIC L"/APIC"\r
42#define PAGE_ACPI_BGRT L"/BGRT"\r
4684b66f 43#define PAGE_ACPI_DSDT L"/DSDT"\r
44#define PAGE_ACPI_FADT L"/FADT"\r
9f7f5161 45#define PAGE_ACPI_HPET L"/HPET"\r
46#define PAGE_ACPI_MCFG L"/MCFG"\r
4684b66f 47#define PAGE_ACPI_RSDP_10B L"/RSDP1.0b"\r
48#define PAGE_ACPI_RSDP_30 L"/RSDP3.0"\r
49#define PAGE_ACPI_RSDT L"/RSDT"\r
9f7f5161 50#define PAGE_ACPI_SSDT L"/SSDT"\r
51#define PAGE_ACPI_TCPA L"/TCPA"\r
52#define PAGE_ACPI_UEFI L"/UEFI"\r
4684b66f 53#define PAGE_BOOT_SERVICES_TABLE L"/BootServicesTable"\r
54#define PAGE_CONFIGURATION_TABLE L"/ConfigurationTable"\r
55#define PAGE_DXE_SERVICES_TABLE L"/DxeServicesTable"\r
56#define PAGE_RUNTIME_SERVICES_TABLE L"/RuntimeServicesTable"\r
57\r
58//------------------------------------------------------------------------------\r
59// Signatures\r
60//------------------------------------------------------------------------------\r
61\r
9f7f5161 62#define APIC_SIGNATURE 0x43495041\r
63#define BGRT_SIGNATURE 0x54524742\r
4684b66f 64#define DSDT_SIGNATURE 0x54445344\r
65#define FADT_SIGNATURE 0x50434146\r
9f7f5161 66#define HPET_SIGNATURE 0x54455048\r
67#define MCFG_SIGNATURE 0x4746434d\r
68#define SSDT_SIGNATURE 0x54445353\r
69#define TCPA_SIGNATURE 0x41504354\r
70#define UEFI_SIGNATURE 0x49464555\r
4684b66f 71\r
72//------------------------------------------------------------------------------\r
73// Macros\r
74//------------------------------------------------------------------------------\r
75\r
76#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */\r
77#define DBG_ENTER() DEBUG (( DEBUG_INFO, "Entering " __FUNCTION__ "\n" )) ///< Display routine entry\r
78#define DBG_EXIT() DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ "\n" )) ///< Display routine exit\r
79#define DBG_EXIT_DEC(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %d\n", Status )) ///< Display routine exit with decimal value\r
80#define DBG_EXIT_HEX(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: 0x%08x\n", Status )) ///< Display routine exit with hex value\r
81#define DBG_EXIT_STATUS(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", Status: %r\n", Status )) ///< Display routine exit with status value\r
82#define DBG_EXIT_TF(Status) DEBUG (( DEBUG_INFO, "Exiting " __FUNCTION__ ", returning %s\n", (FALSE == Status) ? L"FALSE" : L"TRUE" )) ///< Display routine with TRUE/FALSE value\r
83#else // _MSC_VER\r
84#define DBG_ENTER()\r
85#define DBG_EXIT()\r
86#define DBG_EXIT_DEC(Status)\r
87#define DBG_EXIT_HEX(Status)\r
88#define DBG_EXIT_STATUS(Status)\r
89#define DBG_EXIT_TF(Status)\r
90#endif // _MSC_VER\r
91\r
92#define DIM(x) ( sizeof ( x ) / sizeof ( x[0] )) ///< Compute the number of entries in an array\r
93\r
94//------------------------------------------------------------------------------\r
95// Constants\r
96//------------------------------------------------------------------------------\r
97\r
98#define DEBUG_SOCKET_POLL 0x00080000 ///< Display the socket poll messages\r
99#define DEBUG_PORT_WORK 0x00040000 ///< Display the port work messages\r
f6e5cdd5 100#define DEBUG_SERVER_LISTEN 0x00020000 ///< Display the socket poll messages\r
4684b66f 101#define DEBUG_HTTP_PORT 0x00010000 ///< Display HTTP port related messages\r
102#define DEBUG_REQUEST 0x00008000 ///< Display the HTTP request messages\r
103\r
104#define HTTP_PORT_POLL_DELAY ( 2 * 1000 ) ///< Delay in milliseconds for attempts to open the HTTP port\r
105#define CLIENT_POLL_DELAY 50 ///< Delay in milliseconds between client polls\r
106\r
107#define TPL_WEB_SERVER TPL_CALLBACK ///< TPL for routine synchronization\r
108\r
109/**\r
110 Verify new TPL value\r
111\r
112 This macro which is enabled when debug is enabled verifies that\r
113 the new TPL value is >= the current TPL value.\r
114**/\r
115#ifdef VERIFY_TPL\r
116#undef VERIFY_TPL\r
117#endif // VERIFY_TPL\r
118\r
119#if !defined(MDEPKG_NDEBUG)\r
120\r
121#define VERIFY_TPL(tpl) \\r
122{ \\r
123 EFI_TPL PreviousTpl; \\r
124 \\r
125 PreviousTpl = gBS->RaiseTPL ( TPL_HIGH_LEVEL ); \\r
126 gBS->RestoreTPL ( PreviousTpl ); \\r
127 if ( PreviousTpl > tpl ) { \\r
128 DEBUG (( DEBUG_ERROR, "Current TPL: %d, New TPL: %d\r\n", PreviousTpl, tpl )); \\r
129 ASSERT ( PreviousTpl <= tpl ); \\r
130 } \\r
131}\r
132\r
133#else // MDEPKG_NDEBUG\r
134\r
135#define VERIFY_TPL(tpl)\r
136\r
137#endif // MDEPKG_NDEBUG\r
138\r
59bc0593 139#define WEB_SERVER_SIGNATURE SIGNATURE_32 ('W','e','b','S') ///< DT_WEB_SERVER memory signature\r
4684b66f 140\r
141#define SPACES_ADDRESS_TO_DATA 2\r
142#define BYTES_ON_A_LINE 16\r
143#define SPACES_BETWEEN_BYTES 1\r
144#define SPACES_DATA_TO_ASCII 2\r
145\r
146\r
147//------------------------------------------------------------------------------\r
148// Protocol Declarations\r
149//------------------------------------------------------------------------------\r
150\r
151extern EFI_COMPONENT_NAME_PROTOCOL gComponentName; ///< Component name protocol declaration\r
152extern EFI_COMPONENT_NAME2_PROTOCOL gComponentName2; ///< Component name 2 protocol declaration\r
153extern EFI_DRIVER_BINDING_PROTOCOL gDriverBinding; ///< Driver binding protocol declaration\r
154\r
155//------------------------------------------------------------------------------\r
156// Data Types\r
157//------------------------------------------------------------------------------\r
158\r
159/**\r
160 Port control structure\r
161**/\r
162typedef struct {\r
163 //\r
164 // Buffer management\r
165 //\r
166 size_t RequestLength; ///< Request length in bytes\r
167 size_t TxBytes; ///< Bytes in the TX buffer\r
59bc0593 168 UINT8 Request[ 65536 ]; ///< Page request\r
169 UINT8 RxBuffer[ 65536 ]; ///< Receive buffer\r
170 UINT8 TxBuffer[ 65536 ]; ///< Transmit buffer\r
4684b66f 171} WSDT_PORT;\r
172\r
173/**\r
174 Web server control structure\r
175**/\r
176typedef struct {\r
177 UINTN Signature; ///< Structure identification\r
178\r
179 //\r
180 // Image attributes\r
181 //\r
182 EFI_HANDLE ImageHandle; ///< Image handle\r
183\r
184 //\r
185 // HTTP port management\r
186 //\r
f6e5cdd5 187 BOOLEAN bRunning; ///< Web server running\r
4684b66f 188 EFI_EVENT TimerEvent; ///< Timer to open HTTP port\r
f6e5cdd5 189 int HttpListenPort; ///< File descriptor for the HTTP listen port over TCP4\r
190 int HttpListenPort6; ///< File descriptor for the HTTP listen port over TCP6\r
4684b66f 191\r
192 //\r
193 // Client port management\r
194 //\r
195 nfds_t MaxEntries; ///< Maximum entries in the PortList array\r
196 nfds_t Entries; ///< The current number of entries in the PortList array\r
197 struct pollfd * pFdList; ///< List of socket file descriptors\r
198 WSDT_PORT ** ppPortList; ///< List of port management structures\r
199} DT_WEB_SERVER;\r
200\r
59bc0593 201//#define SERVER_FROM_SERVICE(a) CR (a, DT_WEB_SERVER, ServiceBinding, WEB_SERVER_SIGNATURE) ///< Locate DT_LAYER from service binding\r
4684b66f 202\r
203extern DT_WEB_SERVER mWebServer;\r
204\r
205/**\r
206 Process an HTTP request\r
207\r
208 @param [in] SocketFD The socket's file descriptor to add to the list.\r
209 @param [in] pPort The WSDT_PORT structure address\r
210 @param [out] pbDone Address to receive the request completion status\r
211\r
212 @retval EFI_SUCCESS The request was successfully processed\r
213\r
214**/\r
215typedef\r
216EFI_STATUS\r
217(* PFN_RESPONSE) (\r
218 IN int SocketFD,\r
219 IN WSDT_PORT * pPort,\r
220 IN BOOLEAN * pbDone\r
221 );\r
222\r
223/**\r
224 Data structure to delcare page support routines\r
225**/\r
226typedef struct {\r
227 UINT16 * pPageName; ///< Name of the page\r
228 PFN_RESPONSE pfnResponse; ///< Routine to generate the response\r
229 UINT16 * pDescription; ///< Description of the page\r
230} DT_PAGE;\r
231\r
59bc0593 232extern CONST DT_PAGE mPageList[]; ///< List of pages\r
4684b66f 233extern CONST UINTN mPageCount; ///< Number of pages\r
234\r
235//------------------------------------------------------------------------------\r
236// Web Pages\r
237//------------------------------------------------------------------------------\r
238\r
9f7f5161 239/**\r
240 Respond with the APIC table\r
241\r
242 @param [in] SocketFD The socket's file descriptor to add to the list.\r
243 @param [in] pPort The WSDT_PORT structure address\r
244 @param [out] pbDone Address to receive the request completion status\r
245\r
246 @retval EFI_SUCCESS The request was successfully processed\r
247\r
248**/\r
249EFI_STATUS\r
250AcpiApicPage (\r
251 IN int SocketFD,\r
252 IN WSDT_PORT * pPort,\r
253 OUT BOOLEAN * pbDone\r
254 );\r
255\r
256/**\r
257 Respond with the BGRT table\r
258\r
259 @param [in] SocketFD The socket's file descriptor to add to the list.\r
260 @param [in] pPort The WSDT_PORT structure address\r
261 @param [out] pbDone Address to receive the request completion status\r
262\r
263 @retval EFI_SUCCESS The request was successfully processed\r
264\r
265**/\r
266EFI_STATUS\r
267AcpiBgrtPage (\r
268 IN int SocketFD,\r
269 IN WSDT_PORT * pPort,\r
270 OUT BOOLEAN * pbDone\r
271 );\r
272\r
4684b66f 273/**\r
274 Respond with the ACPI DSDT table\r
275\r
276 @param [in] SocketFD The socket's file descriptor to add to the list.\r
277 @param [in] pPort The WSDT_PORT structure address\r
278 @param [out] pbDone Address to receive the request completion status\r
279\r
280 @retval EFI_SUCCESS The request was successfully processed\r
281\r
282**/\r
283EFI_STATUS\r
284AcpiDsdtPage (\r
285 IN int SocketFD,\r
286 IN WSDT_PORT * pPort,\r
287 OUT BOOLEAN * pbDone\r
288 );\r
289\r
290/**\r
291 Respond with the ACPI FADT table\r
292\r
293 @param [in] SocketFD The socket's file descriptor to add to the list.\r
294 @param [in] pPort The WSDT_PORT structure address\r
295 @param [out] pbDone Address to receive the request completion status\r
296\r
297 @retval EFI_SUCCESS The request was successfully processed\r
298\r
299**/\r
300EFI_STATUS\r
301AcpiFadtPage (\r
302 IN int SocketFD,\r
303 IN WSDT_PORT * pPort,\r
304 OUT BOOLEAN * pbDone\r
305 );\r
306\r
9f7f5161 307/**\r
308 Respond with the HPET table\r
309\r
310 @param [in] SocketFD The socket's file descriptor to add to the list.\r
311 @param [in] pPort The WSDT_PORT structure address\r
312 @param [out] pbDone Address to receive the request completion status\r
313\r
314 @retval EFI_SUCCESS The request was successfully processed\r
315\r
316**/\r
317EFI_STATUS\r
318AcpiHpetPage (\r
319 IN int SocketFD,\r
320 IN WSDT_PORT * pPort,\r
321 OUT BOOLEAN * pbDone\r
322 );\r
323\r
324/**\r
325 Respond with the MCFG table\r
326\r
327 @param [in] SocketFD The socket's file descriptor to add to the list.\r
328 @param [in] pPort The WSDT_PORT structure address\r
329 @param [out] pbDone Address to receive the request completion status\r
330\r
331 @retval EFI_SUCCESS The request was successfully processed\r
332\r
333**/\r
334EFI_STATUS\r
335AcpiMcfgPage (\r
336 IN int SocketFD,\r
337 IN WSDT_PORT * pPort,\r
338 OUT BOOLEAN * pbDone\r
339 );\r
340\r
4684b66f 341/**\r
342 Respond with the ACPI RSDP 1.0b table\r
343\r
344 @param [in] SocketFD The socket's file descriptor to add to the list.\r
345 @param [in] pPort The WSDT_PORT structure address\r
346 @param [out] pbDone Address to receive the request completion status\r
347\r
348 @retval EFI_SUCCESS The request was successfully processed\r
349\r
350**/\r
351EFI_STATUS\r
352AcpiRsdp10Page (\r
353 IN int SocketFD,\r
354 IN WSDT_PORT * pPort,\r
355 OUT BOOLEAN * pbDone\r
356 );\r
357\r
358/**\r
359 Respond with the ACPI RSDP 3.0 table\r
360\r
361 @param [in] SocketFD The socket's file descriptor to add to the list.\r
362 @param [in] pPort The WSDT_PORT structure address\r
363 @param [out] pbDone Address to receive the request completion status\r
364\r
365 @retval EFI_SUCCESS The request was successfully processed\r
366\r
367**/\r
368EFI_STATUS\r
369AcpiRsdp30Page (\r
370 IN int SocketFD,\r
371 IN WSDT_PORT * pPort,\r
372 OUT BOOLEAN * pbDone\r
373 );\r
374\r
375/**\r
376 Respond with the ACPI RSDT table\r
377\r
378 @param [in] SocketFD The socket's file descriptor to add to the list.\r
379 @param [in] pPort The WSDT_PORT structure address\r
380 @param [out] pbDone Address to receive the request completion status\r
381\r
382 @retval EFI_SUCCESS The request was successfully processed\r
383\r
384**/\r
385EFI_STATUS\r
386AcpiRsdtPage (\r
387 IN int SocketFD,\r
388 IN WSDT_PORT * pPort,\r
389 OUT BOOLEAN * pbDone\r
390 );\r
391\r
9f7f5161 392/**\r
393 Respond with the SSDT table\r
394\r
395 @param [in] SocketFD The socket's file descriptor to add to the list.\r
396 @param [in] pPort The WSDT_PORT structure address\r
397 @param [out] pbDone Address to receive the request completion status\r
398\r
399 @retval EFI_SUCCESS The request was successfully processed\r
400\r
401**/\r
402EFI_STATUS\r
403AcpiSsdtPage (\r
404 IN int SocketFD,\r
405 IN WSDT_PORT * pPort,\r
406 OUT BOOLEAN * pbDone\r
407 );\r
408\r
409/**\r
410 Respond with the TCPA table\r
411\r
412 @param [in] SocketFD The socket's file descriptor to add to the list.\r
413 @param [in] pPort The WSDT_PORT structure address\r
414 @param [out] pbDone Address to receive the request completion status\r
415\r
416 @retval EFI_SUCCESS The request was successfully processed\r
417\r
418**/\r
419EFI_STATUS\r
420AcpiTcpaPage (\r
421 IN int SocketFD,\r
422 IN WSDT_PORT * pPort,\r
423 OUT BOOLEAN * pbDone\r
424 );\r
425\r
426/**\r
427 Respond with the UEFI table\r
428\r
429 @param [in] SocketFD The socket's file descriptor to add to the list.\r
430 @param [in] pPort The WSDT_PORT structure address\r
431 @param [out] pbDone Address to receive the request completion status\r
432\r
433 @retval EFI_SUCCESS The request was successfully processed\r
434\r
435**/\r
436EFI_STATUS\r
437AcpiUefiPage (\r
438 IN int SocketFD,\r
439 IN WSDT_PORT * pPort,\r
440 OUT BOOLEAN * pbDone\r
441 );\r
442\r
4684b66f 443/**\r
444 Respond with the boot services table\r
445\r
446 @param [in] SocketFD The socket's file descriptor to add to the list.\r
447 @param [in] pPort The WSDT_PORT structure address\r
448 @param [out] pbDone Address to receive the request completion status\r
449\r
450 @retval EFI_SUCCESS The request was successfully processed\r
451\r
452**/\r
453EFI_STATUS\r
454BootServicesTablePage (\r
455 IN int SocketFD,\r
456 IN WSDT_PORT * pPort,\r
457 OUT BOOLEAN * pbDone\r
458 );\r
459\r
460/**\r
461 Respond with the configuration tables\r
462\r
463 @param [in] SocketFD The socket's file descriptor to add to the list.\r
464 @param [in] pPort The WSDT_PORT structure address\r
465 @param [out] pbDone Address to receive the request completion status\r
466\r
467 @retval EFI_SUCCESS The request was successfully processed\r
468\r
469**/\r
470EFI_STATUS\r
471ConfigurationTablePage (\r
472 IN int SocketFD,\r
473 IN WSDT_PORT * pPort,\r
474 OUT BOOLEAN * pbDone\r
475 );\r
476\r
477/**\r
478 Respond with the DHCP options\r
479\r
480 @param [in] SocketFD The socket's file descriptor to add to the list.\r
481 @param [in] pPort The WSDT_PORT structure address\r
482 @param [out] pbDone Address to receive the request completion status\r
483\r
484 @retval EFI_SUCCESS The request was successfully processed\r
485\r
486**/\r
487EFI_STATUS\r
488DhcpOptionsPage (\r
489 IN int SocketFD,\r
490 IN WSDT_PORT * pPort,\r
491 OUT BOOLEAN * pbDone\r
492 );\r
493\r
494/**\r
495 Respond with the DXE services table\r
496\r
497 @param [in] SocketFD The socket's file descriptor to add to the list.\r
498 @param [in] pPort The WSDT_PORT structure address\r
499 @param [out] pbDone Address to receive the request completion status\r
500\r
501 @retval EFI_SUCCESS The request was successfully processed\r
502\r
503**/\r
504EFI_STATUS\r
505DxeServicesTablePage (\r
506 IN int SocketFD,\r
507 IN WSDT_PORT * pPort,\r
508 OUT BOOLEAN * pbDone\r
509 );\r
510\r
f6e5cdd5 511/**\r
512 Respond with the Exit page\r
513\r
514 @param [in] SocketFD The socket's file descriptor to add to the list.\r
515 @param [in] pPort The WSDT_PORT structure address\r
516 @param [out] pbDone Address to receive the request completion status\r
517\r
518 @retval EFI_SUCCESS The request was successfully processed\r
519\r
520**/\r
521EFI_STATUS\r
522ExitPage (\r
523 IN int SocketFD,\r
524 IN WSDT_PORT * pPort,\r
525 OUT BOOLEAN * pbDone\r
526 );\r
527\r
4684b66f 528/**\r
529 Respond with the firmware status\r
530\r
531 @param [in] SocketFD The socket's file descriptor to add to the list.\r
532 @param [in] pPort The WSDT_PORT structure address\r
533 @param [out] pbDone Address to receive the request completion status\r
534\r
535 @retval EFI_SUCCESS The request was successfully processed\r
536\r
537**/\r
538EFI_STATUS\r
539FirmwarePage (\r
540 IN int SocketFD,\r
541 IN WSDT_PORT * pPort,\r
542 OUT BOOLEAN * pbDone\r
543 );\r
544\r
545/**\r
546 Respond with the handles in the system\r
547\r
548 @param [in] SocketFD The socket's file descriptor to add to the list.\r
549 @param [in] pPort The WSDT_PORT structure address\r
550 @param [out] pbDone Address to receive the request completion status\r
551\r
552 @retval EFI_SUCCESS The request was successfully processed\r
553\r
554**/\r
555EFI_STATUS\r
556HandlePage (\r
557 IN int SocketFD,\r
558 IN WSDT_PORT * pPort,\r
559 OUT BOOLEAN * pbDone\r
560 );\r
561\r
562/**\r
563 Respond with the Hello World page\r
564\r
565 @param [in] SocketFD The socket's file descriptor to add to the list.\r
566 @param [in] pPort The WSDT_PORT structure address\r
567 @param [out] pbDone Address to receive the request completion status\r
568\r
569 @retval EFI_SUCCESS The request was successfully processed\r
570\r
571**/\r
572EFI_STATUS\r
573HelloPage (\r
574 IN int SocketFD,\r
575 IN WSDT_PORT * pPort,\r
576 OUT BOOLEAN * pbDone\r
577 );\r
578\r
579/**\r
580 Respond with the list of known pages\r
581\r
582 @param [in] SocketFD The socket's file descriptor to add to the list.\r
583 @param [in] pPort The WSDT_PORT structure address\r
584 @param [out] pbDone Address to receive the request completion status\r
585\r
586 @retval EFI_SUCCESS The request was successfully processed\r
587\r
588**/\r
589EFI_STATUS\r
590IndexPage (\r
591 IN int SocketFD,\r
592 IN WSDT_PORT * pPort,\r
9f7f5161 593 OUT BOOLEAN * pbDone\r
594 );\r
595\r
596/**\r
597 Page to display the memory map\r
598\r
599 @param [in] SocketFD The socket's file descriptor to add to the list.\r
600 @param [in] pPort The WSDT_PORT structure address\r
601 @param [out] pbDone Address to receive the request completion status\r
602\r
603 @retval EFI_SUCCESS The request was successfully processed\r
604\r
605**/\r
606EFI_STATUS\r
607MemoryMapPage (\r
608 IN int SocketFD,\r
609 IN WSDT_PORT * pPort,\r
610 OUT BOOLEAN * pbDone\r
611 );\r
612\r
613/**\r
614 Display the memory type registers\r
615\r
616 @param [in] SocketFD The socket's file descriptor to add to the list.\r
617 @param [in] pPort The WSDT_PORT structure address\r
618 @param [out] pbDone Address to receive the request completion status\r
619\r
620 @retval EFI_SUCCESS The request was successfully processed\r
621\r
622**/\r
623EFI_STATUS\r
624MemoryTypeRegistersPage (\r
625 IN int SocketFD,\r
626 IN WSDT_PORT * pPort,\r
4684b66f 627 OUT BOOLEAN * pbDone\r
628 );\r
629\r
f6e5cdd5 630/**\r
631 Respond with the Ports page\r
632\r
633 @param [in] SocketFD The socket's file descriptor to add to the list.\r
634 @param [in] pPort The WSDT_PORT structure address\r
635 @param [out] pbDone Address to receive the request completion status\r
636\r
637 @retval EFI_SUCCESS The request was successfully processed\r
638\r
639**/\r
640EFI_STATUS\r
641PortsPage (\r
642 IN int SocketFD,\r
643 IN WSDT_PORT * pPort,\r
644 OUT BOOLEAN * pbDone\r
645 );\r
646\r
4684b66f 647/**\r
648 Page to reboot the system\r
649\r
650 @param [in] SocketFD The socket's file descriptor to add to the list.\r
651 @param [in] pPort The WSDT_PORT structure address\r
652 @param [out] pbDone Address to receive the request completion status\r
653\r
654 @retval EFI_SUCCESS The request was successfully processed\r
655\r
656**/\r
657EFI_STATUS\r
658RebootPage (\r
659 IN int SocketFD,\r
660 IN WSDT_PORT * pPort,\r
661 OUT BOOLEAN * pbDone\r
662 );\r
663\r
664/**\r
665 Respond with the runtime services table\r
666\r
667 @param [in] SocketFD The socket's file descriptor to add to the list.\r
668 @param [in] pPort The WSDT_PORT structure address\r
669 @param [out] pbDone Address to receive the request completion status\r
670\r
671 @retval EFI_SUCCESS The request was successfully processed\r
672\r
673**/\r
674EFI_STATUS\r
675RuntimeSservicesTablePage (\r
676 IN int SocketFD,\r
677 IN WSDT_PORT * pPort,\r
678 OUT BOOLEAN * pbDone\r
679 );\r
680\r
681/**\r
682 Respond with the system table\r
683\r
684 @param [in] SocketFD The socket's file descriptor to add to the list.\r
685 @param [in] pPort The WSDT_PORT structure address\r
686 @param [out] pbDone Address to receive the request completion status\r
687\r
688 @retval EFI_SUCCESS The request was successfully processed\r
689\r
690**/\r
691EFI_STATUS\r
692SystemTablePage (\r
693 IN int SocketFD,\r
694 IN WSDT_PORT * pPort,\r
695 OUT BOOLEAN * pbDone\r
696 );\r
697\r
698//------------------------------------------------------------------------------\r
699// Support routines\r
700//------------------------------------------------------------------------------\r
701\r
702/**\r
703 Display the EFI Table Header\r
704\r
705 @param [in] SocketFD The socket's file descriptor to add to the list.\r
706 @param [in] pPort The WSDT_PORT structure address\r
707 @param [in] pHeader Address of the EFI_TABLE_HEADER structure\r
708\r
709 @retval EFI_SUCCESS The request was successfully processed\r
710\r
711**/\r
712EFI_STATUS\r
713EfiTableHeader (\r
714 IN int SocketFD,\r
715 IN WSDT_PORT * pPort,\r
716 IN EFI_TABLE_HEADER * pHeader\r
717 );\r
718\r
719/**\r
720 Buffer the HTTP page header\r
721\r
722 @param [in] SocketFD The socket's file descriptor to add to the list.\r
723 @param [in] pPort The WSDT_PORT structure address\r
724 @param [in] pTitle A zero terminated Unicode title string\r
725\r
726 @retval EFI_SUCCESS The request was successfully processed\r
727\r
728**/\r
729EFI_STATUS\r
730HttpPageHeader (\r
731 IN int SocketFD,\r
732 IN WSDT_PORT * pPort,\r
733 IN CONST CHAR16 * pTitle\r
734 );\r
735\r
736/**\r
737 Buffer and send the HTTP page trailer\r
738\r
739 @param [in] SocketFD The socket's file descriptor to add to the list.\r
740 @param [in] pPort The WSDT_PORT structure address\r
741 @param [out] pbDone Address to receive the request completion status\r
742\r
743 @retval EFI_SUCCESS The request was successfully processed\r
744\r
745**/\r
746EFI_STATUS\r
747HttpPageTrailer (\r
748 IN int SocketFD,\r
749 IN WSDT_PORT * pPort,\r
750 IN BOOLEAN * pbDone\r
751 );\r
752\r
753/**\r
754 Process an HTTP request\r
755\r
756 @param [in] SocketFD The socket's file descriptor to add to the list.\r
757 @param [in] pPort The WSDT_PORT structure address\r
758 @param [out] pbDone Address to receive the request completion status\r
759\r
760 @retval EFI_SUCCESS The request was successfully processed\r
761\r
762**/\r
763EFI_STATUS\r
764HttpRequest (\r
765 IN int SocketFD,\r
766 IN WSDT_PORT * pPort,\r
767 IN BOOLEAN * pbDone\r
768 );\r
769\r
770/**\r
771 Buffer data for sending\r
772\r
773 @param [in] SocketFD The socket's file descriptor to add to the list.\r
774 @param [in] pPort The WSDT_PORT structure address\r
775 @param [in] LengthInBytes Length of valid data in the buffer\r
776 @param [in] pBuffer Buffer of data to send\r
777\r
778 @retval EFI_SUCCESS The request was successfully processed\r
779\r
780**/\r
781EFI_STATUS\r
782HttpSend (\r
783 IN int SocketFD,\r
784 IN WSDT_PORT * pPort,\r
785 IN size_t LengthInBytes,\r
786 IN CONST UINT8 * pBuffer\r
787 );\r
788\r
789/**\r
790 Send an ANSI string\r
791\r
792 @param [in] SocketFD The socket's file descriptor to add to the list.\r
793 @param [in] pPort The WSDT_PORT structure address\r
794 @param [in] pString A zero terminated Unicode string\r
795\r
796 @retval EFI_SUCCESS The request was successfully processed\r
797\r
798**/\r
799EFI_STATUS\r
800HttpSendAnsiString (\r
801 IN int SocketFD,\r
802 IN WSDT_PORT * pPort,\r
803 IN CONST char * pString\r
804 );\r
805\r
806/**\r
807 Buffer a single byte\r
808\r
809 @param [in] SocketFD The socket's file descriptor to add to the list.\r
810 @param [in] pPort The WSDT_PORT structure address\r
811 @param [in] Data The data byte to send\r
812\r
813 @retval EFI_SUCCESS The request was successfully processed\r
814\r
815**/\r
816EFI_STATUS\r
817HttpSendByte (\r
818 IN int SocketFD,\r
819 IN WSDT_PORT * pPort,\r
820 IN UINT8 Data\r
821 );\r
822\r
823/**\r
824 Display a character\r
825\r
826 @param [in] SocketFD The socket's file descriptor to add to the list.\r
827 @param [in] pPort The WSDT_PORT structure address\r
828 @param [in] Character Character to display\r
829 @param [in] pReplacement Replacement character string\r
830\r
831 @retval EFI_SUCCESS The request was successfully processed\r
832\r
833**/\r
834EFI_STATUS\r
835HttpSendCharacter (\r
836 IN int SocketFD,\r
837 IN WSDT_PORT * pPort,\r
838 IN CHAR8 Character,\r
839 IN CHAR8 * pReplacement\r
840 );\r
841\r
842/**\r
843 Send a buffer dump\r
844 \r
845 @param [in] SocketFD The socket's file descriptor to add to the list.\r
846 @param [in] pPort The WSDT_PORT structure address\r
847 @param [in] ByteCount The number of bytes to display\r
848 @param [in] pData Address of the byte array\r
849\r
850 @retval EFI_SUCCESS The request was successfully processed\r
851\r
852**/\r
853EFI_STATUS\r
854HttpSendDump (\r
855 IN int SocketFD,\r
856 IN WSDT_PORT * pPort,\r
857 IN UINTN ByteCount,\r
858 IN CONST UINT8 * pData\r
859 );\r
860\r
861/**\r
862 Display a row containing a GUID value\r
863\r
864 @param [in] SocketFD The socket's file descriptor to add to the list.\r
865 @param [in] pPort The WSDT_PORT structure address\r
866 @param [in] pGuid Address of the GUID to display\r
867\r
868 @retval EFI_SUCCESS The request was successfully processed\r
869\r
870**/\r
871EFI_STATUS\r
872HttpSendGuid (\r
873 IN int SocketFD,\r
874 IN WSDT_PORT * pPort,\r
875 IN CONST EFI_GUID * pGuid\r
876 );\r
877\r
878/**\r
879 Output a hex value to the HTML page\r
880\r
881 @param [in] SocketFD Socket file descriptor\r
882 @param [in] pPort The WSDT_PORT structure address\r
883 @param [in] Bits Number of bits to display\r
884 @param [in] Value Value to display\r
885\r
886 @retval EFI_SUCCESS Successfully displayed the address\r
887**/\r
888EFI_STATUS\r
889HttpSendHexBits (\r
890 IN int SocketFD,\r
891 IN WSDT_PORT * pPort,\r
892 IN INT32 Bits,\r
893 IN UINT64 Value\r
894 );\r
895\r
896/**\r
897 Output a hex value to the HTML page\r
898\r
899 @param [in] SocketFD Socket file descriptor\r
900 @param [in] pPort The WSDT_PORT structure address\r
901 @param [in] Value Value to display\r
902\r
903 @retval EFI_SUCCESS Successfully displayed the address\r
904**/\r
905EFI_STATUS\r
906HttpSendHexValue (\r
907 IN int SocketFD,\r
908 IN WSDT_PORT * pPort,\r
909 IN UINT64 Value\r
910 );\r
911\r
912/**\r
913 Output an IP address to the HTML page\r
914\r
915 @param [in] SocketFD Socket file descriptor\r
916 @param [in] pPort The WSDT_PORT structure address\r
917 @param [in] pAddress Address of the socket address\r
918\r
919 @retval EFI_SUCCESS Successfully displayed the address\r
920**/\r
921EFI_STATUS\r
922HttpSendIpAddress (\r
923 IN int SocketFD,\r
924 IN WSDT_PORT * pPort,\r
f6e5cdd5 925 IN struct sockaddr_in6 * pAddress\r
4684b66f 926 );\r
927\r
928/**\r
929 Send a Unicode string\r
930\r
931 @param [in] SocketFD The socket's file descriptor to add to the list.\r
932 @param [in] pPort The WSDT_PORT structure address\r
933 @param [in] pString A zero terminated Unicode string\r
934\r
935 @retval EFI_SUCCESS The request was successfully processed\r
936\r
937**/\r
938EFI_STATUS\r
939HttpSendUnicodeString (\r
940 IN int SocketFD,\r
941 IN WSDT_PORT * pPort,\r
942 IN CONST UINT16 * pString\r
943 );\r
944\r
945/**\r
946 Output a value to the HTML page\r
947\r
948 @param [in] SocketFD Socket file descriptor\r
949 @param [in] pPort The WSDT_PORT structure address\r
950 @param [in] Value Value to display\r
951\r
952 @retval EFI_SUCCESS Successfully displayed the address\r
953**/\r
954EFI_STATUS\r
955HttpSendValue (\r
956 IN int SocketFD,\r
957 IN WSDT_PORT * pPort,\r
958 IN UINT64 Value\r
959 );\r
960\r
961/**\r
962 Display a row containing a decimal value\r
963\r
964 @param [in] SocketFD The socket's file descriptor to add to the list.\r
965 @param [in] pPort The WSDT_PORT structure address\r
966 @param [in] pName Address of a zero terminated name string\r
967 @param [in] Value The value to display\r
968\r
969 @retval EFI_SUCCESS The request was successfully processed\r
970\r
971**/\r
972EFI_STATUS\r
973RowDecimalValue (\r
974 IN int SocketFD,\r
975 IN WSDT_PORT * pPort,\r
976 IN CONST CHAR8 * pName,\r
977 IN UINT64 Value\r
978 );\r
979\r
980/**\r
981 Display a row containing a GUID value\r
982\r
983 @param [in] SocketFD The socket's file descriptor to add to the list.\r
984 @param [in] pPort The WSDT_PORT structure address\r
985 @param [in] pName Address of a zero terminated name string\r
986 @param [in] pGuid Address of the GUID to display\r
987\r
988 @retval EFI_SUCCESS The request was successfully processed\r
989\r
990**/\r
991EFI_STATUS\r
992RowGuid (\r
993 IN int SocketFD,\r
994 IN WSDT_PORT * pPort,\r
995 IN CONST CHAR8 * pName,\r
996 IN CONST EFI_GUID * pGuid\r
997 );\r
998\r
999/**\r
1000 Display a row containing a hex value\r
1001\r
1002 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1003 @param [in] pPort The WSDT_PORT structure address\r
1004 @param [in] pName Address of a zero terminated name string\r
1005 @param [in] Value The value to display\r
1006 @param [in] pWebPage Address of a zero terminated web page name\r
1007\r
1008 @retval EFI_SUCCESS The request was successfully processed\r
1009\r
1010**/\r
1011EFI_STATUS\r
1012RowHexValue (\r
1013 IN int SocketFD,\r
1014 IN WSDT_PORT * pPort,\r
1015 IN CONST CHAR8 * pName,\r
1016 IN UINT64 Value,\r
1017 IN CONST CHAR16 * pWebPage\r
1018 );\r
1019\r
1020/**\r
1021 Display a row containing a pointer\r
1022\r
1023 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1024 @param [in] pPort The WSDT_PORT structure address\r
1025 @param [in] pName Address of a zero terminated name string\r
1026 @param [in] pAddress The address to display\r
1027 @param [in] pWebPage Address of a zero terminated web page name\r
1028\r
1029 @retval EFI_SUCCESS The request was successfully processed\r
1030\r
1031**/\r
1032EFI_STATUS\r
1033RowPointer (\r
1034 IN int SocketFD,\r
1035 IN WSDT_PORT * pPort,\r
1036 IN CONST CHAR8 * pName,\r
1037 IN CONST VOID * pAddress,\r
1038 IN CONST CHAR16 * pWebPage\r
1039 );\r
1040\r
1041/**\r
1042 Display a row containing a revision\r
1043\r
1044 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1045 @param [in] pPort The WSDT_PORT structure address\r
1046 @param [in] pName Address of a zero terminated name string\r
1047 @param [in] Revision The revision to display\r
1048\r
1049 @retval EFI_SUCCESS The request was successfully processed\r
1050\r
1051**/\r
1052EFI_STATUS\r
1053RowRevision (\r
1054 IN int SocketFD,\r
1055 IN WSDT_PORT * pPort,\r
1056 IN CONST CHAR8 * pName,\r
1057 IN UINT32 Revision\r
1058 );\r
1059\r
1060/**\r
1061 Display a row containing a unicode string\r
1062\r
1063 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1064 @param [in] pPort The WSDT_PORT structure address\r
1065 @param [in] pName Address of a zero terminated name string\r
1066 @param [in] pString Address of a zero terminated unicode string\r
1067\r
1068 @retval EFI_SUCCESS The request was successfully processed\r
1069\r
1070**/\r
1071EFI_STATUS\r
1072RowUnicodeString (\r
1073 IN int SocketFD,\r
1074 IN WSDT_PORT * pPort,\r
1075 IN CONST CHAR8 * pName,\r
1076 IN CONST CHAR16 * pString\r
1077 );\r
1078\r
1079/**\r
1080 Start the table page\r
1081\r
1082 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1083 @param [in] pPort The WSDT_PORT structure address\r
1084 @param [in] pName Address of a zero terminated name string\r
1085 @param [in] pTable Address of the table\r
1086\r
1087 @retval EFI_SUCCESS The request was successfully processed\r
1088\r
1089**/\r
1090EFI_STATUS\r
1091TableHeader (\r
1092 IN int SocketFD,\r
1093 IN WSDT_PORT * pPort,\r
1094 IN CONST CHAR16 * pName,\r
1095 IN CONST VOID * pTable\r
1096 );\r
1097\r
1098/**\r
1099 End the table page\r
1100\r
1101 @param [in] SocketFD The socket's file descriptor to add to the list.\r
1102 @param [in] pPort The WSDT_PORT structure address\r
1103 @param [out] pbDone Address to receive the request completion status\r
1104\r
1105 @retval EFI_SUCCESS The request was successfully processed\r
1106\r
1107**/\r
1108EFI_STATUS\r
1109TableTrailer (\r
1110 IN int SocketFD,\r
1111 IN WSDT_PORT * pPort,\r
1112 OUT BOOLEAN *pbDone\r
1113 );\r
1114\r
1115/**\r
1116 HTTP port creation timer routine\r
1117\r
1118 This routine polls the socket layer waiting for the initial network connection\r
1119 which will enable the creation of the HTTP port. The socket layer will manage\r
1120 the coming and going of the network connections after that until the last network\r
1121 connection is broken.\r
1122\r
1123 @param [in] pWebServer The web server control structure address.\r
1124\r
1125**/\r
1126VOID\r
1127WebServerTimer (\r
1128 IN DT_WEB_SERVER * pWebServer\r
1129 );\r
1130\r
1131/**\r
1132 Start the web server port creation timer\r
1133\r
1134 @param [in] pWebServer The web server control structure address.\r
1135\r
1136 @retval EFI_SUCCESS The timer was successfully started.\r
1137 @retval EFI_ALREADY_STARTED The timer is already running.\r
1138 @retval Other The timer failed to start.\r
1139\r
1140**/\r
1141EFI_STATUS\r
1142WebServerTimerStart (\r
1143 IN DT_WEB_SERVER * pWebServer\r
1144 );\r
1145\r
1146/**\r
1147 Stop the web server port creation timer\r
1148\r
1149 @param [in] pWebServer The web server control structure address.\r
1150\r
1151 @retval EFI_SUCCESS The HTTP port timer is stopped\r
1152 @retval Other Failed to stop the HTTP port timer\r
1153\r
1154**/\r
1155EFI_STATUS\r
1156WebServerTimerStop (\r
1157 IN DT_WEB_SERVER * pWebServer\r
1158 );\r
1159\r
1160//------------------------------------------------------------------------------\r
1161// Driver Binding Protocol Support\r
1162//------------------------------------------------------------------------------\r
1163\r
1164/**\r
1165 Stop this driver on Controller by removing NetworkInterfaceIdentifier protocol and\r
1166 closing the DevicePath and PciIo protocols on Controller.\r
1167\r
1168 @param [in] pThis Protocol instance pointer.\r
1169 @param [in] Controller Handle of device to stop driver on.\r
1170 @param [in] NumberOfChildren How many children need to be stopped.\r
1171 @param [in] pChildHandleBuffer Not used.\r
1172\r
1173 @retval EFI_SUCCESS This driver is removed Controller.\r
1174 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r
1175 @retval other This driver was not removed from this device.\r
1176\r
1177**/\r
1178EFI_STATUS\r
1179EFIAPI\r
1180DriverStop (\r
1181 IN EFI_DRIVER_BINDING_PROTOCOL * pThis,\r
1182 IN EFI_HANDLE Controller,\r
1183 IN UINTN NumberOfChildren,\r
1184 IN EFI_HANDLE * pChildHandleBuffer\r
1185 );\r
1186\r
1187//------------------------------------------------------------------------------\r
1188// EFI Component Name Protocol Support\r
1189//------------------------------------------------------------------------------\r
1190\r
1191/**\r
1192 Retrieves a Unicode string that is the user readable name of the driver.\r
1193\r
1194 This function retrieves the user readable name of a driver in the form of a\r
1195 Unicode string. If the driver specified by This has a user readable name in\r
1196 the language specified by Language, then a pointer to the driver name is\r
1197 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
1198 by This does not support the language specified by Language,\r
1199 then EFI_UNSUPPORTED is returned.\r
1200\r
1201 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
1202 EFI_COMPONENT_NAME_PROTOCOL instance.\r
1203 @param [in] pLanguage A pointer to a Null-terminated ASCII string\r
1204 array indicating the language. This is the\r
1205 language of the driver name that the caller is\r
1206 requesting, and it must match one of the\r
1207 languages specified in SupportedLanguages. The\r
1208 number of languages supported by a driver is up\r
1209 to the driver writer. Language is specified\r
1210 in RFC 3066 or ISO 639-2 language code format.\r
1211 @param [out] ppDriverName A pointer to the Unicode string to return.\r
1212 This Unicode string is the name of the\r
1213 driver specified by This in the language\r
1214 specified by Language.\r
1215\r
1216 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
1217 This and the language specified by Language was\r
1218 returned in DriverName.\r
1219 @retval EFI_INVALID_PARAMETER Language is NULL.\r
1220 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
1221 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
1222 the language specified by Language.\r
1223\r
1224**/\r
1225EFI_STATUS\r
1226EFIAPI\r
1227GetDriverName (\r
1228 IN EFI_COMPONENT_NAME_PROTOCOL * pThis,\r
1229 IN CHAR8 * pLanguage,\r
1230 OUT CHAR16 ** ppDriverName\r
1231 );\r
1232\r
1233\r
1234/**\r
1235 Retrieves a Unicode string that is the user readable name of the controller\r
1236 that is being managed by a driver.\r
1237\r
1238 This function retrieves the user readable name of the controller specified by\r
1239 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
1240 driver specified by This has a user readable name in the language specified by\r
1241 Language, then a pointer to the controller name is returned in ControllerName,\r
1242 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
1243 managing the controller specified by ControllerHandle and ChildHandle,\r
1244 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
1245 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
1246\r
1247 @param [in] pThis A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
1248 EFI_COMPONENT_NAME_PROTOCOL instance.\r
1249 @param [in] ControllerHandle The handle of a controller that the driver\r
1250 specified by This is managing. This handle\r
1251 specifies the controller whose name is to be\r
1252 returned.\r
1253 @param [in] ChildHandle The handle of the child controller to retrieve\r
1254 the name of. This is an optional parameter that\r
1255 may be NULL. It will be NULL for device\r
1256 drivers. It will also be NULL for a bus drivers\r
1257 that wish to retrieve the name of the bus\r
1258 controller. It will not be NULL for a bus\r
1259 driver that wishes to retrieve the name of a\r
1260 child controller.\r
1261 @param [in] pLanguage A pointer to a Null-terminated ASCII string\r
1262 array indicating the language. This is the\r
1263 language of the driver name that the caller is\r
1264 requesting, and it must match one of the\r
1265 languages specified in SupportedLanguages. The\r
1266 number of languages supported by a driver is up\r
1267 to the driver writer. Language is specified in\r
1268 RFC 3066 or ISO 639-2 language code format.\r
1269 @param [out] ppControllerName A pointer to the Unicode string to return.\r
1270 This Unicode string is the name of the\r
1271 controller specified by ControllerHandle and\r
1272 ChildHandle in the language specified by\r
1273 Language from the point of view of the driver\r
1274 specified by This.\r
1275\r
1276 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
1277 the language specified by Language for the\r
1278 driver specified by This was returned in\r
1279 DriverName.\r
1280 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
1281 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
1282 EFI_HANDLE.\r
1283 @retval EFI_INVALID_PARAMETER Language is NULL.\r
1284 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
1285 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
1286 managing the controller specified by\r
1287 ControllerHandle and ChildHandle.\r
1288 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
1289 the language specified by Language.\r
1290\r
1291**/\r
1292EFI_STATUS\r
1293EFIAPI\r
1294GetControllerName (\r
1295 IN EFI_COMPONENT_NAME_PROTOCOL * pThis,\r
1296 IN EFI_HANDLE ControllerHandle,\r
1297 IN OPTIONAL EFI_HANDLE ChildHandle,\r
1298 IN CHAR8 * pLanguage,\r
1299 OUT CHAR16 ** ppControllerName\r
1300 );\r
1301\r
1302//------------------------------------------------------------------------------\r
1303\r
1304#endif // _WEB_SERVER_H_\r