TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6If.c
Go to the documentation of this file.
1
10#include "Ip6Impl.h"
11
19VOID
20EFIAPI
22 IN EFI_EVENT Event,
23 IN VOID *Context
24 );
25
38BOOLEAN
40 IN IP6_LINK_TX_TOKEN *Frame,
41 IN VOID *Context
42 )
43{
44 if (Frame->IpInstance == (IP6_PROTOCOL *)Context) {
45 return TRUE;
46 }
47
48 return FALSE;
49}
50
76 IN IP6_INTERFACE *Interface,
77 IN EFI_IPv6_ADDRESS *Ip6Addr,
78 IN BOOLEAN IsAnycast,
79 IN UINT8 PrefixLength,
80 IN UINT32 ValidLifetime,
81 IN UINT32 PreferredLifetime,
82 IN IP6_DAD_CALLBACK DadCallback OPTIONAL,
83 IN VOID *Context OPTIONAL
84 )
85{
86 IP6_SERVICE *IpSb;
87 IP6_ADDRESS_INFO *AddressInfo;
88 LIST_ENTRY *Entry;
89 IP6_PREFIX_LIST_ENTRY *PrefixEntry;
90 UINT64 Delay;
91 IP6_DELAY_JOIN_LIST *DelayNode;
92 EFI_STATUS Status;
93 UINT32 Random;
94
95 Status = PseudoRandomU32 (&Random);
96 if (EFI_ERROR (Status)) {
97 DEBUG ((DEBUG_ERROR, "%a failed to generate random number: %r\n", __func__, Status));
98 return Status;
99 }
100
101 NET_CHECK_SIGNATURE (Interface, IP6_INTERFACE_SIGNATURE);
102
103 IpSb = Interface->Service;
104
105 if (Ip6IsOneOfSetAddress (IpSb, Ip6Addr, NULL, &AddressInfo)) {
106 ASSERT (AddressInfo != NULL);
107 //
108 // Update the lifetime.
109 //
110 AddressInfo->ValidLifetime = ValidLifetime;
111 AddressInfo->PreferredLifetime = PreferredLifetime;
112
113 if (DadCallback != NULL) {
114 DadCallback (TRUE, Ip6Addr, Context);
115 }
116
117 return EFI_SUCCESS;
118 }
119
120 AddressInfo = (IP6_ADDRESS_INFO *)AllocatePool (sizeof (IP6_ADDRESS_INFO));
121 if (AddressInfo == NULL) {
122 return EFI_OUT_OF_RESOURCES;
123 }
124
125 AddressInfo->Signature = IP6_ADDR_INFO_SIGNATURE;
126 IP6_COPY_ADDRESS (&AddressInfo->Address, Ip6Addr);
127 AddressInfo->IsAnycast = IsAnycast;
128 AddressInfo->PrefixLength = PrefixLength;
129 AddressInfo->ValidLifetime = ValidLifetime;
130 AddressInfo->PreferredLifetime = PreferredLifetime;
131
132 if (AddressInfo->PrefixLength == 0) {
133 //
134 // Find an appropriate prefix from on-link prefixes and update the prefixlength.
135 // Longest prefix match is used here.
136 //
137 NET_LIST_FOR_EACH (Entry, &IpSb->OnlinkPrefix) {
138 PrefixEntry = NET_LIST_USER_STRUCT (Entry, IP6_PREFIX_LIST_ENTRY, Link);
139
140 if (NetIp6IsNetEqual (&PrefixEntry->Prefix, &AddressInfo->Address, PrefixEntry->PrefixLength)) {
141 AddressInfo->PrefixLength = PrefixEntry->PrefixLength;
142 break;
143 }
144 }
145 }
146
147 if (AddressInfo->PrefixLength == 0) {
148 //
149 // If the prefix length is still zero, try the autonomous prefixes.
150 // Longest prefix match is used here.
151 //
152 NET_LIST_FOR_EACH (Entry, &IpSb->AutonomousPrefix) {
153 PrefixEntry = NET_LIST_USER_STRUCT (Entry, IP6_PREFIX_LIST_ENTRY, Link);
154
155 if (NetIp6IsNetEqual (&PrefixEntry->Prefix, &AddressInfo->Address, PrefixEntry->PrefixLength)) {
156 AddressInfo->PrefixLength = PrefixEntry->PrefixLength;
157 break;
158 }
159 }
160 }
161
162 if (AddressInfo->PrefixLength == 0) {
163 //
164 // BUGBUG: Stil fail, use 64 as the default prefix length.
165 //
166 AddressInfo->PrefixLength = IP6_LINK_LOCAL_PREFIX_LENGTH;
167 }
168
169 //
170 // Node should delay joining the solicited-node multicast address by a random delay
171 // between 0 and MAX_RTR_SOLICITATION_DELAY (1 second).
172 // Thus queue the address to be processed in Duplicate Address Detection module
173 // after the delay time (in milliseconds).
174 //
175 Delay = (UINT64)Random;
176 Delay = MultU64x32 (Delay, IP6_ONE_SECOND_IN_MS);
177 Delay = RShiftU64 (Delay, 32);
178
179 DelayNode = (IP6_DELAY_JOIN_LIST *)AllocatePool (sizeof (IP6_DELAY_JOIN_LIST));
180 if (DelayNode == NULL) {
181 FreePool (AddressInfo);
182 return EFI_OUT_OF_RESOURCES;
183 }
184
185 DelayNode->DelayTime = (UINT32)(DivU64x32 (Delay, IP6_TIMER_INTERVAL_IN_MS));
186 DelayNode->Interface = Interface;
187 DelayNode->AddressInfo = AddressInfo;
188 DelayNode->DadCallback = DadCallback;
189 DelayNode->Context = Context;
190
191 InsertTailList (&Interface->DelayJoinList, &DelayNode->Link);
192 return EFI_SUCCESS;
193}
194
207 IN IP6_SERVICE *IpSb,
208 IN BOOLEAN LinkLocal
209 )
210{
211 EFI_STATUS Status;
212 IP6_INTERFACE *Interface;
213 EFI_IPv6_ADDRESS *Ip6Addr;
214
215 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
216
217 Interface = AllocatePool (sizeof (IP6_INTERFACE));
218 if (Interface == NULL) {
219 return NULL;
220 }
221
222 Interface->Signature = IP6_INTERFACE_SIGNATURE;
223 Interface->RefCnt = 1;
224
225 InitializeListHead (&Interface->AddressList);
226 Interface->AddressCount = 0;
227 Interface->Configured = FALSE;
228
229 Interface->Service = IpSb;
230 Interface->Controller = IpSb->Controller;
231 Interface->Image = IpSb->Image;
232
233 InitializeListHead (&Interface->ArpQues);
234 InitializeListHead (&Interface->SentFrames);
235
236 Interface->DupAddrDetect = IpSb->Ip6ConfigInstance.DadXmits.DupAddrDetectTransmits;
237 InitializeListHead (&Interface->DupAddrDetectList);
238
239 InitializeListHead (&Interface->DelayJoinList);
240
241 InitializeListHead (&Interface->IpInstances);
242 Interface->PromiscRecv = FALSE;
243
244 if (!LinkLocal) {
245 return Interface;
246 }
247
248 //
249 // Get the link local addr
250 //
251 Ip6Addr = Ip6CreateLinkLocalAddr (IpSb);
252 if (Ip6Addr == NULL) {
253 goto ON_ERROR;
254 }
255
256 //
257 // Perform DAD - Duplicate Address Detection.
258 //
259 Status = Ip6SetAddress (
260 Interface,
261 Ip6Addr,
262 FALSE,
263 IP6_LINK_LOCAL_PREFIX_LENGTH,
264 (UINT32)IP6_INFINIT_LIFETIME,
265 (UINT32)IP6_INFINIT_LIFETIME,
266 NULL,
267 NULL
268 );
269
270 FreePool (Ip6Addr);
271
272 if (EFI_ERROR (Status)) {
273 goto ON_ERROR;
274 }
275
276 return Interface;
277
278ON_ERROR:
279
280 FreePool (Interface);
281 return NULL;
282}
283
296VOID
298 IN IP6_INTERFACE *Interface,
299 IN IP6_PROTOCOL *IpInstance OPTIONAL
300 )
301{
302 IP6_DAD_ENTRY *Duplicate;
303 IP6_DELAY_JOIN_LIST *Delay;
304
305 NET_CHECK_SIGNATURE (Interface, IP6_INTERFACE_SIGNATURE);
306 ASSERT (Interface->RefCnt > 0);
307
308 //
309 // Remove all the pending transmit token related to this IP instance.
310 //
311 Ip6CancelFrames (Interface, EFI_ABORTED, Ip6CancelInstanceFrame, IpInstance);
312
313 if (--Interface->RefCnt > 0) {
314 return;
315 }
316
317 //
318 // Destroy the interface if this is the last IP instance.
319 // Remove all the system transmitted packets
320 // from this interface, cancel the receive request if exists.
321 //
322 Ip6CancelFrames (Interface, EFI_ABORTED, Ip6CancelInstanceFrame, NULL);
323
324 ASSERT (IsListEmpty (&Interface->IpInstances));
325 ASSERT (IsListEmpty (&Interface->ArpQues));
326 ASSERT (IsListEmpty (&Interface->SentFrames));
327
328 while (!IsListEmpty (&Interface->DupAddrDetectList)) {
329 Duplicate = NET_LIST_HEAD (&Interface->DupAddrDetectList, IP6_DAD_ENTRY, Link);
330 NetListRemoveHead (&Interface->DupAddrDetectList);
331 FreePool (Duplicate);
332 }
333
334 while (!IsListEmpty (&Interface->DelayJoinList)) {
335 Delay = NET_LIST_HEAD (&Interface->DelayJoinList, IP6_DELAY_JOIN_LIST, Link);
336 NetListRemoveHead (&Interface->DelayJoinList);
337 FreePool (Delay);
338 }
339
340 Ip6RemoveAddr (Interface->Service, &Interface->AddressList, &Interface->AddressCount, NULL, 0);
341
342 RemoveEntryList (&Interface->Link);
343 FreePool (Interface);
344}
345
362 IN IP6_INTERFACE *Interface,
363 IN IP6_PROTOCOL *IpInstance OPTIONAL,
364 IN NET_BUF *Packet,
365 IN IP6_FRAME_CALLBACK CallBack,
366 IN VOID *Context
367 )
368{
371 IP6_LINK_TX_TOKEN *Token;
372 EFI_STATUS Status;
373 UINT32 Count;
374
375 Token = AllocatePool (sizeof (IP6_LINK_TX_TOKEN) + (Packet->BlockOpNum - 1) * sizeof (EFI_MANAGED_NETWORK_FRAGMENT_DATA));
376
377 if (Token == NULL) {
378 return NULL;
379 }
380
381 Token->Signature = IP6_LINK_TX_SIGNATURE;
382 InitializeListHead (&Token->Link);
383
384 Token->IpInstance = IpInstance;
385 Token->CallBack = CallBack;
386 Token->Packet = Packet;
387 Token->Context = Context;
388 ZeroMem (&Token->DstMac, sizeof (EFI_MAC_ADDRESS));
389 IP6_COPY_LINK_ADDRESS (&Token->SrcMac, &Interface->Service->SnpMode.CurrentAddress);
390
391 MnpToken = &(Token->MnpToken);
392 MnpToken->Status = EFI_NOT_READY;
393
394 Status = gBS->CreateEvent (
395 EVT_NOTIFY_SIGNAL,
396 TPL_NOTIFY,
398 Token,
399 &MnpToken->Event
400 );
401
402 if (EFI_ERROR (Status)) {
403 FreePool (Token);
404 return NULL;
405 }
406
407 MnpTxData = &Token->MnpTxData;
408 MnpToken->Packet.TxData = MnpTxData;
409
410 MnpTxData->DestinationAddress = &Token->DstMac;
411 MnpTxData->SourceAddress = &Token->SrcMac;
412 MnpTxData->ProtocolType = IP6_ETHER_PROTO;
413 MnpTxData->DataLength = Packet->TotalSize;
414 MnpTxData->HeaderLength = 0;
415
416 Count = Packet->BlockOpNum;
417
418 NetbufBuildExt (Packet, (NET_FRAGMENT *)MnpTxData->FragmentTable, &Count);
419 MnpTxData->FragmentCount = (UINT16)Count;
420
421 return Token;
422}
423
431VOID
433 IN IP6_LINK_TX_TOKEN *Token
434 )
435{
436 NET_CHECK_SIGNATURE (Token, IP6_LINK_TX_SIGNATURE);
437
438 gBS->CloseEvent (Token->MnpToken.Event);
439 FreePool (Token);
440}
441
449VOID
450EFIAPI
452 IN VOID *Context
453 )
454{
456
457 RxData = (EFI_MANAGED_NETWORK_RECEIVE_DATA *)Context;
458
459 gBS->SignalEvent (RxData->RecycleEvent);
460}
461
473VOID
474EFIAPI
476 IN VOID *Context
477 )
478{
481 IP6_LINK_RX_TOKEN *Token;
482 NET_FRAGMENT Netfrag;
483 NET_BUF *Packet;
484 UINT32 Flag;
485 IP6_SERVICE *IpSb;
486
487 Token = (IP6_LINK_RX_TOKEN *)Context;
488 NET_CHECK_SIGNATURE (Token, IP6_LINK_RX_SIGNATURE);
489
490 //
491 // First clear the interface's receive request in case the
492 // caller wants to call Ip6ReceiveFrame in the callback.
493 //
494 IpSb = (IP6_SERVICE *)Token->Context;
495 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
496
497 MnpToken = &Token->MnpToken;
498 MnpRxData = MnpToken->Packet.RxData;
499
500 if (EFI_ERROR (MnpToken->Status) || (MnpRxData == NULL)) {
501 Token->CallBack (NULL, MnpToken->Status, 0, Token->Context);
502 return;
503 }
504
505 //
506 // Wrap the frame in a net buffer then deliver it to IP input.
507 // IP will reassemble the packet, and deliver it to upper layer
508 //
509 Netfrag.Len = MnpRxData->DataLength;
510 Netfrag.Bulk = MnpRxData->PacketData;
511
512 Packet = NetbufFromExt (&Netfrag, 1, IP6_MAX_HEADLEN, 0, Ip6RecycleFrame, Token->MnpToken.Packet.RxData);
513
514 if (Packet == NULL) {
515 gBS->SignalEvent (MnpRxData->RecycleEvent);
516
517 Token->CallBack (NULL, EFI_OUT_OF_RESOURCES, 0, Token->Context);
518
519 return;
520 }
521
522 Flag = (MnpRxData->BroadcastFlag ? IP6_LINK_BROADCAST : 0);
523 Flag |= (MnpRxData->MulticastFlag ? IP6_LINK_MULTICAST : 0);
524 Flag |= (MnpRxData->PromiscuousFlag ? IP6_LINK_PROMISC : 0);
525
526 Token->CallBack (Packet, EFI_SUCCESS, Flag, Token->Context);
527}
528
536VOID
537EFIAPI
539 IN EFI_EVENT Event,
540 IN VOID *Context
541 )
542{
543 //
544 // Request Ip6OnFrameReceivedDpc as a DPC at TPL_CALLBACK
545 //
546 QueueDpc (TPL_CALLBACK, Ip6OnFrameReceivedDpc, Context);
547}
548
562 IN IP6_FRAME_CALLBACK CallBack,
563 IN IP6_SERVICE *IpSb
564 )
565{
566 EFI_STATUS Status;
567 IP6_LINK_RX_TOKEN *Token;
568
569 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
570
571 Token = &IpSb->RecvRequest;
572 Token->CallBack = CallBack;
573 Token->Context = (VOID *)IpSb;
574
575 Status = IpSb->Mnp->Receive (IpSb->Mnp, &Token->MnpToken);
576 if (EFI_ERROR (Status)) {
577 return Status;
578 }
579
580 return EFI_SUCCESS;
581}
582
590VOID
591EFIAPI
593 IN VOID *Context
594 )
595{
596 IP6_LINK_TX_TOKEN *Token;
597
598 Token = (IP6_LINK_TX_TOKEN *)Context;
599 NET_CHECK_SIGNATURE (Token, IP6_LINK_TX_SIGNATURE);
600
601 RemoveEntryList (&Token->Link);
602
603 Token->CallBack (
604 Token->Packet,
605 Token->MnpToken.Status,
606 0,
607 Token->Context
608 );
609
610 Ip6FreeLinkTxToken (Token);
611}
612
620VOID
621EFIAPI
623 IN EFI_EVENT Event,
624 IN VOID *Context
625 )
626{
627 //
628 // Request Ip6OnFrameSentDpc as a DPC at TPL_CALLBACK
629 //
630 QueueDpc (TPL_CALLBACK, Ip6OnFrameSentDpc, Context);
631}
632
655 IN IP6_INTERFACE *Interface,
656 IN IP6_PROTOCOL *IpInstance OPTIONAL,
657 IN NET_BUF *Packet,
658 IN EFI_IPv6_ADDRESS *NextHop,
659 IN IP6_FRAME_CALLBACK CallBack,
660 IN VOID *Context
661 )
662{
663 IP6_SERVICE *IpSb;
664 IP6_LINK_TX_TOKEN *Token;
665 EFI_STATUS Status;
666 IP6_NEIGHBOR_ENTRY *NeighborCache;
667 LIST_ENTRY *Entry;
668 IP6_NEIGHBOR_ENTRY *ArpQue;
669
670 IpSb = Interface->Service;
671 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
672
673 //
674 // Only when link local address is performing DAD, the interface could be used in unconfigured.
675 //
676 if (IpSb->LinkLocalOk) {
677 ASSERT (Interface->Configured);
678 }
679
680 Token = Ip6CreateLinkTxToken (Interface, IpInstance, Packet, CallBack, Context);
681
682 if (Token == NULL) {
683 return EFI_OUT_OF_RESOURCES;
684 }
685
686 if (IP6_IS_MULTICAST (NextHop)) {
687 Status = Ip6GetMulticastMac (IpSb->Mnp, NextHop, &Token->DstMac);
688 if (EFI_ERROR (Status)) {
689 goto Error;
690 }
691
692 goto SendNow;
693 }
694
695 //
696 // If send to itself, directly send out
697 //
698 if (EFI_IP6_EQUAL (&Packet->Ip.Ip6->DestinationAddress, &Packet->Ip.Ip6->SourceAddress)) {
699 IP6_COPY_LINK_ADDRESS (&Token->DstMac, &IpSb->SnpMode.CurrentAddress);
700 goto SendNow;
701 }
702
703 //
704 // If unicast, check the neighbor state.
705 //
706
707 NeighborCache = Ip6FindNeighborEntry (IpSb, NextHop);
708 ASSERT (NeighborCache != NULL);
709
710 if (NeighborCache->Interface == NULL) {
711 NeighborCache->Interface = Interface;
712 }
713
714 switch (NeighborCache->State) {
715 case EfiNeighborStale:
716 NeighborCache->State = EfiNeighborDelay;
717 NeighborCache->Ticks = (UINT32)IP6_GET_TICKS (IP6_DELAY_FIRST_PROBE_TIME);
718 //
719 // Fall through
720 //
722 case EfiNeighborDelay:
723 case EfiNeighborProbe:
724 IP6_COPY_LINK_ADDRESS (&Token->DstMac, &NeighborCache->LinkAddress);
725 goto SendNow;
726 break;
727
728 default:
729 break;
730 }
731
732 //
733 // Have to do asynchronous ARP resolution. First check whether there is
734 // already a pending request.
735 //
736 NET_LIST_FOR_EACH (Entry, &Interface->ArpQues) {
737 ArpQue = NET_LIST_USER_STRUCT (Entry, IP6_NEIGHBOR_ENTRY, ArpList);
738 if (ArpQue == NeighborCache) {
739 InsertTailList (&NeighborCache->Frames, &Token->Link);
740 NeighborCache->ArpFree = TRUE;
741 return EFI_SUCCESS;
742 }
743 }
744
745 //
746 // First frame requires ARP.
747 //
748 InsertTailList (&NeighborCache->Frames, &Token->Link);
749 InsertTailList (&Interface->ArpQues, &NeighborCache->ArpList);
750
751 NeighborCache->ArpFree = TRUE;
752
753 return EFI_SUCCESS;
754
755SendNow:
756 //
757 // Insert the tx token into the SentFrames list before calling Mnp->Transmit.
758 // Remove it if the returned status is not EFI_SUCCESS.
759 //
760 InsertTailList (&Interface->SentFrames, &Token->Link);
761 Status = IpSb->Mnp->Transmit (IpSb->Mnp, &Token->MnpToken);
762 if (EFI_ERROR (Status)) {
763 RemoveEntryList (&Token->Link);
764 goto Error;
765 }
766
767 return EFI_SUCCESS;
768
769Error:
770 Ip6FreeLinkTxToken (Token);
771 return Status;
772}
773
783VOID
784EFIAPI
786 IN EFI_EVENT Event,
787 IN VOID *Context
788 )
789{
790 IP6_SERVICE *IpSb;
791
792 IpSb = (IP6_SERVICE *)Context;
793 NET_CHECK_SIGNATURE (IpSb, IP6_SERVICE_SIGNATURE);
794
796 Ip6NdTimerTicking (IpSb);
797 Ip6MldTimerTicking (IpSb);
798}
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
Definition: LinkedList.c:403
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
Definition: DivU64x32.c:29
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
Definition: LinkedList.c:590
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: RShiftU64.c:28
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
Definition: MultU64x32.c:27
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
Definition: LinkedList.c:182
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
Definition: LinkedList.c:259
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI QueueDpc(IN EFI_TPL DpcTpl, IN EFI_DPC_PROCEDURE DpcProcedure, IN VOID *DpcContext OPTIONAL)
Definition: DpcLib.c:62
VOID EFIAPI FreePool(IN VOID *Buffer)
@ EfiNeighborDelay
Definition: Ip6.h:272
@ EfiNeighborProbe
Definition: Ip6.h:278
@ EfiNeighborReachable
Definition: Ip6.h:261
@ EfiNeighborStale
Definition: Ip6.h:267
EFI_STATUS Ip6GetMulticastMac(IN EFI_MANAGED_NETWORK_PROTOCOL *Mnp, IN EFI_IPv6_ADDRESS *Multicast, OUT EFI_MAC_ADDRESS *Mac)
Definition: Ip6Common.c:635
EFI_STATUS Ip6RemoveAddr(IN IP6_SERVICE *IpSb OPTIONAL, IN OUT LIST_ENTRY *AddressList, IN OUT UINT32 *AddressCount, IN EFI_IPv6_ADDRESS *Prefix OPTIONAL, IN UINT8 PrefixLength)
Definition: Ip6Common.c:411
BOOLEAN Ip6IsOneOfSetAddress(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Address, OUT IP6_INTERFACE **Interface OPTIONAL, OUT IP6_ADDRESS_INFO **AddressInfo OPTIONAL)
Definition: Ip6Common.c:504
EFI_IPv6_ADDRESS * Ip6CreateLinkLocalAddr(IN OUT IP6_SERVICE *IpSb)
Definition: Ip6Common.c:200
EFI_STATUS Ip6SetAddress(IN IP6_INTERFACE *Interface, IN EFI_IPv6_ADDRESS *Ip6Addr, IN BOOLEAN IsAnycast, IN UINT8 PrefixLength, IN UINT32 ValidLifetime, IN UINT32 PreferredLifetime, IN IP6_DAD_CALLBACK DadCallback OPTIONAL, IN VOID *Context OPTIONAL)
Definition: Ip6If.c:75
EFI_STATUS Ip6ReceiveFrame(IN IP6_FRAME_CALLBACK CallBack, IN IP6_SERVICE *IpSb)
Definition: Ip6If.c:561
IP6_INTERFACE * Ip6CreateInterface(IN IP6_SERVICE *IpSb, IN BOOLEAN LinkLocal)
Definition: Ip6If.c:206
VOID EFIAPI Ip6OnFrameSentDpc(IN VOID *Context)
Definition: Ip6If.c:592
VOID EFIAPI Ip6TimerTicking(IN EFI_EVENT Event, IN VOID *Context)
Definition: Ip6If.c:785
VOID EFIAPI Ip6OnFrameSent(IN EFI_EVENT Event, IN VOID *Context)
Definition: Ip6If.c:622
IP6_LINK_TX_TOKEN * Ip6CreateLinkTxToken(IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance OPTIONAL, IN NET_BUF *Packet, IN IP6_FRAME_CALLBACK CallBack, IN VOID *Context)
Definition: Ip6If.c:361
VOID EFIAPI Ip6RecycleFrame(IN VOID *Context)
Definition: Ip6If.c:451
EFI_STATUS Ip6SendFrame(IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance OPTIONAL, IN NET_BUF *Packet, IN EFI_IPv6_ADDRESS *NextHop, IN IP6_FRAME_CALLBACK CallBack, IN VOID *Context)
Definition: Ip6If.c:654
VOID Ip6CleanInterface(IN IP6_INTERFACE *Interface, IN IP6_PROTOCOL *IpInstance OPTIONAL)
Definition: Ip6If.c:297
VOID EFIAPI Ip6OnFrameReceivedDpc(IN VOID *Context)
Definition: Ip6If.c:475
VOID EFIAPI Ip6OnFrameReceived(IN EFI_EVENT Event, IN VOID *Context)
Definition: Ip6If.c:538
BOOLEAN Ip6CancelInstanceFrame(IN IP6_LINK_TX_TOKEN *Frame, IN VOID *Context)
Definition: Ip6If.c:39
VOID Ip6FreeLinkTxToken(IN IP6_LINK_TX_TOKEN *Token)
Definition: Ip6If.c:432
VOID Ip6PacketTimerTicking(IN IP6_SERVICE *IpSb)
Definition: Ip6Input.c:1739
VOID Ip6MldTimerTicking(IN IP6_SERVICE *IpSb)
Definition: Ip6Mld.c:894
VOID Ip6NdTimerTicking(IN IP6_SERVICE *IpSb)
Definition: Ip6Nd.c:3124
IP6_NEIGHBOR_ENTRY * Ip6FindNeighborEntry(IN IP6_SERVICE *IpSb, IN EFI_IPv6_ADDRESS *Ip6Address)
Definition: Ip6Nd.c:566
VOID Ip6CancelFrames(IN IP6_INTERFACE *Interface, IN EFI_STATUS IoStatus, IN IP6_FRAME_TO_CANCEL FrameToCancel OPTIONAL, IN VOID *Context OPTIONAL)
Definition: Ip6Output.c:1024
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define DEBUG(Expression)
Definition: DebugLib.h:434
LIST_ENTRY *EFIAPI NetListRemoveHead(IN OUT LIST_ENTRY *Head)
Definition: DxeNetLib.c:1090
EFI_STATUS EFIAPI NetbufBuildExt(IN NET_BUF *Nbuf, IN OUT NET_FRAGMENT *ExtFragment, IN OUT UINT32 *ExtNum)
Definition: NetBuffer.c:866
BOOLEAN EFIAPI NetIp6IsNetEqual(EFI_IPv6_ADDRESS *Ip1, EFI_IPv6_ADDRESS *Ip2, UINT8 PrefixLength)
Definition: DxeNetLib.c:837
NET_BUF *EFIAPI NetbufFromExt(IN NET_FRAGMENT *ExtFragment, IN UINT32 ExtNum, IN UINT32 HeadSpace, IN UINT32 HeadLen, IN NET_VECTOR_EXT_FREE ExtFree, IN VOID *Arg OPTIONAL)
Definition: NetBuffer.c:693
EFI_STATUS EFIAPI PseudoRandomU32(OUT UINT32 *Output)
Definition: DxeNetLib.c:1011
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
UINT32 DelayTime
in tick per 50 milliseconds
Definition: Ip6Nd.h:154
EFI_MANAGED_NETWORK_RECEIVE_DATA * RxData
EFI_MANAGED_NETWORK_TRANSMIT_DATA * TxData
EFI_MAC_ADDRESS CurrentAddress