The new console will have a vast array of options for initiating reports of error conditions. From emailing to phone calling to paging to faxing to displaying cries for help to firing flares, the new console will be eminently capable of requesting help when something has gone wrong.
While it would certainly be beneficial for everything which could experience a problem to be able to report it, it would be onerous in the extreme for each of them to know how they should report the error and to be capable of every type of error reporting.
The answer, then, is not to reduce the ability of every component to signal distress, but to aggregate this ability into a single location. This single location is the Error Daemon.
Reporting errors to the error daemon uses a simple protocol. The daemon listens on port 30901 for connections from the local host. It must not accept connections except from the local host, so that challenge-response authentication is not required.
Once the client makes a connection to the error daemon, it then sends the following data packet. (Note: a string is a standard java serialization of a string, i.e. a 2 byte unsigned short indicating the length (in bytes) of the string followed by the string encoded in UTF-8.)
Byte Count | Data Type | Value | Description | ||||||||||||||||
2-65,537 | String | A short identifier which can be used to route errors to different destinations. | |||||||||||||||||
1 | unsigned byte |
The urgency of the message:
|
|||||||||||||||||
2-65,537 | String | A human-readable and user-friendly description of what the problem is. | |||||||||||||||||
2-65,537 | String | Diagnostic information. This is information which is meant to be forwarded to a technician to be used to fix the problem. |
The error daemon does not respond, and the client should close the connection once it is finished sending the packet. (There's no point in finding out if error reporting didn't work, since if error reporting isn't working, you can't report that error.)
This is not a versioned protocol because it is so simple. If it ever becomes necessary to change the protocol in an incompatible way, that new protocol can simply be listened for on a different port.
[This has not yet been defined.]