Changeset 91627 in vbox for trunk/src/VBox/Devices/Network/slirp
- Timestamp:
- Oct 7, 2021 9:27:26 PM (3 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tftp.c
r91626 r91627 642 642 if (RT_FAILURE(rc)) 643 643 { 644 tftpSendError(pData, pTftpSession, 2, "Option negotiation failure (file not found or inaccessible?)", pcTftpIpHeaderRecv);644 tftpSendError(pData, pTftpSession, TFTP_EACCESS, "Option negotiation failure (file not found or inaccessible?)", pcTftpIpHeaderRecv); 645 645 LogFlowFuncLeave(); 646 646 return rc; … … 728 728 else 729 729 { 730 tftpSendError(pData, pTftpSession, 6, "ACK is wrong", pcTftpIpHeaderRecv);730 tftpSendError(pData, pTftpSession, TFTP_EEXIST, "ACK is wrong", pcTftpIpHeaderRecv); 731 731 return -1; 732 732 } … … 765 765 { 766 766 m_freem(pData, m); 767 tftpSendError(pData, pTftpSession, 1, "File not found", pcTftpIpHeaderRecv);767 tftpSendError(pData, pTftpSession, TFTP_ENOENT, "File not found", pcTftpIpHeaderRecv); 768 768 /* send "file not found" error back */ 769 769 return -1; … … 808 808 if (RT_FAILURE(tftpSecurityFilenameCheck(pData, pTftpSession))) 809 809 { 810 tftpSendError(pData, pTftpSession, 2, "Access violation", pTftpIpHeader);810 tftpSendError(pData, pTftpSession, TFTP_EACCESS, "Access violation", pTftpIpHeader); 811 811 LogFlowFuncLeave(); 812 812 return; … … 817 817 if (RT_UNLIKELY(!tftpIsSupportedTransferMode(pTftpSession))) 818 818 { 819 tftpSendError(pData, pTftpSession, 4, "Unsupported transfer mode", pTftpIpHeader);819 tftpSendError(pData, pTftpSession, TFTP_ENOSYS, "Unsupported transfer mode", pTftpIpHeader); 820 820 LogFlowFuncLeave(); 821 821 return; -
trunk/src/VBox/Devices/Network/slirp/tftp.h
r82968 r91627 32 32 #define TFTP_OACK 6 33 33 34 /* error codes */ 35 #define TFTP_EUNDEF 0 /* Not defined, see error message (if any). */ 36 #define TFTP_ENOENT 1 /* File not found. */ 37 #define TFTP_EACCESS 2 /* Access violation. */ 38 #define TFTP_EFBIG 3 /* Disk full or allocation exceeded. */ 39 #define TFTP_ENOSYS 4 /* Illegal TFTP operation. */ 40 #define TFTP_ESRCH 5 /* Unknown transfer ID. */ 41 #define TFTP_EEXIST 6 /* File already exists. */ 42 #define TFTP_EUSER 7 /* No such user. */ 43 /* RFC 2347 */ 44 #define TFTP_EONAK 8 /* Option refused. */ 45 46 34 47 #define TFTP_FILENAME_MAX 512 35 48
Note:
See TracChangeset
for help on using the changeset viewer.