]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / ComponentName.c
CommitLineData
8a67d61d 1/** @file\r
2\r
3Copyright (c) 2005 - 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#include "MnpDriver.h"\r
23\r
24//\r
25// EFI Component Name Functions\r
26//\r
27EFI_STATUS\r
28EFIAPI\r
29MnpComponentNameGetDriverName (\r
30 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
31 IN CHAR8 *Language,\r
32 OUT CHAR16 **DriverName\r
33 );\r
34\r
35EFI_STATUS\r
36EFIAPI\r
37MnpComponentNameGetControllerName (\r
38 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
39 IN EFI_HANDLE ControllerHandle,\r
40 IN EFI_HANDLE ChildHandle OPTIONAL,\r
41 IN CHAR8 *Language,\r
42 OUT CHAR16 **ControllerName\r
43 );\r
44\r
45//\r
46// EFI Component Name Protocol\r
47//\r
48EFI_COMPONENT_NAME_PROTOCOL gMnpComponentName = {\r
49 MnpComponentNameGetDriverName,\r
50 MnpComponentNameGetControllerName,\r
51 "eng"\r
52};\r
53\r
54STATIC EFI_UNICODE_STRING_TABLE mMnpDriverNameTable[] = {\r
55 {\r
56 "eng",\r
57 L"MNP Network Service Driver"\r
58 },\r
59 {\r
60 NULL,\r
61 NULL\r
62 }\r
63};\r
64\r
65EFI_STATUS\r
66EFIAPI\r
67MnpComponentNameGetDriverName (\r
68 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
69 IN CHAR8 *Language,\r
70 OUT CHAR16 **DriverName\r
71 )\r
72/*++\r
73\r
74 Routine Description:\r
75 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
76\r
77 Arguments:\r
78 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
79 Language - A pointer to a three character ISO 639-2 language identifier.\r
80 This is the language of the driver name that that the caller\r
81 is requesting, and it must match one of the languages specified\r
82 in SupportedLanguages. The number of languages supported by a\r
83 driver is up to the driver writer.\r
84 DriverName - A pointer to the Unicode string to return. This Unicode string\r
85 is the name of the driver specified by This in the language\r
86 specified by Language.\r
87\r
88 Returns:\r
89 EFI_SUCCES - The Unicode string for the Driver specified by This\r
90 and the language specified by Language was returned\r
91 in DriverName.\r
92 EFI_INVALID_PARAMETER - Language is NULL.\r
93 EFI_INVALID_PARAMETER - DriverName is NULL.\r
94 EFI_UNSUPPORTED - The driver specified by This does not support the\r
95 language specified by Language.\r
96\r
97--*/\r
98{\r
99 return LookupUnicodeString (\r
100 Language,\r
101 gMnpComponentName.SupportedLanguages,\r
102 mMnpDriverNameTable,\r
103 DriverName\r
104 );\r
105}\r
106\r
107EFI_STATUS\r
108EFIAPI\r
109MnpComponentNameGetControllerName (\r
110 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
111 IN EFI_HANDLE ControllerHandle,\r
112 IN EFI_HANDLE ChildHandle OPTIONAL,\r
113 IN CHAR8 *Language,\r
114 OUT CHAR16 **ControllerName\r
115 )\r
116/*++\r
117\r
118 Routine Description:\r
119 Retrieves a Unicode string that is the user readable name of the controller\r
120 that is being managed by an EFI Driver.\r
121\r
122 Arguments:\r
123 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
124 ControllerHandle - The handle of a controller that the driver specified by\r
125 This is managing. This handle specifies the controller\r
126 whose name is to be returned.\r
127 ChildHandle - The handle of the child controller to retrieve the name\r
128 of. This is an optional parameter that may be NULL. It\r
129 will be NULL for device drivers. It will also be NULL\r
130 for a bus drivers that wish to retrieve the name of the\r
131 bus controller. It will not be NULL for a bus driver\r
132 that wishes to retrieve the name of a child controller.\r
133 Language - A pointer to a three character ISO 639-2 language\r
134 identifier. This is the language of the controller name\r
135 that that the caller is requesting, and it must match one\r
136 of the languages specified in SupportedLanguages. The\r
137 number of languages supported by a driver is up to the\r
138 driver writer.\r
139 ControllerName - A pointer to the Unicode string to return. This Unicode\r
140 string is the name of the controller specified by\r
141 ControllerHandle and ChildHandle in the language specified\r
142 by Language from the point of view of the driver specified\r
143 by This.\r
144\r
145 Returns:\r
146 EFI_SUCCESS - The Unicode string for the user readable name in the\r
147 language specified by Language for the driver\r
148 specified by This was returned in DriverName.\r
149 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
150 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
151 EFI_INVALID_PARAMETER - Language is NULL.\r
152 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
153 EFI_UNSUPPORTED - The driver specified by This is not currently managing\r
154 the controller specified by ControllerHandle and\r
155 ChildHandle.\r
156 EFI_UNSUPPORTED - The driver specified by This does not support the\r
157 language specified by Language.\r
158\r
159--*/\r
160{\r
161 return EFI_UNSUPPORTED;\r
162}\r