Lines Matching refs:Instance
23 @param[in] Instance The pointer to the Mtftp6 instance.
33 IN MTFTP6_INSTANCE *Instance,
48 UdpPacket = NetbufAlloc (Instance->BlkSize + MTFTP6_DATA_HEAD_LEN);
67 Token = Instance->Token;
68 DataLen = Instance->BlkSize;
71 Start = MultU64x32 (BlockNum - 1, Instance->BlkSize);
73 if (Token->BufferSize < Start + Instance->BlkSize) {
75 Instance->LastBlk = BlockNum;
76 Mtftp6SetLastBlockNum (&Instance->BlkList, BlockNum);
89 Status = Token->PacketNeeded (&Instance->Mtftp6, Token, &DataLen, (VOID*) &DataBuf);
91 if (EFI_ERROR (Status) || (DataLen > Instance->BlkSize)) {
99 Instance,
107 if (DataLen < Instance->BlkSize) {
108 Instance->LastBlk = BlockNum;
109 Mtftp6SetLastBlockNum (&Instance->BlkList, BlockNum);
120 // Reset current retry count of the instance.
122 Instance->CurRetry = 0;
124 return Mtftp6TransmitPacket (Instance, UdpPacket);
133 @param[in] Instance The pointer to the Mtftp6 instance.
147 IN MTFTP6_INSTANCE *Instance,
160 Expected = Mtftp6GetNextBlockNum (&Instance->BlkList);
177 Mtftp6RemoveBlockNum (&Instance->BlkList, AckNum, *IsCompleted, &TotalBlock);
179 Expected = Mtftp6GetNextBlockNum (&Instance->BlkList);
187 if (Instance->LastBlk == AckNum) {
188 ASSERT (Instance->LastBlk >= 1);
203 Instance,
219 return Mtftp6WrqSendBlock (Instance, (UINT16) Expected);
269 @param[in] Instance The pointer to the Mtftp6 instance.
283 IN MTFTP6_INSTANCE *Instance,
303 Expected = Mtftp6GetNextBlockNum (&Instance->BlkList);
323 if (EFI_ERROR(Status) || !Mtftp6WrqOackValid (&ExtInfo, &Instance->ExtInfo)) {
339 Instance,
349 Instance->BlkSize = ExtInfo.BlkSize;
353 Instance->Timeout = ExtInfo.Timeout;
364 Instance,
378 @param[in] IoStatus The status from Udp6 instance.
391 MTFTP6_INSTANCE *Instance;
399 Instance = (MTFTP6_INSTANCE *) Context;
401 NET_CHECK_SIGNATURE (Instance, MTFTP6_INSTANCE_SIGNATURE);
409 // Return error status if Udp6 instance failed to receive.
426 if (UdpEpt->RemotePort != Instance->ServerDataPort) {
427 if (Instance->ServerDataPort != 0) {
430 Instance->ServerDataPort = UdpEpt->RemotePort;
461 if (Instance->Token->CheckPacket != NULL &&
465 Status = Instance->Token->CheckPacket (
466 &Instance->Mtftp6,
467 Instance->Token,
487 Instance,
509 Status = Mtftp6WrqHandleAck (Instance, Packet, Len, &UdpPacket, &IsCompleted);
519 Status = Mtftp6WrqHandleOack (Instance, Packet, Len, &UdpPacket, &IsCompleted);
545 Instance->UdpIo,
547 Instance,
555 Mtftp6OperationClean (Instance, Status);
561 Start the Mtftp6 instance to upload. It will first init some states,
564 @param[in] Instance The pointer to the Mtftp6 instance.
573 IN MTFTP6_INSTANCE *Instance,
585 Status = Mtftp6InitBlockRange (&Instance->BlkList, 0, 0xffff);
591 Status = Mtftp6SendRequest (Instance, Operation);
598 Instance->UdpIo,
600 Instance,