63 return EFI_INVALID_PARAMETER;
66 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
68 if (!Instance->Configured && (Udp6ConfigData !=
NULL)) {
69 return EFI_NOT_STARTED;
72 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
74 if (Udp6ConfigData !=
NULL) {
81 Ip = Instance->IpInfo->Ip.Ip6;
86 Status = Ip->GetModeData (Ip, Ip6ModeData, MnpConfigData, SnpModeData);
88 gBS->RestoreTPL (OldTpl);
147 return EFI_INVALID_PARAMETER;
150 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
152 if (!Instance->Configured && (UdpConfigData ==
NULL)) {
156 Udp6Service = Instance->Udp6Service;
158 ASSERT (Udp6Service !=
NULL);
160 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
162 if (UdpConfigData !=
NULL) {
163 IP6_COPY_ADDRESS (&StationAddress, &UdpConfigData->StationAddress);
164 IP6_COPY_ADDRESS (&RemoteAddress, &UdpConfigData->RemoteAddress);
175 Status = EFI_INVALID_PARAMETER;
179 if (Instance->Configured) {
188 Status = EFI_ALREADY_STARTED;
195 Instance->ConfigData.
TrafficClass = UdpConfigData->TrafficClass;
196 Instance->ConfigData.
HopLimit = UdpConfigData->HopLimit;
197 Instance->ConfigData.
ReceiveTimeout = UdpConfigData->ReceiveTimeout;
208 Status =
IpIoConfigIp (Instance->IpInfo, &Ip6ConfigData);
209 if (EFI_ERROR (Status)) {
210 if (Status == EFI_NO_MAPPING) {
211 Instance->IsNoMapping =
TRUE;
217 Instance->IsNoMapping =
FALSE;
223 &Instance->ConfigData,
231 Status =
Udp6Bind (&Udp6Service->ChildrenList, &Instance->ConfigData);
232 if (EFI_ERROR (Status)) {
243 IP6_COPY_ADDRESS (&LocalAddr, &Instance->ConfigData.
StationAddress);
244 IP6_COPY_ADDRESS (&RemoteAddr, &Instance->ConfigData.
RemoteAddress);
253 Instance->Configured =
TRUE;
259 Instance->Configured =
FALSE;
260 Instance->IsNoMapping =
FALSE;
270 Instance->Udp6Proto.Cancel (&Instance->Udp6Proto,
NULL);
277 ASSERT (
IsListEmpty (&Instance->DeliveredDgramQue));
282 gBS->RestoreTPL (OldTpl);
326 if ((This ==
NULL) || (JoinFlag && (MulticastAddress ==
NULL))) {
327 return EFI_INVALID_PARAMETER;
333 if (!IP6_IS_MULTICAST (MulticastAddress)) {
334 return EFI_INVALID_PARAMETER;
338 if (McastIp ==
NULL) {
339 return EFI_OUT_OF_RESOURCES;
343 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
344 if (!Instance->Configured) {
345 if (McastIp !=
NULL) {
349 return EFI_NOT_STARTED;
352 Ip = Instance->IpInfo->Ip.Ip6;
354 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
359 Status = Ip->Groups (Ip, JoinFlag, MulticastAddress);
361 if (EFI_ERROR (Status)) {
375 if ((MulticastAddress !=
NULL) && (Status == EFI_ABORTED)) {
382 gBS->RestoreTPL (OldTpl);
384 if (EFI_ERROR (Status)) {
385 if (McastIp !=
NULL) {
465 if ((This ==
NULL) || (Token ==
NULL)) {
466 return EFI_INVALID_PARAMETER;
469 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
471 if (!Instance->Configured) {
472 return EFI_NOT_STARTED;
475 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
481 if (EFI_ERROR (Status)) {
493 Status = EFI_ACCESS_DENIED;
497 TxData = Token->Packet.TxData;
510 if (Packet ==
NULL) {
511 Status = EFI_OUT_OF_RESOURCES;
518 Udp6Service = Instance->Udp6Service;
519 *((
UINTN *)&Packet->ProtoData[0]) = (
UINTN)(Udp6Service->IpIo);
522 ASSERT (Udp6Header !=
NULL);
523 if (Udp6Header ==
NULL) {
524 Status = EFI_OUT_OF_RESOURCES;
528 ConfigData = &Instance->ConfigData;
533 Udp6Header->SrcPort = HTONS (ConfigData->
StationPort);
534 Udp6Header->DstPort = HTONS (ConfigData->
RemotePort);
535 Udp6Header->Length = HTONS ((UINT16)Packet->TotalSize);
536 Udp6Header->Checksum = 0;
541 Packet->Udp = Udp6Header;
544 if (UdpSessionData !=
NULL) {
576 if (Udp6Header->Checksum == 0) {
580 Udp6Header->Checksum = 0xffff;
587 Udp6Header->Checksum = 0;
595 HeadSum = Instance->HeadSum;
600 if (Udp6Header->Checksum == 0) {
604 Udp6Header->Checksum = 0xffff;
611 Override.Ip6OverrideData.
Protocol = EFI_IP_PROTO_UDP;
619 if (EFI_ERROR (Status)) {
626 if (UdpSessionData !=
NULL) {
627 IP6_COPY_ADDRESS (&(IpDestAddr.v6), &Destination);
641 if (EFI_ERROR (Status)) {
654 gBS->RestoreTPL (OldTpl);
697 if ((This ==
NULL) || (Token ==
NULL) || (Token->Event ==
NULL)) {
698 return EFI_INVALID_PARAMETER;
701 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
703 if (!Instance->Configured) {
704 return EFI_NOT_STARTED;
707 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
717 Status = EFI_ACCESS_DENIED;
721 Token->Packet.RxData =
NULL;
727 if (EFI_ERROR (Status)) {
728 Status = EFI_NOT_READY;
749 gBS->RestoreTPL (OldTpl);
789 return EFI_INVALID_PARAMETER;
792 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
794 if (!Instance->Configured) {
795 return EFI_NOT_STARTED;
798 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
810 gBS->RestoreTPL (OldTpl);
838 return EFI_INVALID_PARAMETER;
841 Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
842 Ip = Instance->IpInfo->Ip.Ip6;
847 return Ip->Poll (Ip);
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
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)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
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)
EFI_STATUS EFIAPI IpIoConfigIp(IN OUT IP_IO_IP_INFO *IpInfo, IN OUT VOID *IpConfigData OPTIONAL)
VOID EFIAPI NetbufFree(IN NET_BUF *Nbuf)
UINT16 EFIAPI NetIp6PseudoHeadChecksum(IN EFI_IPv6_ADDRESS *Src, IN EFI_IPv6_ADDRESS *Dst, IN UINT8 NextHeader, IN UINT32 Len)
BOOLEAN EFIAPI NetIp6IsValidUnicast(IN EFI_IPv6_ADDRESS *Ip6)
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)
BOOLEAN EFIAPI NetIp6IsUnspecifiedAddr(IN EFI_IPv6_ADDRESS *Ip6)
UINT8 *EFIAPI NetbufAllocSpace(IN OUT NET_BUF *Nbuf, IN UINT32 Len, IN BOOLEAN FromHead)
EFI_STATUS EFIAPI NetMapInsertTail(IN OUT NET_MAP *Map, IN VOID *Key, IN VOID *Value OPTIONAL)
EFI_STATUS EFIAPI NetMapIterate(IN NET_MAP *Map, IN NET_MAP_CALLBACK CallBack, IN VOID *Arg OPTIONAL)
EFI_STATUS EFIAPI Udp6LeaveGroup(IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg OPTIONAL)
EFI_STATUS Udp6RemoveToken(IN NET_MAP *TokenMap, IN EFI_UDP6_COMPLETION_TOKEN *Token)
VOID Udp6InstanceDeliverDgram(IN UDP6_INSTANCE_DATA *Instance)
UINT16 Udp6Checksum(IN NET_BUF *Packet, IN UINT16 HeadSum)
VOID Udp6FlushRcvdDgram(IN UDP6_INSTANCE_DATA *Instance)
EFI_STATUS Udp6InstanceCancelToken(IN UDP6_INSTANCE_DATA *Instance, IN EFI_UDP6_COMPLETION_TOKEN *Token OPTIONAL)
EFI_STATUS Udp6ValidateTxToken(IN UDP6_INSTANCE_DATA *Instance, IN EFI_UDP6_COMPLETION_TOKEN *TxToken)
EFI_STATUS Udp6Bind(IN LIST_ENTRY *InstanceList, IN EFI_UDP6_CONFIG_DATA *ConfigData)
VOID EFIAPI Udp6NetVectorExtFree(IN VOID *Context)
VOID Udp6ReportIcmpError(IN UDP6_INSTANCE_DATA *Instance)
BOOLEAN Udp6IsReconfigurable(IN EFI_UDP6_CONFIG_DATA *OldConfigData, IN EFI_UDP6_CONFIG_DATA *NewConfigData)
VOID Udp6BuildIp6ConfigData(IN EFI_UDP6_CONFIG_DATA *Udp6ConfigData, IN OUT EFI_IP6_CONFIG_DATA *Ip6ConfigData)
EFI_STATUS EFIAPI Udp6TokenExist(IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context)
EFI_STATUS EFIAPI Udp6Receive(IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Udp6Configure(IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_CONFIG_DATA *UdpConfigData OPTIONAL)
EFI_STATUS EFIAPI Udp6Cancel(IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token OPTIONAL)
EFI_STATUS EFIAPI Udp6Poll(IN EFI_UDP6_PROTOCOL *This)
EFI_STATUS EFIAPI Udp6GetModeData(IN EFI_UDP6_PROTOCOL *This, OUT EFI_UDP6_CONFIG_DATA *Udp6ConfigData OPTIONAL, OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
EFI_STATUS EFIAPI Udp6Groups(IN EFI_UDP6_PROTOCOL *This, IN BOOLEAN JoinFlag, IN EFI_IPv6_ADDRESS *MulticastAddress OPTIONAL)
EFI_STATUS EFIAPI Udp6Transmit(IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token)
UINT8 HopLimit
Hop-Limit override.
UINT32 FlowLabel
Flow-Label override.
UINT8 Protocol
Protocol type override.
EFI_IPv6_ADDRESS StationAddress
EFI_IPv6_ADDRESS RemoteAddress
EFI_IPv6_ADDRESS StationAddress
EFI_IPv6_ADDRESS DestinationAddress
EFI_UDP6_FRAGMENT_DATA FragmentTable[1]
EFI_UDP6_SESSION_DATA * UdpSessionData