]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h
Clean codes per ECC.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / ArpDxe / ArpImpl.h
1 /** @file
2
3 Copyright (c) 2006 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 ArpImpl.h
15
16 Abstract:
17
18
19 **/
20
21 #ifndef _ARP_IMPL_H_
22 #define _ARP_IMPL_H_
23
24
25 #include <PiDxe.h>
26
27 #include <Protocol/Arp.h>
28 #include <Protocol/ManagedNetwork.h>
29 #include <Protocol/ServiceBinding.h>
30
31 #include <Library/DebugLib.h>
32 #include <Library/UefiDriverEntryPoint.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/UefiLib.h>
35 #include <Library/NetLib.h>
36 #include <Library/BaseLib.h>
37 #include <Library/BaseMemoryLib.h>
38 #include <Library/MemoryAllocationLib.h>
39
40
41 #define ARP_ETHER_PROTO_TYPE 0x0806
42 #define IPV4_ETHER_PROTO_TYPE 0x0800
43 #define IPV6_ETHER_PROTO_TYPE 0x86DD
44
45 #define ARP_OPCODE_REQUEST 0x0001
46 #define ARP_OPCODE_REPLY 0x0002
47
48 #define ARP_DEFAULT_TIMEOUT_VALUE (400 * TICKS_PER_SECOND)
49 #define ARP_DEFAULT_RETRY_COUNT 2
50 #define ARP_DEFAULT_RETRY_INTERVAL (5 * TICKS_PER_MS)
51 #define ARP_PERIODIC_TIMER_INTERVAL (500 * TICKS_PER_MS)
52
53 #pragma pack(1)
54 typedef struct _ARP_HEAD {
55 UINT16 HwType;
56 UINT16 ProtoType;
57 UINT8 HwAddrLen;
58 UINT8 ProtoAddrLen;
59 UINT16 OpCode;
60 } ARP_HEAD;
61 #pragma pack()
62
63 typedef struct _ARP_ADDRESS {
64 UINT8 *SenderHwAddr;
65 UINT8 *SenderProtoAddr;
66 UINT8 *TargetHwAddr;
67 UINT8 *TargetProtoAddr;
68 } ARP_ADDRESS;
69
70 #define MATCH_SW_ADDRESS 0x1
71 #define MATCH_HW_ADDRESS 0x2
72
73 typedef enum {
74 ByNone = 0,
75 ByProtoAddress = MATCH_SW_ADDRESS,
76 ByHwAddress = MATCH_HW_ADDRESS,
77 ByBoth = MATCH_SW_ADDRESS | MATCH_HW_ADDRESS
78 } FIND_OPTYPE;
79
80 #define ARP_INSTANCE_DATA_SIGNATURE EFI_SIGNATURE_32('A', 'R', 'P', 'I')
81
82 #define ARP_INSTANCE_DATA_FROM_THIS(a) \
83 CR ( \
84 (a), \
85 ARP_INSTANCE_DATA, \
86 ArpProto, \
87 ARP_INSTANCE_DATA_SIGNATURE \
88 )
89
90 typedef struct _ARP_SERVICE_DATA ARP_SERVICE_DATA;
91
92 typedef struct _ARP_INSTANCE_DATA {
93 UINT32 Signature;
94 ARP_SERVICE_DATA *ArpService;
95 EFI_HANDLE Handle;
96 EFI_ARP_PROTOCOL ArpProto;
97 LIST_ENTRY List;
98 EFI_ARP_CONFIG_DATA ConfigData;
99 BOOLEAN Configured;
100 BOOLEAN Destroyed;
101 } ARP_INSTANCE_DATA;
102
103 #define ARP_SERVICE_DATA_SIGNATURE EFI_SIGNATURE_32('A', 'R', 'P', 'S')
104
105 #define ARP_SERVICE_DATA_FROM_THIS(a) \
106 CR ( \
107 (a), \
108 ARP_SERVICE_DATA, \
109 ServiceBinding, \
110 ARP_SERVICE_DATA_SIGNATURE \
111 )
112
113 struct _ARP_SERVICE_DATA {
114 UINT32 Signature;
115 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
116
117 EFI_HANDLE MnpChildHandle;
118 EFI_HANDLE ImageHandle;
119 EFI_HANDLE ControllerHandle;
120
121 EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
122 EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
123 EFI_MANAGED_NETWORK_COMPLETION_TOKEN RxToken;
124
125 EFI_SIMPLE_NETWORK_MODE SnpMode;
126
127 UINTN ChildrenNumber;
128 LIST_ENTRY ChildrenList;
129
130 LIST_ENTRY PendingRequestTable;
131 LIST_ENTRY DeniedCacheTable;
132 LIST_ENTRY ResolvedCacheTable;
133
134 EFI_EVENT PeriodicTimer;
135 };
136
137 typedef struct _USER_REQUEST_CONTEXT {
138 LIST_ENTRY List;
139 ARP_INSTANCE_DATA *Instance;
140 EFI_EVENT UserRequestEvent;
141 VOID *UserHwAddrBuffer;
142 } USER_REQUEST_CONTEXT;
143
144 #define ARP_MAX_PROTOCOL_ADDRESS_LEN sizeof(EFI_IP_ADDRESS)
145 #define ARP_MAX_HARDWARE_ADDRESS_LEN sizeof(EFI_MAC_ADDRESS)
146
147 typedef struct _NET_ARP_ADDRESS {
148 UINT16 Type;
149 UINT8 Length;
150 UINT8 *AddressPtr;
151 union {
152 UINT8 ProtoAddress[ARP_MAX_PROTOCOL_ADDRESS_LEN];
153 UINT8 HwAddress[ARP_MAX_HARDWARE_ADDRESS_LEN];
154 } Buffer;
155 } NET_ARP_ADDRESS;
156
157 typedef enum {
158 Hardware,
159 Protocol
160 } ARP_ADDRESS_TYPE;
161
162 typedef struct _ARP_CACHE_ENTRY {
163 LIST_ENTRY List;
164
165 UINT32 RetryCount;
166 UINT32 DefaultDecayTime;
167 UINT32 DecayTime;
168 UINT32 NextRetryTime;
169
170 NET_ARP_ADDRESS Addresses[2];
171
172 LIST_ENTRY UserRequestList;
173 } ARP_CACHE_ENTRY;
174
175 /**
176 This function is used to assign a station address to the ARP cache for this instance
177 of the ARP driver. A call to this function with the ConfigData field set to NULL
178 will reset this ARP instance.
179
180 @param This Pointer to the EFI_ARP_PROTOCOL instance.
181 @param ConfigData Pointer to the EFI_ARP_CONFIG_DATA structure.
182
183 @retval EFI_SUCCESS The new station address was successfully
184 registered.
185 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
186 This is NULL. SwAddressLength is zero when
187 ConfigData is not NULL. StationAddress is NULL
188 when ConfigData is not NULL.
189 @retval EFI_ACCESS_DENIED The SwAddressType, SwAddressLength, or
190 StationAddress is different from the one that is
191 already registered.
192 @retval EFI_OUT_OF_RESOURCES Storage for the new StationAddress could not be
193 allocated.
194
195 **/
196 EFI_STATUS
197 EFIAPI
198 ArpConfigure (
199 IN EFI_ARP_PROTOCOL *This,
200 IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
201 );
202
203 /**
204 This function is used to insert entries into the ARP cache.
205
206 @param This Pointer to the EFI_ARP_PROTOCOL instance.
207 @param DenyFlag Set to TRUE if this entry is a deny entry. Set to
208 FALSE if this entry is a normal entry.
209 @param TargetSwAddress Pointer to a protocol address to add (or deny).
210 May be set to NULL if DenyFlag is TRUE.
211 @param TargetHwAddress Pointer to a hardware address to add (or deny).
212 May be set to NULL if DenyFlag is TRUE.
213 @param TimeoutValue Time in 100-ns units that this entry will remain
214 in the ARP cache. A value of zero means that the
215 entry is permanent. A nonzero value will override
216 the one given by Configure() if the entry to be
217 added is a dynamic entry.
218 @param Overwrite If TRUE, the matching cache entry will be
219 overwritten with the supplied parameters. If
220 FALSE, EFI_ACCESS_DENIED is returned if the
221 corresponding cache entry already exists.
222
223 @retval EFI_SUCCESS The entry has been added or updated.
224 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
225 This is NULL. DenyFlag is FALSE and
226 TargetHwAddress is NULL. DenyFlag is FALSE and
227 TargetSwAddress is NULL. TargetHwAddress is NULL
228 and TargetSwAddress is NULL. Both TargetSwAddress
229 and TargetHwAddress are not NULL when DenyFlag is
230 TRUE.
231 @retval EFI_OUT_OF_RESOURCES The new ARP cache entry could not be allocated.
232 @retval EFI_ACCESS_DENIED The ARP cache entry already exists and Overwrite
233 is not true.
234 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
235
236 **/
237 EFI_STATUS
238 EFIAPI
239 ArpAdd (
240 IN EFI_ARP_PROTOCOL *This,
241 IN BOOLEAN DenyFlag,
242 IN VOID *TargetSwAddress OPTIONAL,
243 IN VOID *TargetHwAddress OPTIONAL,
244 IN UINT32 TimeoutValue,
245 IN BOOLEAN Overwrite
246 );
247
248 /**
249 This function searches the ARP cache for matching entries and allocates a buffer into
250 which those entries are copied.
251
252 @param This Pointer to the EFI_ARP_PROTOCOL instance.
253 @param BySwAddress Set to TRUE to look for matching software protocol
254 addresses. Set to FALSE to look for matching
255 hardware protocol addresses.
256 @param AddressBuffer Pointer to address buffer. Set to NULL to match
257 all addresses.
258 @param EntryLength The size of an entry in the entries buffer.
259 @param EntryCount The number of ARP cache entries that are found by
260 the specified criteria.
261 @param Entries Pointer to the buffer that will receive the ARP
262 cache entries.
263 @param Refresh Set to TRUE to refresh the timeout value of the
264 matching ARP cache entry.
265
266 @retval EFI_SUCCESS The requested ARP cache entries were copied into
267 the buffer.
268 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
269 This is NULL. Both EntryCount and EntryLength are
270 NULL, when Refresh is FALSE.
271 @retval EFI_NOT_FOUND No matching entries were found.
272 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
273
274 **/
275 EFI_STATUS
276 EFIAPI
277 ArpFind (
278 IN EFI_ARP_PROTOCOL *This,
279 IN BOOLEAN BySwAddress,
280 IN VOID *AddressBuffer OPTIONAL,
281 OUT UINT32 *EntryLength OPTIONAL,
282 OUT UINT32 *EntryCount OPTIONAL,
283 OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
284 IN BOOLEAN Refresh
285 );
286
287 /**
288 This function removes specified ARP cache entries.
289
290 @param This Pointer to the EFI_ARP_PROTOCOL instance.
291 @param BySwAddress Set to TRUE to delete matching protocol addresses.
292 Set to FALSE to delete matching hardware
293 addresses.
294 @param AddressBuffer Pointer to the address buffer that is used as a
295 key to look for the cache entry. Set to NULL to
296 delete all entries.
297
298 @retval EFI_SUCCESS The entry was removed from the ARP cache.
299 @retval EFI_INVALID_PARAMETER This is NULL.
300 @retval EFI_NOT_FOUND The specified deletion key was not found.
301 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
302
303 **/
304 EFI_STATUS
305 EFIAPI
306 ArpDelete (
307 IN EFI_ARP_PROTOCOL *This,
308 IN BOOLEAN BySwAddress,
309 IN VOID *AddressBuffer OPTIONAL
310 );
311
312 /**
313 This function delete all dynamic entries from the ARP cache that match the specified
314 software protocol type.
315
316 @param This Pointer to the EFI_ARP_PROTOCOL instance.
317
318 @retval EFI_SUCCESS The cache has been flushed.
319 @retval EFI_INVALID_PARAMETER This is NULL.
320 @retval EFI_NOT_FOUND There are no matching dynamic cache entries.
321 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
322
323 **/
324 EFI_STATUS
325 EFIAPI
326 ArpFlush (
327 IN EFI_ARP_PROTOCOL *This
328 );
329
330 /**
331 This function tries to resolve the TargetSwAddress and optionally returns a
332 TargetHwAddress if it already exists in the ARP cache.
333
334 @param This Pointer to the EFI_ARP_PROTOCOL instance.
335 @param TargetSwAddress Pointer to the protocol address to resolve.
336 @param ResolvedEvent Pointer to the event that will be signaled when
337 the address is resolved or some error occurs.
338 @param TargetHwAddress Pointer to the buffer for the resolved hardware
339 address in network byte order.
340
341 @retval EFI_SUCCESS The data is copied from the ARP cache into the
342 TargetHwAddress buffer.
343 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
344 This is NULL. TargetHwAddress is NULL.
345 @retval EFI_ACCESS_DENIED The requested address is not present in the normal
346 ARP cache but is present in the deny address list.
347 Outgoing traffic to that address is forbidden.
348 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
349 @retval EFI_NOT_READY The request has been started and is not finished.
350
351 **/
352 EFI_STATUS
353 EFIAPI
354 ArpRequest (
355 IN EFI_ARP_PROTOCOL *This,
356 IN VOID *TargetSwAddress OPTIONAL,
357 IN EFI_EVENT ResolvedEvent OPTIONAL,
358 OUT VOID *TargetHwAddress
359 );
360
361 /**
362 This function aborts the previous ARP request (identified by This, TargetSwAddress
363 and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
364
365 @param This Pointer to the EFI_ARP_PROTOCOL instance.
366 @param TargetSwAddress Pointer to the protocol address in previous
367 request session.
368 @param ResolvedEvent Pointer to the event that is used as the
369 notification event in previous request session.
370
371 @retval EFI_SUCCESS The pending request session(s) is/are aborted and
372 corresponding event(s) is/are signaled.
373 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
374 This is NULL. TargetSwAddress is not NULL and
375 ResolvedEvent is NULL. TargetSwAddress is NULL and
376 ResolvedEvent is not NULL.
377 @retval EFI_NOT_STARTED The ARP driver instance has not been configured.
378 @retval EFI_NOT_FOUND The request is not issued by
379 EFI_ARP_PROTOCOL.Request().
380
381 **/
382 EFI_STATUS
383 EFIAPI
384 ArpCancel (
385 IN EFI_ARP_PROTOCOL *This,
386 IN VOID *TargetSwAddress OPTIONAL,
387 IN EFI_EVENT ResolvedEvent OPTIONAL
388 );
389
390 /**
391 Configure the instance using the ConfigData. ConfigData is already validated.
392
393 @param Instance Pointer to the instance context data to be
394 configured.
395 @param ConfigData Pointer to the configuration data used to
396 configure the instance.
397
398 @retval EFI_SUCCESS The instance is configured with the ConfigData.
399 @retval EFI_ACCESS_DENIED The instance is already configured and the
400 ConfigData tries to reset some unchangeable
401 fields.
402 @retval EFI_INVALID_PARAMETER The ConfigData provides a non-unicast IPv4 address
403 when the SwAddressType is IPv4.
404 @retval EFI_OUT_OF_RESOURCES The instance fails to configure due to memory
405 limitation.
406
407 **/
408 EFI_STATUS
409 ArpConfigureInstance (
410 IN ARP_INSTANCE_DATA *Instance,
411 IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
412 );
413
414 /**
415 Find the CacheEntry, using ProtocolAddress or HardwareAddress or both, as the keyword,
416 in the DeniedCacheTable.
417
418 @param ArpService Pointer to the arp service context data.
419 @param ProtocolAddress Pointer to the protocol address.
420 @param HardwareAddress Pointer to the hardware address.
421
422 @return Pointer to the matched cache entry, if NULL no match is found.
423
424 **/
425 ARP_CACHE_ENTRY *
426 ArpFindDeniedCacheEntry (
427 IN ARP_SERVICE_DATA *ArpService,
428 IN NET_ARP_ADDRESS *ProtocolAddress OPTIONAL,
429 IN NET_ARP_ADDRESS *HardwareAddress OPTIONAL
430 );
431
432 /**
433 Find the CacheEntry which matches the requirements in the specified CacheTable.
434
435 @param CacheTable Pointer to the arp cache table.
436 @param StartEntry Pointer to the start entry this search begins with
437 in the cache table.
438 @param FindOpType The search type.
439 @param ProtocolAddress Pointer to the protocol address to match.
440 @param HardwareAddress Pointer to the hardware address to match.
441
442 @return Pointer to the matched arp cache entry, if NULL, no match is found.
443
444 **/
445 ARP_CACHE_ENTRY *
446 ArpFindNextCacheEntryInTable (
447 IN LIST_ENTRY *CacheTable,
448 IN LIST_ENTRY *StartEntry,
449 IN FIND_OPTYPE FindOpType,
450 IN NET_ARP_ADDRESS *ProtocolAddress OPTIONAL,
451 IN NET_ARP_ADDRESS *HardwareAddress OPTIONAL
452 );
453
454 /**
455 Allocate a cache entry and initialize it.
456
457 @param Instance Pointer to the instance context data.
458
459 @return Pointer to the new created cache entry.
460
461 **/
462 ARP_CACHE_ENTRY *
463 ArpAllocCacheEntry (
464 IN ARP_INSTANCE_DATA *Instance
465 );
466
467 /**
468 Fill the addresses in the CacheEntry using the information passed in by
469 HwAddr and SwAddr.
470
471 @param CacheEntry Pointer to the cache entry.
472 @param HwAddr Pointer to the software address.
473 @param SwAddr Pointer to the hardware address.
474
475 @return None.
476
477 **/
478 VOID
479 ArpFillAddressInCacheEntry (
480 IN ARP_CACHE_ENTRY *CacheEntry,
481 IN NET_ARP_ADDRESS *HwAddr OPTIONAL,
482 IN NET_ARP_ADDRESS *SwAddr OPTIONAL
483 );
484
485 /**
486 Turn the CacheEntry into the resolved status.
487
488 @param CacheEntry Pointer to the resolved cache entry.
489 @param Instance Pointer to the instance context data.
490 @param UserEvent Pointer to the UserEvent to notify.
491
492 @return The count of notifications sent to the instance.
493
494 **/
495 UINTN
496 ArpAddressResolved (
497 IN ARP_CACHE_ENTRY *CacheEntry,
498 IN ARP_INSTANCE_DATA *Instance OPTIONAL,
499 IN EFI_EVENT UserEvent OPTIONAL
500 );
501
502 /**
503 Delete cache entries in all the cache tables.
504
505 @param Instance Pointer to the instance context data.
506 @param BySwAddress Delete the cache entry by software address or by
507 hardware address.
508 @param AddressBuffer Pointer to the buffer containing the address to
509 match for the deletion.
510 @param Force This deletion is forced or not.
511
512 @return The count of the deleted cache entries.
513
514 **/
515 UINTN
516 ArpDeleteCacheEntry (
517 IN ARP_INSTANCE_DATA *Instance,
518 IN BOOLEAN BySwAddress,
519 IN UINT8 *AddressBuffer OPTIONAL,
520 IN BOOLEAN Force
521 );
522
523 /**
524 Send out an arp frame using the CachEntry and the ArpOpCode.
525
526 @param Instance Pointer to the instance context data.
527 @param CacheEntry Pointer to the configuration data used to
528 configure the instance.
529 @param ArpOpCode The opcode used to send out this Arp frame, either
530 request or reply.
531
532 @return None.
533
534 **/
535 VOID
536 ArpSendFrame (
537 IN ARP_INSTANCE_DATA *Instance,
538 IN ARP_CACHE_ENTRY *CacheEntry,
539 IN UINT16 ArpOpCode
540 );
541
542 /**
543 Initialize the instance context data.
544
545 @param ArpService Pointer to the arp service context data this
546 instance belongs to.
547 @param Instance Pointer to the instance context data.
548
549 @return None.
550
551 **/
552 VOID
553 ArpInitInstance (
554 IN ARP_SERVICE_DATA *ArpService,
555 IN ARP_INSTANCE_DATA *Instance
556 );
557
558 /**
559 Process the Arp packets received from Mnp, the procedure conforms to RFC826.
560
561 @param Context Pointer to the context data registerd to the
562 Event.
563
564 @return None.
565
566 **/
567 VOID
568 EFIAPI
569 ArpOnFrameRcvdDpc (
570 IN VOID *Context
571 );
572
573 /**
574 Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.
575
576 @param Event The Event this notify function registered to.
577 @param Context Pointer to the context data registerd to the
578 Event.
579
580 @return None.
581
582 **/
583 VOID
584 EFIAPI
585 ArpOnFrameRcvd (
586 IN EFI_EVENT Event,
587 IN VOID *Context
588 );
589
590 /**
591 Process the already sent arp packets.
592
593 @param Context Pointer to the context data registerd to the
594 Event.
595
596 @return None.
597
598 **/
599 VOID
600 EFIAPI
601 ArpOnFrameSentDpc (
602 IN VOID *Context
603 );
604
605 /**
606 Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.
607
608 @param Event The Event this notify function registered to.
609 @param Context Pointer to the context data registerd to the
610 Event.
611
612 @return None.
613
614 **/
615 VOID
616 EFIAPI
617 ArpOnFrameSent (
618 IN EFI_EVENT Event,
619 IN VOID *Context
620 );
621
622 /**
623 Process the arp cache olding and drive the retrying arp requests.
624
625 @param Event The Event this notify function registered to.
626 @param Context Pointer to the context data registerd to the
627 Event.
628
629 @return None.
630
631 **/
632 VOID
633 EFIAPI
634 ArpTimerHandler (
635 IN EFI_EVENT Event,
636 IN VOID *Context
637 );
638
639 /**
640 Cancel the arp request.
641
642 @param Instance Pointer to the instance context data.
643 @param TargetSwAddress Pointer to the buffer containing the target
644 software address to match the arp request.
645 @param UserEvent The user event used to notify this request
646 cancellation.
647
648 @return The count of the cancelled requests.
649
650 **/
651 UINTN
652 ArpCancelRequest (
653 IN ARP_INSTANCE_DATA *Instance,
654 IN VOID *TargetSwAddress OPTIONAL,
655 IN EFI_EVENT UserEvent OPTIONAL
656 );
657
658 /**
659 Find the cache entry in the cache table.
660
661 @param Instance Pointer to the instance context data.
662 @param BySwAddress Set to TRUE to look for matching software protocol
663 addresses. Set to FALSE to look for matching
664 hardware protocol addresses.
665 @param AddressBuffer Pointer to address buffer. Set to NULL to match
666 all addresses.
667 @param EntryLength The size of an entry in the entries buffer.
668 @param EntryCount The number of ARP cache entries that are found by
669 the specified criteria.
670 @param Entries Pointer to the buffer that will receive the ARP
671 cache entries.
672 @param Refresh Set to TRUE to refresh the timeout value of the
673 matching ARP cache entry.
674
675 @retval EFI_SUCCESS The requested ARP cache entries are copied into
676 the buffer.
677 @retval EFI_NOT_FOUND No matching entries found.
678 @retval EFI_OUT_OF_RESOURCE There is a memory allocation failure.
679
680 **/
681 EFI_STATUS
682 ArpFindCacheEntry (
683 IN ARP_INSTANCE_DATA *Instance,
684 IN BOOLEAN BySwAddress,
685 IN VOID *AddressBuffer OPTIONAL,
686 OUT UINT32 *EntryLength OPTIONAL,
687 OUT UINT32 *EntryCount OPTIONAL,
688 OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
689 IN BOOLEAN Refresh
690 );
691
692 #endif
693