1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.tetheroffload.control@1.0;
enum OffloadCallbackEvent : uint32_t {
/**
* Indicate that a working configuration has been programmed and the
* hardware management process has begun forwarding traffic.
*/
OFFLOAD_STARTED = 1,
/**
* Indicate that an error has occurred which has disrupted hardware
* acceleration. Software routing may still be attempted; however,
* statistics may be temporarily unavailable. Statistics may be recovered
* after OFFLOAD_SUPPORT_AVAILABLE event is fired.
*/
OFFLOAD_STOPPED_ERROR = 2,
/**
* Indicate that the device has moved to a RAT on which hardware
* acceleration is not supported. Subsequent calls to setUpstreamParameters
* and add/removeDownstream will likely fail and cannot be presumed to be
* saved inside of the hardware management process. Upon receiving
* OFFLOAD_SUPPORT_AVAIALBLE, the client may reprogram the hardware
* management process to begin offload again.
*/
OFFLOAD_STOPPED_UNSUPPORTED = 3,
/**
* Indicate that the hardware management process is willing and able to
* provide support for hardware acceleration at this time. If applicable,
* the client may query for statistics. If offload is desired, the client
* must reprogram the hardware management process.
*/
OFFLOAD_SUPPORT_AVAILABLE = 4,
/**
* Hardware acceleration is no longer in effect and must be reprogrammed
* in order to resume. This event is fired when the limit, applied in
* setDataLimit, has expired. It is recommended that the client query for
* statistics immediately after receiving this event.
*/
OFFLOAD_STOPPED_LIMIT_REACHED = 5
};
enum NetworkProtocol : uint32_t {
TCP = 6,
UDP = 17
};
struct IPv4AddrPortPair {
/** IPv4 Address and Port */
string addr; // for e.g. 192.168.1.12
uint16_t port; // for e.g. 8080
};
struct NatTimeoutUpdate {
IPv4AddrPortPair src;
IPv4AddrPortPair dst;
NetworkProtocol proto;
};
|