private void SendMicrocodeResponse(PUP p) { // // The request PUP contains the file number in the lower-order 16-bits of the pup ID. // Assuming the number is a valid bootfile, we start sending it to the client's port via EFTP. // ushort fileNumber = (ushort)p.ID; Log.Write(LogType.Verbose, LogComponent.MiscServices, "Microcode request is for file {0}.", fileNumber); FileStream microcodeFile = BootServer.GetStreamForNumber(fileNumber); if (microcodeFile == null) { Log.Write(LogType.Warning, LogComponent.MiscServices, "Microcode file {0} does not exist or could not be opened.", fileNumber); } else { // Send the file. The MicrocodeReply protocol is extremely simple: // Just send a sequence of MicrocodeReply PUPs containing the microcode data, // there are no acks or flow control of any kind. Log.Write(LogType.Warning, LogComponent.MiscServices, "Sending microcode file {0}.", fileNumber); SendMicrocodeFile(p.SourcePort, microcodeFile); } }
private void SendBootFile(PUP p) { // // The request PUP contains the file number in the lower-order 16-bits of the pup ID. // Assuming the number is a valid bootfile, we start sending it to the client's port via EFTP. // ushort fileNumber = (ushort)p.ID; Log.Write(LogType.Verbose, LogComponent.MiscServices, "Boot file request is for file {0}.", fileNumber); FileStream bootFile = BootServer.GetStreamForNumber(fileNumber); if (bootFile == null) { Log.Write(LogType.Warning, LogComponent.MiscServices, "Boot file {0} does not exist or could not be opened.", fileNumber); } else { // Send the file. EFTPManager.SendFile(p.SourcePort, bootFile); } }