HC's capture the flag site
CTF gameserver

Game server testscript return values

Note: These return codes are valid for the 0.72 version of the gamerserver.

This is a list of error codes, along with a short explanation.

Note: The error code is calculated as follows.

RETVAL = error + (bitfield << 1) + (errortype << 2)

You don't have to worry about that, however, as the resulting return codes are listed below.

0: Everything OK

Error code 0 means that the requested operation (store, retrieve, test) was completed successfully.

1: Connection error

An attempt to connect to the service failed. Return this if your testscript is unable to connect to the service on the network level.

5: Wrong flag

The service responded to a request according to procotol, but sent no flag / a wrong flag. Return this if the returned flag does not match the flag passed to your testscript as command line argument by the scoring bot.

9: Service lacks functionality

The service lacks some functionality not related to flag storage / retrieval. You should check all of your service's functionality, even if it is not relevant for flag storage / retrieval. If such non-relevant functionality does not exist (anymore), return this error code.

13: Service response timeout

The service did not respond in time. You usually do not have to care for this yourself; if your testscripts does not terminate after 60 seconds or so, it is forcefully terminated by the scoring bot.

17: Status unknown

The gameserver cannot determine the status of the service. You usually do not need this one.

21: Error

An error occured. Use this one if no other error code matches; describe the error by sending a line no longer than 256 chars to stdout.

25: Protocol violation

The service violated some specification of the protocol. You may and should define your own protocol, or use some standard protocol (possibly violating the RFCs at some point). Whenever your protocol is violated by the service, you should return this error.

$Id: errorcodes.html 405 2008-10-30 13:14:44Z hc $ Impressum