1//
2// TORControlReplyCode.h
3// Tor
4//
5// Created by Denis Kutlubaev on 30.03.2021.
6//
7
8#ifndef TORControlReplyCode_h
9#define TORControlReplyCode_h
10
11/**
12 TOR control reply codes
13 https://github.com/torproject/torspec/blob/master/control-spec.txt
14
15 The following codes are defined:
16
17 250 OK
18 251 Operation was unnecessary
19 [Tor has declined to perform the operation, but no harm was done.]
20
21 451 Resource exhausted
22
23 500 Syntax error: protocol
24
25 510 Unrecognized command
26 511 Unimplemented command
27 512 Syntax error in command argument
28 513 Unrecognized command argument
29 514 Authentication required
30 515 Bad authentication
31
32 550 Unspecified Tor error
33
34 551 Internal error
35 [Something went wrong inside Tor, so that the client's
36 request couldn't be fulfilled.]
37
38 552 Unrecognized entity
39 [A configuration key, a stream ID, circuit ID, event,
40 mentioned in the command did not actually exist.]
41
42 553 Invalid configuration value
43 [The client tried to set a configuration option to an
44 incorrect, ill-formed, or impossible value.]
45
46 554 Invalid descriptor
47
48 555 Unmanaged entity
49
50 650 Asynchronous event notification
51 */
52typedef NS_ENUM(NSInteger, TORControlReplyCode) {
53 TORControlReplyCodeOK = 250,
54 TORControlReplyCodeOperationWasUnnecessary = 251,
55 TORControlReplyCodeResourceExhaused = 451,
56 TORControlReplyCodeSyntaxErrorProtocol = 500,
57 TORControlReplyCodeUnrecognizedCommand = 510,
58 TORControlReplyCodeUnimplementedCommand = 511,
59 TORControlReplyCodeSyntaxErrorInCommandArgument = 512,
60 TORControlReplyCodeUnrecognizedCommandArgument = 513,
61 TORControlReplyCodeAuthenticationRequired = 514,
62 TORControlReplyCodeBadAuthentication = 515,
63 TORControlReplyCodeUnspecifiedTorError = 550,
64 TORControlReplyCodeInternalError = 551,
65 TORControlReplyCodeUnrecognizedEntity = 552,
66 TORControlReplyCodeInvalidConfigurationValue = 553,
67 TORControlReplyCodeInvalidDescriptor = 554,
68 TORControlReplyCodeUnmanagedEntity = 555,
69 TORControlReplyCodeAsynchronousEventNotification = 650
70};
71
72#endif /* TORControlReplyCode_h */