VirtualBox

Changeset 91626 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Oct 7, 2021 9:19:29 PM (3 years ago)
Author:
vboxsync
Message:

NAT/tftp: bugref:9350 - LogRel tftp requests at session allocation time.
Use consistent "NAT:" prefix for messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/tftp.c

    r91623 r91626  
    385385    *ppTftpSession = pTftpSession;
    386386
     387    LogRel(("NAT: TFTP RRQ %s", pTftpSession->szFilename));
     388    const char *pszPrefix = " ";
     389    if (pTftpSession->OptionBlkSize.fRequested)
     390    {
     391        LogRel(("%s" "blksize=%RU64", pszPrefix, pTftpSession->OptionBlkSize.u64Value));
     392        pszPrefix = ", ";
     393    }
     394    if (pTftpSession->OptionTSize.fRequested)
     395    {
     396        LogRel(("%s" "tsize=%RU64", pszPrefix, pTftpSession->OptionTSize.u64Value));
     397        pszPrefix = ", ";
     398    }
     399    if (pTftpSession->OptionTimeout.fRequested)
     400    {
     401        LogRel(("%s" "timeout=%RU64", pszPrefix, pTftpSession->OptionTimeout.u64Value));
     402        pszPrefix = ", ";
     403    }
     404    LogRel(("\n"));
     405
    387406    tftpSessionUpdate(pData, pTftpSession);
    388407
     
    418437}
    419438
    420 DECLINLINE(int) pftpSessionOpenFile(PNATState pData, PTFTPSESSION pTftpSession, bool fVerbose, PRTFILE pSessionFile)
     439DECLINLINE(int) pftpSessionOpenFile(PNATState pData, PTFTPSESSION pTftpSession, PRTFILE pSessionFile)
    421440{
    422441    char szSessionFilename[TFTP_FILENAME_MAX];
     
    438457    else
    439458        rc = VERR_FILENAME_TOO_LONG;
    440     if (fVerbose)
    441         LogRel(("NAT TFTP: %s/%s -> %Rrc\n", tftp_prefix, pTftpSession->szFilename, rc));
     459
    442460    LogFlowFuncLeaveRC(rc);
    443461    return rc;
     
    452470    LogFlowFunc(("pTftpSession:%p\n", pTftpSession));
    453471
    454     rc = pftpSessionOpenFile(pData, pTftpSession, true /*fVerbose*/, &hSessionFile);
     472    rc = pftpSessionOpenFile(pData, pTftpSession, &hSessionFile);
    455473    if (RT_FAILURE(rc))
    456474    {
     
    551569
    552570    u16BlkSize = (uint16_t)pcTftpSession->OptionBlkSize.u64Value;
    553     rc = pftpSessionOpenFile(pData, pcTftpSession, false /*fVerbose*/, &hSessionFile);
     571    rc = pftpSessionOpenFile(pData, pcTftpSession, &hSessionFile);
    554572    if (RT_FAILURE(rc))
    555573    {
     
    825843                     RT_N2H_U16(pTftpIpHeader->Core.u16TftpOpCode),
    826844                     pTftpIpHeader))
    827         LogRel(("NAT TFTP: failure\n"));
     845        LogRel(("NAT: TFTP send failed\n"));
    828846}
    829847
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette