blob: 5703ce873ada29d6b955ce133dd1115ddd4a837c [file] [log] [blame]
San Mehatd1830422010-01-15 08:02:39 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Mike Yuf0e019f2019-03-13 14:43:39 +080017#ifndef NETDUTILS_RESPONSECODE_H
18#define NETDUTILS_RESPONSECODE_H
19
20namespace android {
21namespace netdutils {
San Mehatd1830422010-01-15 08:02:39 -080022
23class ResponseCode {
JP Abgrall8a932722011-07-13 19:17:35 -070024 // Keep in sync with
25 // frameworks/base/services/java/com/android/server/NetworkManagementService.java
San Mehatd1830422010-01-15 08:02:39 -080026public:
27 // 100 series - Requestion action was initiated; expect another reply
28 // before proceeding with a new command.
San Mehat9d10b342010-01-18 09:51:02 -080029 static const int ActionInitiated = 100;
30 static const int InterfaceListResult = 110;
31 static const int TetherInterfaceListResult = 111;
32 static const int TetherDnsFwdTgtListResult = 112;
San Mehatd5573d32010-01-19 17:19:41 -080033 static const int TtyListResult = 113;
JP Abgrallbaeccc42013-06-25 09:44:10 -070034 static const int TetheringStatsListResult = 114;
Lorenzo Colitti667c4772014-08-26 14:13:07 -070035 static const int TetherDnsFwdNetIdResult = 115;
San Mehatd1830422010-01-15 08:02:39 -080036
37 // 200 series - Requested action has been successfully completed
San Mehat8e468962010-04-01 08:31:37 -070038 static const int CommandOkay = 200;
39 static const int TetherStatusResult = 210;
40 static const int IpFwdStatusResult = 211;
San Mehat8e468962010-04-01 08:31:37 -070041 static const int InterfaceGetCfgResult = 213;
Christopher Wileyac392582016-08-02 10:32:25 -070042 // Formerly: int SoftapStatusResult = 214;
San Mehat8e468962010-04-01 08:31:37 -070043 static const int UsbRNDISStatusResult = 215;
44 static const int InterfaceRxCounterResult = 216;
45 static const int InterfaceTxCounterResult = 217;
46 static const int InterfaceRxThrottleResult = 218;
47 static const int InterfaceTxThrottleResult = 219;
JP Abgrall8a932722011-07-13 19:17:35 -070048 static const int QuotaCounterResult = 220;
JP Abgralldb7da582011-09-18 12:57:32 -070049 static const int TetheringStatsResult = 221;
Bernie Innocentif89b3512018-08-30 07:34:37 +090050 // NOTE: keep synced with bionic/libc/dns/net/gethnamaddr.c
Selim Gurunddb34752012-02-27 16:01:42 -080051 static const int DnsProxyQueryResult = 222;
Daniel Drown0da73fc2012-06-20 16:51:39 -050052 static const int ClatdStatusResult = 223;
San Mehatd1830422010-01-15 08:02:39 -080053
54 // 400 series - The command was accepted but the requested action
55 // did not take place.
Selim Gurunddb34752012-02-27 16:01:42 -080056 static const int OperationFailed = 400;
57 static const int DnsProxyOperationFailed = 401;
Robert Greenwalt745e09f2012-03-29 14:45:54 -070058 static const int ServiceStartFailed = 402;
59 static const int ServiceStopFailed = 403;
San Mehatd1830422010-01-15 08:02:39 -080060
61 // 500 series - The command was not accepted and the requested
62 // action did not take place.
63 static const int CommandSyntaxError = 500;
64 static const int CommandParameterError = 501;
65
66 // 600 series - Unsolicited broadcasts
Robert Greenwalt745e09f2012-03-29 14:45:54 -070067 static const int InterfaceChange = 600;
68 static const int BandwidthControl = 601;
69 static const int ServiceDiscoveryFailed = 602;
70 static const int ServiceDiscoveryServiceAdded = 603;
71 static const int ServiceDiscoveryServiceRemoved = 604;
72 static const int ServiceRegistrationFailed = 605;
73 static const int ServiceRegistrationSucceeded = 606;
74 static const int ServiceResolveFailed = 607;
75 static const int ServiceResolveSuccess = 608;
76 static const int ServiceSetHostnameFailed = 609;
77 static const int ServiceSetHostnameSuccess = 610;
78 static const int ServiceGetAddrInfoFailed = 611;
79 static const int ServiceGetAddrInfoSuccess = 612;
Haoyu Baidb28cbe2012-07-17 10:32:58 -070080 static const int InterfaceClassActivity = 613;
Lorenzo Colitti9b3cd762013-08-02 05:57:47 +090081 static const int InterfaceAddressChange = 614;
Lorenzo Colitti12acae82013-10-24 14:51:57 +090082 static const int InterfaceDnsInfo = 615;
Lorenzo Colittibd0f2242014-06-12 13:51:05 +090083 static const int RouteChange = 616;
Jeff Sharkeyfbe497f2014-10-28 16:50:07 -070084 static const int StrictCleartext = 617;
San Mehatd1830422010-01-15 08:02:39 -080085};
Mike Yuf0e019f2019-03-13 14:43:39 +080086
87} // namespace netdutils
88} // namespace android
89
90#endif // NETDUTILS_RESPONSECODE_H