OSDN Git Service

Move netd_client into netd.
[android-x86/system-netd.git] / server / ResponseCode.h
1 /*
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
17 #ifndef _RESPONSECODE_H
18 #define _RESPONSECODE_H
19
20 class ResponseCode {
21     // Keep in sync with
22     // frameworks/base/services/java/com/android/server/NetworkManagementService.java
23 public:
24     // 100 series - Requestion action was initiated; expect another reply
25     // before proceeding with a new command.
26     static const int ActionInitiated           = 100;
27     static const int InterfaceListResult       = 110;
28     static const int TetherInterfaceListResult = 111;
29     static const int TetherDnsFwdTgtListResult = 112;
30     static const int TtyListResult             = 113;
31     static const int TetheringStatsListResult  = 114;
32
33     // 200 series - Requested action has been successfully completed
34     static const int CommandOkay               = 200;
35     static const int TetherStatusResult        = 210;
36     static const int IpFwdStatusResult         = 211;
37     static const int InterfaceGetCfgResult     = 213;
38     static const int SoftapStatusResult        = 214;
39     static const int UsbRNDISStatusResult      = 215;
40     static const int InterfaceRxCounterResult  = 216;
41     static const int InterfaceTxCounterResult  = 217;
42     static const int InterfaceRxThrottleResult = 218;
43     static const int InterfaceTxThrottleResult = 219;
44     static const int QuotaCounterResult        = 220;
45     static const int TetheringStatsResult      = 221;
46     static const int DnsProxyQueryResult       = 222;
47     static const int ClatdStatusResult         = 223;
48     static const int InterfaceGetMtuResult     = 224;
49     static const int GetMarkResult             = 225;
50
51     // 400 series - The command was accepted but the requested action
52     // did not take place.
53     static const int OperationFailed           = 400;
54     static const int DnsProxyOperationFailed   = 401;
55     static const int ServiceStartFailed        = 402;
56     static const int ServiceStopFailed         = 403;
57
58     // 500 series - The command was not accepted and the requested
59     // action did not take place.
60     static const int CommandSyntaxError = 500;
61     static const int CommandParameterError = 501;
62
63     // 600 series - Unsolicited broadcasts
64     static const int InterfaceChange                = 600;
65     static const int BandwidthControl               = 601;
66     static const int ServiceDiscoveryFailed         = 602;
67     static const int ServiceDiscoveryServiceAdded   = 603;
68     static const int ServiceDiscoveryServiceRemoved = 604;
69     static const int ServiceRegistrationFailed      = 605;
70     static const int ServiceRegistrationSucceeded   = 606;
71     static const int ServiceResolveFailed           = 607;
72     static const int ServiceResolveSuccess          = 608;
73     static const int ServiceSetHostnameFailed       = 609;
74     static const int ServiceSetHostnameSuccess      = 610;
75     static const int ServiceGetAddrInfoFailed       = 611;
76     static const int ServiceGetAddrInfoSuccess      = 612;
77     static const int InterfaceClassActivity         = 613;
78     static const int InterfaceAddressChange         = 614;
79     static const int InterfaceDnsInfo               = 615;
80 };
81 #endif