]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / SnpDxe / ComponentName.c
CommitLineData
8a67d61d 1/** @file\r
2\r
3Copyright (c) 2004 - 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 ComponentName.c\r
15\r
16Abstract:\r
17\r
18\r
19**/\r
20\r
21\r
22\r
23#include "Snp.h"\r
24\r
25//\r
26// EFI Component Name Functions\r
27//\r
28EFI_STATUS\r
29EFIAPI\r
30SimpleNetworkComponentNameGetDriverName (\r
31 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
32 IN CHAR8 *Language,\r
33 OUT CHAR16 **DriverName\r
34 );\r
35\r
36EFI_STATUS\r
37EFIAPI\r
38SimpleNetworkComponentNameGetControllerName (\r
39 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
40 IN EFI_HANDLE ControllerHandle,\r
41 IN EFI_HANDLE ChildHandle OPTIONAL,\r
42 IN CHAR8 *Language,\r
43 OUT CHAR16 **ControllerName\r
44 );\r
45\r
46//\r
47// EFI Component Name Protocol\r
48//\r
49EFI_COMPONENT_NAME_PROTOCOL gSimpleNetworkComponentName = {\r
50 SimpleNetworkComponentNameGetDriverName,\r
51 SimpleNetworkComponentNameGetControllerName,\r
52 "eng"\r
53};\r
54\r
55static EFI_UNICODE_STRING_TABLE mSimpleNetworkDriverNameTable[] = {\r
56 {\r
57 "eng",\r
58 L"Simple Network Protocol Driver"\r
59 },\r
60 {\r
61 NULL,\r
62 NULL\r
63 }\r
64};\r
65\r
66EFI_STATUS\r
67EFIAPI\r
68SimpleNetworkComponentNameGetDriverName (\r
69 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
70 IN CHAR8 *Language,\r
71 OUT CHAR16 **DriverName\r
72 )\r
73/*++\r
74\r
75 Routine Description:\r
76 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
77\r
78 Arguments:\r
79 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
80 Language - A pointer to a three character ISO 639-2 language identifier.\r
81 This is the language of the driver name that that the caller\r
82 is requesting, and it must match one of the languages specified\r
83 in SupportedLanguages. The number of languages supported by a\r
84 driver is up to the driver writer.\r
85 DriverName - A pointer to the Unicode string to return. This Unicode string\r
86 is the name of the driver specified by This in the language\r
87 specified by Language.\r
88\r
89 Returns:\r
90 EFI_SUCCESS - The Unicode string for the Driver specified by This\r
91 and the language specified by Language was returned\r
92 in DriverName.\r
93 EFI_INVALID_PARAMETER - Language is NULL.\r
94 EFI_INVALID_PARAMETER - DriverName is NULL.\r
95 EFI_UNSUPPORTED - The driver specified by This does not support the\r
96 language specified by Language.\r
97\r
98--*/\r
99{\r
100 return LookupUnicodeString (\r
101 Language,\r
102 gSimpleNetworkComponentName.SupportedLanguages,\r
103 mSimpleNetworkDriverNameTable,\r
104 DriverName\r
105 );\r
106}\r
107\r
108EFI_STATUS\r
109EFIAPI\r
110SimpleNetworkComponentNameGetControllerName (\r
111 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
112 IN EFI_HANDLE ControllerHandle,\r
113 IN EFI_HANDLE ChildHandle OPTIONAL,\r
114 IN CHAR8 *Language,\r
115 OUT CHAR16 **ControllerName\r
116 )\r
117/*++\r
118\r
119 Routine Description:\r
120 Retrieves a Unicode string that is the user readable name of the controller\r
121 that is being managed by an EFI Driver.\r
122\r
123 Arguments:\r
124 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
125 ControllerHandle - The handle of a controller that the driver specified by\r
126 This is managing. This handle specifies the controller\r
127 whose name is to be returned.\r
128 ChildHandle - The handle of the child controller to retrieve the name\r
129 of. This is an optional parameter that may be NULL. It\r
130 will be NULL for device drivers. It will also be NULL\r
131 for a bus drivers that wish to retrieve the name of the\r
132 bus controller. It will not be NULL for a bus driver\r
133 that wishes to retrieve the name of a child controller.\r
134 Language - A pointer to a three character ISO 639-2 language\r
135 identifier. This is the language of the controller name\r
136 that that the caller is requesting, and it must match one\r
137 of the languages specified in SupportedLanguages. The\r
138 number of languages supported by a driver is up to the\r
139 driver writer.\r
140 ControllerName - A pointer to the Unicode string to return. This Unicode\r
141 string is the name of the controller specified by\r
142 ControllerHandle and ChildHandle in the language specified\r
143 by Language from the point of view of the driver specified\r
144 by This.\r
145\r
146 Returns:\r
147 EFI_SUCCESS - The Unicode string for the user readable name in the\r
148 language specified by Language for the driver\r
149 specified by This was returned in DriverName.\r
150 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
151 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
152 EFI_INVALID_PARAMETER - Language is NULL.\r
153 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
154 EFI_UNSUPPORTED - The driver specified by This is not currently managing\r
155 the controller specified by ControllerHandle and\r
156 ChildHandle.\r
157 EFI_UNSUPPORTED - The driver specified by This does not support the\r
158 language specified by Language.\r
159\r
160--*/\r
161{\r
162 return EFI_UNSUPPORTED;\r
163}\r