1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 // see https://github.com/adobe/chromium/blob/master/net/base/net_error_list.h
6 #[allow(dead_code, non_camel_case_types)]
7 pub enum NetError {
8     IO_PENDING = 1,
9     FAILED = 2,
10     ABORTED = 3,
11     INVALID_ARGUMENT = 4,
12     INVALID_HANDLE = 5,
13     FILE_NOT_FOUND = 6,
14     TIMED_OUT = 7,
15     FILE_TOO_BIG = 8,
16     UNEXPECTED = 9,
17     ACCESS_DENIED = 10,
18     NOT_IMPLEMENTED = 11,
19     INSUFFICIENT_RESOURCES = 12,
20     OUT_OF_MEMORY = 13,
21     UPLOAD_FILE_CHANGED = 14,
22     SOCKET_NOT_CONNECTED = 15,
23     FILE_EXISTS = 16,
24     FILE_PATH_TOO_LONG = 17,
25     FILE_NO_SPACE = 18,
26     FILE_VIRUS_INFECTED = 19,
27     BLOCKED_BY_CLIENT = 20,
28     NETWORK_CHANGED = 21,
29     BLOCKED_BY_ADMINISTRATOR = 22,
30     SOCKET_IS_CONNECTED = 23,
31     BLOCKED_ENROLLMENT_CHECK_PENDING = 24,
32     UPLOAD_STREAM_REWIND_NOT_SUPPORTED = 25,
33     CONNECTION_CLOSED = 100,
34     CONNECTION_RESET = 101,
35     CONNECTION_REFUSED = 102,
36     CONNECTION_ABORTED = 103,
37     CONNECTION_FAILED = 104,
38     NAME_NOT_RESOLVED = 105,
39     INTERNET_DISCONNECTED = 106,
40     SSL_PROTOCOL_ERROR = 107,
41     ADDRESS_INVALID = 108,
42     ADDRESS_UNREACHABLE = 109,
43     SSL_CLIENT_AUTH_CERT_NEEDED = 110,
44     TUNNEL_CONNECTION_FAILED = 111,
45     NO_SSL_VERSIONS_ENABLED = 112,
46     SSL_VERSION_OR_CIPHER_MISMATCH = 113,
47     SSL_RENEGOTIATION_REQUESTED = 114,
48     PROXY_AUTH_UNSUPPORTED = 115,
49     CERT_ERROR_IN_SSL_RENEGOTIATION = 116,
50     BAD_SSL_CLIENT_AUTH_CERT = 117,
51     CONNECTION_TIMED_OUT = 118,
52     HOST_RESOLVER_QUEUE_TOO_LARGE = 119,
53     SOCKS_CONNECTION_FAILED = 120,
54     SOCKS_CONNECTION_HOST_UNREACHABLE = 121,
55     NPN_NEGOTIATION_FAILED = 122,
56     SSL_NO_RENEGOTIATION = 123,
57     WINSOCK_UNEXPECTED_WRITTEN_BYTES = 124,
58     SSL_DECOMPRESSION_FAILURE_ALERT = 125,
59     SSL_BAD_RECORD_MAC_ALERT = 126,
60     PROXY_AUTH_REQUESTED = 127,
61     SSL_UNSAFE_NEGOTIATION = 128,
62     SSL_WEAK_SERVER_EPHEMERAL_DH_KEY = 129,
63     PROXY_CONNECTION_FAILED = 130,
64     MANDATORY_PROXY_CONFIGURATION_FAILED = 131,
65     PRECONNECT_MAX_SOCKET_LIMIT = 133,
66     SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = 134,
67     SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = 135,
68     PROXY_CERTIFICATE_INVALID = 136,
69     NAME_RESOLUTION_FAILED = 137,
70     NETWORK_ACCESS_DENIED = 138,
71     TEMPORARILY_THROTTLED = 139,
72     HTTPS_PROXY_TUNNEL_RESPONSE = 140,
73     SSL_CLIENT_AUTH_SIGNATURE_FAILED = 141,
74     MSG_TOO_BIG = 142,
75     SPDY_SESSION_ALREADY_EXISTS = 143,
76     WS_PROTOCOL_ERROR = 145,
77     ADDRESS_IN_USE = 147,
78     SSL_HANDSHAKE_NOT_COMPLETED = 148,
79     SSL_BAD_PEER_PUBLIC_KEY = 149,
80     SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = 150,
81     CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = 151,
82     ORIGIN_BOUND_CERT_GENERATION_TYPE_MISMATCH = 152,
83     SSL_DECRYPT_ERROR_ALERT = 153,
84     WS_THROTTLE_QUEUE_TOO_LARGE = 154,
85     SSL_SERVER_CERT_CHANGED = 156,
86     SSL_INAPPROPRIATE_FALLBACK = 157,
87     CT_NO_SCTS_VERIFIED_OK = 158,
88     SSL_UNRECOGNIZED_NAME_ALERT = 159,
89     SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = 160,
90     SOCKET_SET_SEND_BUFFER_SIZE_ERROR = 161,
91     SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = 162,
92     SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = 163,
93     SSL_CLIENT_AUTH_CERT_BAD_FORMAT = 164,
94     SSL_FALLBACK_BEYOND_MINIMUM_VERSION = 165,
95     CERT_COMMON_NAME_INVALID = 200,
96     CERT_DATE_INVALID = 201,
97     CERT_AUTHORITY_INVALID = 202,
98     CERT_CONTAINS_ERRORS = 203,
99     CERT_NO_REVOCATION_MECHANISM = 204,
100     CERT_UNABLE_TO_CHECK_REVOCATION = 205,
101     CERT_REVOKED = 206,
102     CERT_INVALID = 207,
103     CERT_WEAK_SIGNATURE_ALGORITHM = 208,
104     CERT_NON_UNIQUE_NAME = 210,
105     CERT_WEAK_KEY = 211,
106     CERT_NAME_CONSTRAINT_VIOLATION = 212,
107     CERT_VALIDITY_TOO_LONG = 213,
108     CERT_END = 214,
109     INVALID_URL = 300,
110     DISALLOWED_URL_SCHEME = 301,
111     UNKNOWN_URL_SCHEME = 302,
112     TOO_MANY_REDIRECTS = 310,
113     UNSAFE_REDIRECT = 311,
114     UNSAFE_PORT = 312,
115     INVALID_RESPONSE = 320,
116     INVALID_CHUNKED_ENCODING = 321,
117     METHOD_NOT_SUPPORTED = 322,
118     UNEXPECTED_PROXY_AUTH = 323,
119     EMPTY_RESPONSE = 324,
120     RESPONSE_HEADERS_TOO_BIG = 325,
121     PAC_STATUS_NOT_OK = 326,
122     PAC_SCRIPT_FAILED = 327,
123     REQUEST_RANGE_NOT_SATISFIABLE = 328,
124     MALFORMED_IDENTITY = 329,
125     CONTENT_DECODING_FAILED = 330,
126     NETWORK_IO_SUSPENDED = 331,
127     SYN_REPLY_NOT_RECEIVED = 332,
128     ENCODING_CONVERSION_FAILED = 333,
129     UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = 334,
130     INVALID_SPDY_STREAM = 335,
131     NO_SUPPORTED_PROXIES = 336,
132     SPDY_PROTOCOL_ERROR = 337,
133     INVALID_AUTH_CREDENTIALS = 338,
134     UNSUPPORTED_AUTH_SCHEME = 339,
135     ENCODING_DETECTION_FAILED = 340,
136     MISSING_AUTH_CREDENTIALS = 341,
137     UNEXPECTED_SECURITY_LIBRARY_STATUS = 342,
138     MISCONFIGURED_AUTH_ENVIRONMENT = 343,
139     UNDOCUMENTED_SECURITY_LIBRARY_STATUS = 344,
140     RESPONSE_BODY_TOO_BIG_TO_DRAIN = 345,
141     RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = 346,
142     INCOMPLETE_SPDY_HEADERS = 347,
143     PAC_NOT_IN_DHCP = 348,
144     RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = 349,
145     RESPONSE_HEADERS_MULTIPLE_LOCATION = 350,
146     SPDY_SERVER_REFUSED_STREAM = 351,
147     SPDY_PING_FAILED = 352,
148     CONTENT_LENGTH_MISMATCH = 354,
149     INCOMPLETE_CHUNKED_ENCODING = 355,
150     QUIC_PROTOCOL_ERROR = 356,
151     RESPONSE_HEADERS_TRUNCATED = 357,
152     QUIC_HANDSHAKE_FAILED = 358,
153     REQUEST_FOR_SECURE_RESOURCE_OVER_INSECURE_QUIC = 359,
154     SPDY_INADEQUATE_TRANSPORT_SECURITY = 360,
155     SPDY_FLOW_CONTROL_ERROR = 361,
156     SPDY_FRAME_SIZE_ERROR = 362,
157     SPDY_COMPRESSION_ERROR = 363,
158     PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = 364,
159     HTTP_1_1_REQUIRED = 365,
160     PROXY_HTTP_1_1_REQUIRED = 366,
161     CACHE_MISS = 400,
162     CACHE_READ_FAILURE = 401,
163     CACHE_WRITE_FAILURE = 402,
164     CACHE_OPERATION_NOT_SUPPORTED = 403,
165     CACHE_OPEN_FAILURE = 404,
166     CACHE_CREATE_FAILURE = 405,
167     CACHE_RACE = 406,
168     CACHE_CHECKSUM_READ_FAILURE = 407,
169     CACHE_CHECKSUM_MISMATCH = 408,
170     CACHE_LOCK_TIMEOUT = 409,
171     INSECURE_RESPONSE = 501,
172     NO_PRIVATE_KEY_FOR_CERT = 502,
173     ADD_USER_CERT_FAILED = 503,
174     FTP_FAILED = 601,
175     FTP_SERVICE_UNAVAILABLE = 602,
176     FTP_TRANSFER_ABORTED = 603,
177     FTP_FILE_BUSY = 604,
178     FTP_SYNTAX_ERROR = 605,
179     FTP_COMMAND_NOT_SUPPORTED = 606,
180     FTP_BAD_COMMAND_SEQUENCE = 607,
181     PKCS12_IMPORT_BAD_PASSWORD = 701,
182     PKCS12_IMPORT_FAILED = 702,
183     IMPORT_CA_CERT_NOT_CA = 703,
184     IMPORT_CERT_ALREADY_EXISTS = 704,
185     IMPORT_CA_CERT_FAILED = 705,
186     IMPORT_SERVER_CERT_FAILED = 706,
187     PKCS12_IMPORT_INVALID_MAC = 707,
188     PKCS12_IMPORT_INVALID_FILE = 708,
189     PKCS12_IMPORT_UNSUPPORTED = 709,
190     KEY_GENERATION_FAILED = 710,
191     ORIGIN_BOUND_CERT_GENERATION_FAILED = 711,
192     PRIVATE_KEY_EXPORT_FAILED = 712,
193     SELF_SIGNED_CERT_GENERATION_FAILED = 713,
194     CERT_DATABASE_CHANGED = 714,
195     CHANNEL_ID_IMPORT_FAILED = 715,
196     DNS_MALFORMED_RESPONSE = 800,
197     DNS_SERVER_REQUIRES_TCP = 801,
198     DNS_SERVER_FAILED = 802,
199     DNS_TIMED_OUT = 803,
200     DNS_CACHE_MISS = 804,
201     DNS_SEARCH_EMPTY = 805,
202     DNS_SORT_ERROR = 806,
203 }
204