TianoCore EDK2 master
Loading...
Searching...
No Matches
Udp4Main.c
Go to the documentation of this file.
1
9#include "Udp4Impl.h"
10
11EFI_UDP4_PROTOCOL mUdp4Protocol = {
20};
21
43EFIAPI
46 OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL,
47 OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
48 OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
49 OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
50 )
51{
52 UDP4_INSTANCE_DATA *Instance;
54 EFI_TPL OldTpl;
55 EFI_STATUS Status;
56
57 if (This == NULL) {
58 return EFI_INVALID_PARAMETER;
59 }
60
61 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
62
63 if (!Instance->Configured && (Udp4ConfigData != NULL)) {
64 return EFI_NOT_STARTED;
65 }
66
67 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
68
69 if (Udp4ConfigData != NULL) {
70 //
71 // Set the Udp4ConfigData.
72 //
73 CopyMem (Udp4ConfigData, &Instance->ConfigData, sizeof (*Udp4ConfigData));
74 }
75
76 Ip = Instance->IpInfo->Ip.Ip4;
77
78 //
79 // Get the underlying Ip4ModeData, MnpConfigData and SnpModeData.
80 //
81 Status = Ip->GetModeData (Ip, Ip4ModeData, MnpConfigData, SnpModeData);
82
83 gBS->RestoreTPL (OldTpl);
84
85 return Status;
86}
87
122EFIAPI
124 IN EFI_UDP4_PROTOCOL *This,
125 IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL
126 )
127{
128 EFI_STATUS Status;
129 UDP4_INSTANCE_DATA *Instance;
130 UDP4_SERVICE_DATA *Udp4Service;
131 EFI_TPL OldTpl;
132 IP4_ADDR StationAddress;
133 IP4_ADDR SubnetMask;
134 IP4_ADDR RemoteAddress;
135 EFI_IP4_CONFIG_DATA Ip4ConfigData;
136 IP4_ADDR LocalAddr;
137 IP4_ADDR RemoteAddr;
138
139 if (This == NULL) {
140 return EFI_INVALID_PARAMETER;
141 }
142
143 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
144
145 if (!Instance->Configured && (UdpConfigData == NULL)) {
146 return EFI_SUCCESS;
147 }
148
149 Udp4Service = Instance->Udp4Service;
150 Status = EFI_SUCCESS;
151
152 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
153
154 if (UdpConfigData != NULL) {
155 CopyMem (&StationAddress, &UdpConfigData->StationAddress, sizeof (IP4_ADDR));
156 CopyMem (&SubnetMask, &UdpConfigData->SubnetMask, sizeof (IP4_ADDR));
157 CopyMem (&RemoteAddress, &UdpConfigData->RemoteAddress, sizeof (IP4_ADDR));
158
159 StationAddress = NTOHL (StationAddress);
160 SubnetMask = NTOHL (SubnetMask);
161 RemoteAddress = NTOHL (RemoteAddress);
162
163 if (!UdpConfigData->UseDefaultAddress &&
164 (!IP4_IS_VALID_NETMASK (SubnetMask) ||
165 !((StationAddress == 0) || ((SubnetMask != 0) && NetIp4IsUnicast (StationAddress, SubnetMask))) ||
166 IP4_IS_LOCAL_BROADCAST (RemoteAddress)))
167 {
168 //
169 // Don't use default address, and subnet mask is invalid or StationAddress is not
170 // a valid unicast IPv4 address or RemoteAddress is not a valid unicast IPv4 address
171 // if it is not 0.
172 //
173 Status = EFI_INVALID_PARAMETER;
174 goto ON_EXIT;
175 }
176
177 if (Instance->Configured) {
178 //
179 // The instance is already configured, try to do the re-configuration.
180 //
181 if (!Udp4IsReconfigurable (&Instance->ConfigData, UdpConfigData)) {
182 //
183 // If the new configuration data wants to change some unreconfigurable
184 // settings, return EFI_ALREADY_STARTED.
185 //
186 Status = EFI_ALREADY_STARTED;
187 goto ON_EXIT;
188 }
189
190 //
191 // Save the reconfigurable parameters.
192 //
193 Instance->ConfigData.TypeOfService = UdpConfigData->TypeOfService;
194 Instance->ConfigData.TimeToLive = UdpConfigData->TimeToLive;
195 Instance->ConfigData.DoNotFragment = UdpConfigData->DoNotFragment;
196 Instance->ConfigData.ReceiveTimeout = UdpConfigData->ReceiveTimeout;
197 Instance->ConfigData.TransmitTimeout = UdpConfigData->TransmitTimeout;
198 } else {
199 //
200 // Construct the Ip configuration data from the UdpConfigData.
201 //
202 Udp4BuildIp4ConfigData (UdpConfigData, &Ip4ConfigData);
203
204 //
205 // Configure the Ip instance wrapped in the IpInfo.
206 //
207 Status = IpIoConfigIp (Instance->IpInfo, &Ip4ConfigData);
208 if (EFI_ERROR (Status)) {
209 if (Status == EFI_NO_MAPPING) {
210 Instance->IsNoMapping = TRUE;
211 }
212
213 goto ON_EXIT;
214 }
215
216 Instance->IsNoMapping = FALSE;
217
218 //
219 // Save the configuration data.
220 //
221 CopyMem (&Instance->ConfigData, UdpConfigData, sizeof (Instance->ConfigData));
222 IP4_COPY_ADDRESS (&Instance->ConfigData.StationAddress, &Ip4ConfigData.StationAddress);
223 IP4_COPY_ADDRESS (&Instance->ConfigData.SubnetMask, &Ip4ConfigData.SubnetMask);
224
225 //
226 // Try to allocate the required port resource.
227 //
228 Status = Udp4Bind (&Udp4Service->ChildrenList, &Instance->ConfigData);
229 if (EFI_ERROR (Status)) {
230 //
231 // Reset the ip instance if bind fails.
232 //
233 IpIoConfigIp (Instance->IpInfo, NULL);
234 goto ON_EXIT;
235 }
236
237 //
238 // Pre calculate the checksum for the pseudo head, ignore the UDP length first.
239 //
240 CopyMem (&LocalAddr, &Instance->ConfigData.StationAddress, sizeof (IP4_ADDR));
241 CopyMem (&RemoteAddr, &Instance->ConfigData.RemoteAddress, sizeof (IP4_ADDR));
242 Instance->HeadSum = NetPseudoHeadChecksum (
243 LocalAddr,
244 RemoteAddr,
245 EFI_IP_PROTO_UDP,
246 0
247 );
248
249 Instance->Configured = TRUE;
250 }
251 } else {
252 //
253 // UdpConfigData is NULL, reset the instance.
254 //
255 Instance->Configured = FALSE;
256 Instance->IsNoMapping = FALSE;
257
258 //
259 // Reset the Ip instance wrapped in the IpInfo.
260 //
261 IpIoConfigIp (Instance->IpInfo, NULL);
262
263 //
264 // Cancel all the user tokens.
265 //
266 Instance->Udp4Proto.Cancel (&Instance->Udp4Proto, NULL);
267
268 //
269 // Remove the buffered RxData for this instance.
270 //
271 Udp4FlushRcvdDgram (Instance);
272
273 ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));
274 }
275
276ON_EXIT:
277
278 gBS->RestoreTPL (OldTpl);
279
280 return Status;
281}
282
313EFIAPI
315 IN EFI_UDP4_PROTOCOL *This,
316 IN BOOLEAN JoinFlag,
317 IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL
318 )
319{
320 EFI_STATUS Status;
321 UDP4_INSTANCE_DATA *Instance;
323 EFI_TPL OldTpl;
324 IP4_ADDR McastIp;
325
326 if ((This == NULL) || (JoinFlag && (MulticastAddress == NULL))) {
327 return EFI_INVALID_PARAMETER;
328 }
329
330 McastIp = 0;
331 if (JoinFlag) {
332 CopyMem (&McastIp, MulticastAddress, sizeof (IP4_ADDR));
333
334 if (!IP4_IS_MULTICAST (NTOHL (McastIp))) {
335 return EFI_INVALID_PARAMETER;
336 }
337 }
338
339 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
340
341 if (Instance->IsNoMapping) {
342 return EFI_NO_MAPPING;
343 }
344
345 if (!Instance->Configured) {
346 return EFI_NOT_STARTED;
347 }
348
349 Ip = Instance->IpInfo->Ip.Ip4;
350
351 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
352
353 //
354 // Invoke the Ip instance the Udp4 instance consumes to do the group operation.
355 //
356 Status = Ip->Groups (Ip, JoinFlag, MulticastAddress);
357
358 if (EFI_ERROR (Status)) {
359 goto ON_EXIT;
360 }
361
362 //
363 // Keep a local copy of the configured multicast IPs because IpIo receives
364 // datagrams from the 0 station address IP instance and then UDP delivers to
365 // the matched instance. This copy of multicast IPs is used to avoid receive
366 // the multicast datagrams destined to multicast IPs the other instances configured.
367 //
368 if (JoinFlag) {
369 NetMapInsertTail (&Instance->McastIps, (VOID *)(UINTN)McastIp, NULL);
370 } else {
371 NetMapIterate (&Instance->McastIps, Udp4LeaveGroup, MulticastAddress);
372 }
373
374ON_EXIT:
375
376 gBS->RestoreTPL (OldTpl);
377
378 return Status;
379}
380
420EFIAPI
422 IN EFI_UDP4_PROTOCOL *This,
423 IN BOOLEAN DeleteRoute,
424 IN EFI_IPv4_ADDRESS *SubnetAddress,
425 IN EFI_IPv4_ADDRESS *SubnetMask,
426 IN EFI_IPv4_ADDRESS *GatewayAddress
427 )
428{
429 UDP4_INSTANCE_DATA *Instance;
431
432 if (This == NULL) {
433 return EFI_INVALID_PARAMETER;
434 }
435
436 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
437
438 if (Instance->IsNoMapping) {
439 return EFI_NO_MAPPING;
440 }
441
442 if (!Instance->Configured) {
443 return EFI_NOT_STARTED;
444 }
445
446 Ip = Instance->IpInfo->Ip.Ip4;
447
448 //
449 // Invoke the Ip instance the Udp4 instance consumes to do the actual operation.
450 //
451 return Ip->Routes (Ip, DeleteRoute, SubnetAddress, SubnetMask, GatewayAddress);
452}
453
485EFIAPI
487 IN EFI_UDP4_PROTOCOL *This,
489 )
490{
491 EFI_STATUS Status;
492 UDP4_INSTANCE_DATA *Instance;
493 EFI_TPL OldTpl;
494 NET_BUF *Packet;
495 EFI_UDP_HEADER *Udp4Header;
496 EFI_UDP4_CONFIG_DATA *ConfigData;
497 IP4_ADDR Source;
498 IP4_ADDR Destination;
500 EFI_UDP4_SESSION_DATA *UdpSessionData;
501 UDP4_SERVICE_DATA *Udp4Service;
502 IP_IO_OVERRIDE Override;
503 UINT16 HeadSum;
504 EFI_IP_ADDRESS IpDestAddr;
505
506 if ((This == NULL) || (Token == NULL)) {
507 return EFI_INVALID_PARAMETER;
508 }
509
510 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
511
512 if (Instance->IsNoMapping) {
513 return EFI_NO_MAPPING;
514 }
515
516 if (!Instance->Configured) {
517 return EFI_NOT_STARTED;
518 }
519
520 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
521
522 //
523 // Validate the Token, if the token is invalid return the error code.
524 //
525 Status = Udp4ValidateTxToken (Instance, Token);
526 if (EFI_ERROR (Status)) {
527 goto ON_EXIT;
528 }
529
530 if (EFI_ERROR (NetMapIterate (&Instance->TxTokens, Udp4TokenExist, Token)) ||
531 EFI_ERROR (NetMapIterate (&Instance->RxTokens, Udp4TokenExist, Token)))
532 {
533 //
534 // Try to find a duplicate token in the two token maps, if found, return
535 // EFI_ACCESS_DENIED.
536 //
537 Status = EFI_ACCESS_DENIED;
538 goto ON_EXIT;
539 }
540
541 TxData = Token->Packet.TxData;
542
543 //
544 // Create a net buffer to hold the user buffer and the udp header.
545 //
546 Packet = NetbufFromExt (
547 (NET_FRAGMENT *)TxData->FragmentTable,
548 TxData->FragmentCount,
549 UDP4_HEADER_SIZE,
550 0,
552 NULL
553 );
554 if (Packet == NULL) {
555 Status = EFI_OUT_OF_RESOURCES;
556 goto ON_EXIT;
557 }
558
559 //
560 // Store the IpIo in ProtoData.
561 //
562 Udp4Service = Instance->Udp4Service;
563 *((UINTN *)&Packet->ProtoData[0]) = (UINTN)(Udp4Service->IpIo);
564
565 Udp4Header = (EFI_UDP_HEADER *)NetbufAllocSpace (Packet, UDP4_HEADER_SIZE, TRUE);
566 ASSERT (Udp4Header != NULL);
567
568 ConfigData = &Instance->ConfigData;
569
570 //
571 // Fill the udp header.
572 //
573 Udp4Header->SrcPort = HTONS (ConfigData->StationPort);
574 Udp4Header->DstPort = HTONS (ConfigData->RemotePort);
575 Udp4Header->Length = HTONS ((UINT16)Packet->TotalSize);
576 Udp4Header->Checksum = 0;
577
578 UdpSessionData = TxData->UdpSessionData;
579 IP4_COPY_ADDRESS (&Override.Ip4OverrideData.SourceAddress, &ConfigData->StationAddress);
580
581 if (UdpSessionData != NULL) {
582 //
583 // Set the SourceAddress, SrcPort and Destination according to the specified
584 // UdpSessionData.
585 //
586 if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {
587 IP4_COPY_ADDRESS (&Override.Ip4OverrideData.SourceAddress, &UdpSessionData->SourceAddress);
588 }
589
590 if (UdpSessionData->SourcePort != 0) {
591 Udp4Header->SrcPort = HTONS (UdpSessionData->SourcePort);
592 }
593
594 if (UdpSessionData->DestinationPort != 0) {
595 Udp4Header->DstPort = HTONS (UdpSessionData->DestinationPort);
596 }
597
598 CopyMem (&Source, &Override.Ip4OverrideData.SourceAddress, sizeof (IP4_ADDR));
599 CopyMem (&Destination, &UdpSessionData->DestinationAddress, sizeof (IP4_ADDR));
600
601 //
602 // calculate the pseudo head checksum using the overridden parameters.
603 //
604 HeadSum = NetPseudoHeadChecksum (
605 Source,
606 Destination,
607 EFI_IP_PROTO_UDP,
608 0
609 );
610 } else {
611 //
612 // UdpSessionData is NULL, use the address and port information previously configured.
613 //
614 CopyMem (&Destination, &ConfigData->RemoteAddress, sizeof (IP4_ADDR));
615
616 HeadSum = Instance->HeadSum;
617 }
618
619 //
620 // calculate the checksum.
621 //
622 Udp4Header->Checksum = Udp4Checksum (Packet, HeadSum);
623 if (Udp4Header->Checksum == 0) {
624 //
625 // If the calculated checksum is 0, fill the Checksum field with all ones.
626 //
627 Udp4Header->Checksum = 0xffff;
628 }
629
630 //
631 // Fill the IpIo Override data.
632 //
633 if (TxData->GatewayAddress != NULL) {
634 IP4_COPY_ADDRESS (&Override.Ip4OverrideData.GatewayAddress, TxData->GatewayAddress);
635 } else {
636 ZeroMem (&Override.Ip4OverrideData.GatewayAddress, sizeof (EFI_IPv4_ADDRESS));
637 }
638
639 Override.Ip4OverrideData.Protocol = EFI_IP_PROTO_UDP;
640 Override.Ip4OverrideData.TypeOfService = ConfigData->TypeOfService;
641 Override.Ip4OverrideData.TimeToLive = ConfigData->TimeToLive;
642 Override.Ip4OverrideData.DoNotFragment = ConfigData->DoNotFragment;
643
644 //
645 // Save the token into the TxToken map.
646 //
647 Status = NetMapInsertTail (&Instance->TxTokens, Token, Packet);
648 if (EFI_ERROR (Status)) {
649 goto FREE_PACKET;
650 }
651
652 //
653 // Send out this datagram through IpIo.
654 //
655 IpDestAddr.Addr[0] = Destination;
656 Status = IpIoSend (
657 Udp4Service->IpIo,
658 Packet,
659 Instance->IpInfo,
660 Instance,
661 Token,
662 &IpDestAddr,
663 &Override
664 );
665 if (EFI_ERROR (Status)) {
666 //
667 // Remove this token from the TxTokens.
668 //
669 Udp4RemoveToken (&Instance->TxTokens, Token);
670 }
671
672FREE_PACKET:
673
674 NetbufFree (Packet);
675
676ON_EXIT:
677
678 gBS->RestoreTPL (OldTpl);
679
680 return Status;
681}
682
713EFIAPI
715 IN EFI_UDP4_PROTOCOL *This,
717 )
718{
719 EFI_STATUS Status;
720 UDP4_INSTANCE_DATA *Instance;
721 EFI_TPL OldTpl;
722
723 if ((This == NULL) || (Token == NULL) || (Token->Event == NULL)) {
724 return EFI_INVALID_PARAMETER;
725 }
726
727 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
728
729 if (Instance->IsNoMapping) {
730 return EFI_NO_MAPPING;
731 }
732
733 if (!Instance->Configured) {
734 return EFI_NOT_STARTED;
735 }
736
737 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
738
739 if (EFI_ERROR (NetMapIterate (&Instance->RxTokens, Udp4TokenExist, Token)) ||
740 EFI_ERROR (NetMapIterate (&Instance->TxTokens, Udp4TokenExist, Token)))
741 {
742 //
743 // Return EFI_ACCESS_DENIED if the specified token is already in the TxTokens or
744 // RxTokens map.
745 //
746 Status = EFI_ACCESS_DENIED;
747 goto ON_EXIT;
748 }
749
750 Token->Packet.RxData = NULL;
751
752 //
753 // Save the token into the RxTokens map.
754 //
755 Status = NetMapInsertTail (&Instance->RxTokens, Token, NULL);
756 if (EFI_ERROR (Status)) {
757 Status = EFI_NOT_READY;
758 goto ON_EXIT;
759 }
760
761 //
762 // If there is an icmp error, report it.
763 //
764 Udp4ReportIcmpError (Instance);
765
766 //
767 // Try to deliver the received datagrams.
768 //
769 Udp4InstanceDeliverDgram (Instance);
770
771 //
772 // Dispatch the DPC queued by the NotifyFunction of Token->Event.
773 //
774 DispatchDpc ();
775
776ON_EXIT:
777
778 gBS->RestoreTPL (OldTpl);
779
780 return Status;
781}
782
812EFIAPI
814 IN EFI_UDP4_PROTOCOL *This,
815 IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL
816 )
817{
818 EFI_STATUS Status;
819 UDP4_INSTANCE_DATA *Instance;
820 EFI_TPL OldTpl;
821
822 if (This == NULL) {
823 return EFI_INVALID_PARAMETER;
824 }
825
826 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
827
828 if (Instance->IsNoMapping) {
829 return EFI_NO_MAPPING;
830 }
831
832 if (!Instance->Configured) {
833 return EFI_NOT_STARTED;
834 }
835
836 OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
837
838 //
839 // Cancel the tokens specified by Token for this instance.
840 //
841 Status = Udp4InstanceCancelToken (Instance, Token);
842
843 //
844 // Dispatch the DPC queued by the NotifyFunction of the cancelled token's events.
845 //
846 DispatchDpc ();
847
848 gBS->RestoreTPL (OldTpl);
849
850 return Status;
851}
852
874EFIAPI
877 )
878{
879 UDP4_INSTANCE_DATA *Instance;
881
882 if (This == NULL) {
883 return EFI_INVALID_PARAMETER;
884 }
885
886 Instance = UDP4_INSTANCE_DATA_FROM_THIS (This);
887 Ip = Instance->IpInfo->Ip.Ip4;
888
889 //
890 // Invode the Ip instance consumed by the udp instance to do the poll operation.
891 //
892 return Ip->Poll (Ip);
893}
UINT64 UINTN
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
Definition: LinkedList.c:403
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS EFIAPI DispatchDpc(VOID)
Definition: DpcLib.c:86
EFI_STATUS EFIAPI IpIoSend(IN OUT IP_IO *IpIo, IN OUT NET_BUF *Pkt, IN IP_IO_IP_INFO *Sender OPTIONAL, IN VOID *Context OPTIONAL, IN VOID *NotifyData OPTIONAL, IN EFI_IP_ADDRESS *Dest OPTIONAL, IN IP_IO_OVERRIDE *OverrideData OPTIONAL)
Definition: DxeIpIoLib.c:1578
EFI_STATUS EFIAPI IpIoConfigIp(IN OUT IP_IO_IP_INFO *IpInfo, IN OUT VOID *IpConfigData OPTIONAL)
Definition: DxeIpIoLib.c:1806
#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 OUT
Definition: Base.h:284
VOID EFIAPI NetbufFree(IN NET_BUF *Nbuf)
Definition: NetBuffer.c:195
BOOLEAN EFIAPI NetIp4IsUnicast(IN IP4_ADDR Ip, IN IP4_ADDR NetMask)
Definition: DxeNetLib.c:683
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
UINT8 *EFIAPI NetbufAllocSpace(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
Definition: NetBuffer.c:1015
UINT16 EFIAPI NetPseudoHeadChecksum(IN IP4_ADDR Src, IN IP4_ADDR Dst, IN UINT8 Proto, IN UINT16 Len)
Definition: NetBuffer.c:1740
EFI_STATUS EFIAPI NetMapInsertTail(IN OUT NET_MAP *Map, IN VOID *Key, IN VOID *Value OPTIONAL)
Definition: DxeNetLib.c:1556
EFI_STATUS EFIAPI NetMapIterate(IN NET_MAP *Map, IN NET_MAP_CALLBACK CallBack, IN VOID *Arg OPTIONAL)
Definition: DxeNetLib.c:1800
EFI_STATUS Udp4ValidateTxToken(IN UDP4_INSTANCE_DATA *Instance, IN EFI_UDP4_COMPLETION_TOKEN *TxToken)
Definition: Udp4Impl.c:767
EFI_STATUS Udp4RemoveToken(IN OUT NET_MAP *TokenMap, IN EFI_UDP4_COMPLETION_TOKEN *Token)
Definition: Udp4Impl.c:948
EFI_STATUS EFIAPI Udp4LeaveGroup(IN OUT NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg OPTIONAL)
Definition: Udp4Impl.c:1069
BOOLEAN Udp4IsReconfigurable(IN EFI_UDP4_CONFIG_DATA *OldConfigData, IN EFI_UDP4_CONFIG_DATA *NewConfigData)
Definition: Udp4Impl.c:641
VOID Udp4InstanceDeliverDgram(IN UDP4_INSTANCE_DATA *Instance)
Definition: Udp4Impl.c:1483
EFI_STATUS Udp4Bind(IN LIST_ENTRY *InstanceList, IN OUT EFI_UDP4_CONFIG_DATA *ConfigData)
Definition: Udp4Impl.c:566
VOID EFIAPI Udp4NetVectorExtFree(VOID *Context)
Definition: Udp4Impl.c:1882
VOID Udp4BuildIp4ConfigData(IN EFI_UDP4_CONFIG_DATA *Udp4ConfigData, IN OUT EFI_IP4_CONFIG_DATA *Ip4ConfigData)
Definition: Udp4Impl.c:720
EFI_STATUS Udp4InstanceCancelToken(IN UDP4_INSTANCE_DATA *Instance, IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL)
Definition: Udp4Impl.c:1201
UINT16 Udp4Checksum(IN NET_BUF *Packet, IN UINT16 HeadSum)
Definition: Udp4Impl.c:922
EFI_STATUS EFIAPI Udp4TokenExist(IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context)
Definition: Udp4Impl.c:887
VOID Udp4ReportIcmpError(IN UDP4_INSTANCE_DATA *Instance)
Definition: Udp4Impl.c:1839
VOID Udp4FlushRcvdDgram(IN UDP4_INSTANCE_DATA *Instance)
Definition: Udp4Impl.c:1170
EFI_STATUS EFIAPI Udp4Configure(IN EFI_UDP4_PROTOCOL *This, IN EFI_UDP4_CONFIG_DATA *UdpConfigData OPTIONAL)
Definition: Udp4Main.c:123
EFI_STATUS EFIAPI Udp4GetModeData(IN EFI_UDP4_PROTOCOL *This, OUT EFI_UDP4_CONFIG_DATA *Udp4ConfigData OPTIONAL, OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
Definition: Udp4Main.c:44
EFI_STATUS EFIAPI Udp4Routes(IN EFI_UDP4_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv4_ADDRESS *SubnetAddress, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *GatewayAddress)
Definition: Udp4Main.c:421
EFI_STATUS EFIAPI Udp4Groups(IN EFI_UDP4_PROTOCOL *This, IN BOOLEAN JoinFlag, IN EFI_IPv4_ADDRESS *MulticastAddress OPTIONAL)
Definition: Udp4Main.c:314
EFI_STATUS EFIAPI Udp4Transmit(IN EFI_UDP4_PROTOCOL *This, IN EFI_UDP4_COMPLETION_TOKEN *Token)
Definition: Udp4Main.c:486
EFI_STATUS EFIAPI Udp4Poll(IN EFI_UDP4_PROTOCOL *This)
Definition: Udp4Main.c:875
EFI_STATUS EFIAPI Udp4Cancel(IN EFI_UDP4_PROTOCOL *This, IN EFI_UDP4_COMPLETION_TOKEN *Token OPTIONAL)
Definition: Udp4Main.c:813
EFI_STATUS EFIAPI Udp4Receive(IN EFI_UDP4_PROTOCOL *This, IN EFI_UDP4_COMPLETION_TOKEN *Token)
Definition: Udp4Main.c:714
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINTN EFI_TPL
Definition: UefiBaseType.h:41
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
EFI_IPv4_ADDRESS SubnetMask
Definition: Ip4.h:98
EFI_IPv4_ADDRESS StationAddress
Definition: Ip4.h:94