Hi all,

I have some question about the mtftp4 protocol.

When i use the "EFI_MTFTP4_PROTOCOL.GetInfo()" function to get the file
size of server's file.
And server will send a OACK packet to client for file info.
And client should use "EFI_MTFTP4_PROTOCOL.ParseOptions()" to parsing the
OACK packet.

But my mtftp protol send an error packet to server such as following
message before the EFI_MTFTP4_PROTOCOL.ParseOptions.
+++++++++++++++++++++++++++++++++++++++++++++++++
++ Opcode: Error Code (5)
++ Error code: Option negotiation failed (8)
++ Error message: User aborted the transfer
+++++++++++++++++++++++++++++++++++++++++++++++++

And i also trace the mtftp protocol source from
MdeModulePkg\Universal\Network\Mtftp4Dxe.
This error message was send by the Mtftp4RrqInput of Mtftp4Rrq.c file.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++if ((Instance->Token->CheckPacket != NULL) &&
++    ((Opcode == EFI_MTFTP4_OPCODE_OACK) || (Opcode ==
EFI_MTFTP4_OPCODE_ERROR))) {
++  Status = Instance->Token->CheckPacket (
++                              &Instance->Mtftp4,
++                              Instance->Token,
++                              (UINT16) Len,
++                              Packet
++                             );
======> The status was "EFI_ABORTED"
++  if (EFI_ERROR (Status)) {
++    //
++    // Send an error message to the server to inform it
++    //
++    if (Opcode != EFI_MTFTP4_OPCODE_ERROR) {
++      Mtftp4SendError (
++        Instance,
++        EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
++        (UINT8 *) "User aborted the transfer"
++        );
++    }
++  ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

But i don't know why the "Instance->Token->CheckPacket" send error status
back.
This CheckPacket callback function is represent for what function in the
mtftp4 flow?
According the uefi spec, the "EFI_MTFTP4_PROTOCOL.GetInfo()" function
doesn't meantion any EFI_MTFTP4_TOKEN member, but only in
"EFI_MTFTP4_PROTOCOL.ReadFile()".

Please give some help about this error message.


Thanks
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to