Changeset 42014 in vbox
- Timestamp:
- Jul 4, 2012 6:46:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tftp.c
r42013 r42014 215 215 } 216 216 217 /**218 * This function returns the tftp transfer mode219 * @param pTftpIpHeader header of tftp (includes IP, UDP and TFTP) it's required for validating that buffer comming220 * in pcu8Options is comes right after header.221 * @param pcu8Options pointer to options buffer222 * @param cbOptions size of the options buffer223 */224 DECLINLINE(char *) tftpOptionMode(PCTFTPIPHDR pTftpIpHeader, const uint8_t *pcu8Options, int cbOptions)225 {226 int idxOptDesc = 0;227 AssertPtrReturn(pTftpIpHeader, NULL);228 AssertPtrReturn(pcu8Options, NULL);229 AssertReturn(cbOptions >= 4, NULL);230 /* @todo validate that Mode Option just after filename of TFTP */231 for (idxOptDesc = 0; idxOptDesc < RT_ELEMENTS(g_TftpTransferFmtDesc); ++idxOptDesc)232 {233 if (!RTStrNICmp(g_TftpTransferFmtDesc[idxOptDesc].pszName, (const char *)pcu8Options, cbOptions))234 return (char *)g_TftpTransferFmtDesc[idxOptDesc].pszName;235 }236 return NULL;237 }238 217 239 218 /**
Note:
See TracChangeset
for help on using the changeset viewer.