]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / ComponentName.c
CommitLineData
772db4bb 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
12\r
13Module Name:\r
14\r
15 ComponentName.c\r
16\r
17Abstract:\r
18\r
19\r
20**/\r
21\r
22#include "Ip4Impl.h"\r
23\r
24//\r
25// EFI Component Name Functions\r
26//\r
27EFI_STATUS\r
28EFIAPI\r
29Ip4ComponentNameGetDriverName (\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
37Ip4ComponentNameGetControllerName (\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 gIp4ComponentName = {\r
49 Ip4ComponentNameGetDriverName,\r
50 Ip4ComponentNameGetControllerName,\r
51 "eng"\r
52};\r
53\r
54static EFI_UNICODE_STRING_TABLE mIp4DriverNameTable[] = {\r
55 {\r
56 "eng",\r
57 L"IP4 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
67Ip4ComponentNameGetDriverName (\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\r
76 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\r
81 identifier. This is the language of the driver name\r
82 that that the caller is requesting, and it must match\r
83 one of the languages specified in SupportedLanguages.\r
84 The number of languages supported by a driver is up to\r
85 the driver writer.\r
86 DriverName - A pointer to the Unicode string to return. This Unicode\r
87 string is the name of the driver specified by This in the\r
88 language specified by Language.\r
89\r
90 Returns:\r
91 EFI_SUCCES - The Unicode string for the Driver specified by This\r
92 and the language specified by Language was returned\r
93 in DriverName.\r
94 EFI_INVALID_PARAMETER - Language is NULL.\r
95 EFI_INVALID_PARAMETER - DriverName is NULL.\r
96 EFI_UNSUPPORTED - The driver specified by This does not support the\r
97 language specified by Language.\r
98\r
99--*/\r
100{\r
101 return LookupUnicodeString (\r
102 Language,\r
103 gIp4ComponentName.SupportedLanguages,\r
104 mIp4DriverNameTable,\r
105 DriverName\r
106 );\r
107\r
108}\r
109\r
110EFI_STATUS\r
111EFIAPI\r
112Ip4ComponentNameGetControllerName (\r
113 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
114 IN EFI_HANDLE ControllerHandle,\r
115 IN EFI_HANDLE ChildHandle OPTIONAL,\r
116 IN CHAR8 *Language,\r
117 OUT CHAR16 **ControllerName\r
118 )\r
119/*++\r
120\r
121 Routine Description:\r
122 Retrieves a Unicode string that is the user readable name of\r
123 the controller that is being managed by an EFI Driver.\r
124\r
125 Arguments:\r
126 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
127 ControllerHandle - The handle of a controller that the driver specified by\r
128 This is managing. This handle specifies the controller\r
129 whose name is to be returned.\r
130 ChildHandle - The handle of the child controller to retrieve the name\r
131 of. This is an optional parameter that may be NULL. It\r
132 will be NULL for device drivers. It will also be NULL\r
133 for a bus drivers that wish to retrieve the name of the\r
134 bus controller. It will not be NULL for a bus driver\r
135 that wishes to retrieve the name of a child controller.\r
136 Language - A pointer to a three character ISO 639-2 language\r
137 identifier. This is the language of the controller name\r
138 that that the caller is requesting, and it must match one\r
139 of the languages specified in SupportedLanguages. The\r
140 number of languages supported by a driver is up to the\r
141 driver writer.\r
142 ControllerName - A pointer to the Unicode string to return. This Unicode\r
143 string is the name of the controller specified by\r
144 ControllerHandle and ChildHandle in the language\r
145 specified by Language from the point of view of the\r
146 driver specified by This.\r
147\r
148 Returns:\r
149 EFI_SUCCESS - The Unicode string for the user readable name in the\r
150 language specified by Language for the driver\r
151 specified by This was returned in DriverName.\r
152 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
153 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not\r
154 a valid EFI_HANDLE.\r
155 EFI_INVALID_PARAMETER - Language is NULL.\r
156 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
157 EFI_UNSUPPORTED - The driver specified by This is not currently\r
158 managing the controller specified by\r
159 ControllerHandle and ChildHandle.\r
160 EFI_UNSUPPORTED - The driver specified by This does not support the\r
161 language specified by Language.\r
162\r
163--*/\r
164{\r
165 return EFI_UNSUPPORTED;\r
166}\r