| | | |
Offset 1, 15 lines modified | Offset 1, 13 lines modified |
1 | .class·public·Lcom/android/networkstack/tethering/PrivateAddressCoordinator; | 1 | .class·public·Lcom/android/networkstack/tethering/PrivateAddressCoordinator; |
2 | .super·Ljava/lang/Object; | 2 | .super·Ljava/lang/Object; |
3 | .source·"PrivateAddressCoordinator.java" | 3 | .source·"PrivateAddressCoordinator.java" |
| |
| |
4 | #·instance·fields | 4 | #·instance·fields |
5 | .field·private·final·mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration; | |
| |
6 | .field·private·final·mConnectivityMgr:Landroid/net/ConnectivityManager; | 5 | .field·private·final·mConnectivityMgr:Landroid/net/ConnectivityManager; |
| |
7 | .field·private·final·mDownstreams:Landroid/util/ArraySet; | 6 | .field·private·final·mDownstreams:Landroid/util/ArraySet; |
8 | ····.annotation·system·Ldalvik/annotation/Signature; | 7 | ····.annotation·system·Ldalvik/annotation/Signature; |
9 | ········value·=·{ | 8 | ········value·=·{ |
10 | ············"Landroid/util/ArraySet<", | 9 | ············"Landroid/util/ArraySet<", |
11 | ············"Landroid/net/ip/IpServer;", | 10 | ············"Landroid/net/ip/IpServer;", |
Offset 30, 75 lines modified | Offset 28, 72 lines modified |
30 | ············">;>;" | 28 | ············">;>;" |
31 | ········} | 29 | ········} |
32 | ····.end·annotation | 30 | ····.end·annotation |
33 | .end·field | 31 | .end·field |
| |
| |
34 | #·direct·methods | 32 | #·direct·methods |
35 | .method·public·constructor·<init>(Landroid/content/Context;Lcom/android/networkstack/tethering/TetheringConfiguration;)V | 33 | .method·public·constructor·<init>(Landroid/content/Context;)V |
36 | ····.locals·2 | 34 | ····.locals·2 |
| |
37 | ····.line·82 | 35 | ····.line·74 |
38 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V | 36 | ····invoke-direct·{p0},·Ljava/lang/Object;-><init>()V |
| |
39 | ····.line·83 | 37 | ····.line·75 |
40 | ····new-instance·v0,·Landroid/util/ArraySet; | 38 | ····new-instance·v0,·Landroid/util/ArraySet; |
| |
41 | ····invoke-direct·{v0},·Landroid/util/ArraySet;-><init>()V | 39 | ····invoke-direct·{v0},·Landroid/util/ArraySet;-><init>()V |
| |
42 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 40 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
43 | ····.line·84 | 41 | ····.line·76 |
44 | ····new-instance·v0,·Landroid/util/ArrayMap; | 42 | ····new-instance·v0,·Landroid/util/ArrayMap; |
| |
45 | ····invoke-direct·{v0},·Landroid/util/ArrayMap;-><init>()V | 43 | ····invoke-direct·{v0},·Landroid/util/ArrayMap;-><init>()V |
| |
46 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 44 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
47 | ····.line·85 | 45 | ····.line·77 |
48 | ····new-instance·v0,·Landroid/net/IpPrefix; | 46 | ····new-instance·v0,·Landroid/net/IpPrefix; |
| |
49 | ····const-string·v1,·"192.168.0.0/16" | 47 | ····const-string·v1,·"192.168.0.0/16" |
| |
50 | ····invoke-direct·{v0,·v1},·Landroid/net/IpPrefix;-><init>(Ljava/lang/String;)V | 48 | ····invoke-direct·{v0,·v1},·Landroid/net/IpPrefix;-><init>(Ljava/lang/String;)V |
| |
51 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix; | 49 | ····iput-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix; |
| |
52 | ····const-string·v0,·"connectivity" | 50 | ····const-string·v0,·"connectivity" |
| |
53 | ····.line·86 | 51 | ····.line·78 |
54 | ····invoke-virtual·{p1,·v0},·Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; | 52 | ····invoke-virtual·{p1,·v0},·Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; |
| |
55 | ····move-result-object·p1 | 53 | ····move-result-object·p1 |
| |
56 | ····check-cast·p1,·Landroid/net/ConnectivityManager; | 54 | ····check-cast·p1,·Landroid/net/ConnectivityManager; |
| |
57 | ····iput-object·p1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager; | 55 | ····iput-object·p1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager; |
| |
58 | ····.line·88 | |
59 | ····iput-object·p2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration; | |
| |
60 | ····return-void | 56 | ····return-void |
61 | .end·method | 57 | .end·method |
| |
62 | .method·private·getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; | 58 | .method·private·getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; |
63 | ····.locals·0 | 59 | ····.locals·0 |
| |
64 | ····.line·250 | 60 | ····.line·233 |
65 | ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->getAddress()Landroid/net/LinkAddress; | 61 | ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->getAddress()Landroid/net/LinkAddress; |
| |
66 | ····move-result-object·p0 | 62 | ····move-result-object·p0 |
| |
67 | ····if-nez·p0,·:cond_0 | 63 | ····if-nez·p0,·:cond_0 |
| |
68 | ····const/4·p0,·0x0 | 64 | ····const/4·p0,·0x0 |
| |
69 | ····return-object·p0 | 65 | ····return-object·p0 |
| |
70 | ····.line·253 | 66 | ····.line·236 |
71 | ····:cond_0 | 67 | ····:cond_0 |
72 | ····invoke-static·{p0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix; | 68 | ····invoke-static·{p0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix; |
| |
73 | ····move-result-object·p0 | 69 | ····move-result-object·p0 |
| |
74 | ····return-object·p0 | 70 | ····return-object·p0 |
75 | .end·method | 71 | .end·method |
Offset 113, 20 lines modified | Offset 108, 20 lines modified |
113 | ············">;)", | 108 | ············">;)", |
114 | ············"Ljava/util/ArrayList<", | 109 | ············"Ljava/util/ArrayList<", |
115 | ············"Landroid/net/IpPrefix;", | 110 | ············"Landroid/net/IpPrefix;", |
116 | ············">;" | 111 | ············">;" |
117 | ········} | 112 | ········} |
118 | ····.end·annotation | 113 | ····.end·annotation |
| |
119 | ····.line·107 | 114 | ····.line·98 |
120 | ····new-instance·p0,·Ljava/util/ArrayList; | 115 | ····new-instance·p0,·Ljava/util/ArrayList; |
| |
121 | ····invoke-direct·{p0},·Ljava/util/ArrayList;-><init>()V | 116 | ····invoke-direct·{p0},·Ljava/util/ArrayList;-><init>()V |
| |
122 | ····.line·108 | 117 | ····.line·99 |
123 | ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator; | 118 | ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator; |
| |
124 | ····move-result-object·p1 | 119 | ····move-result-object·p1 |
| |
125 | ····:goto_0 | 120 | ····:goto_0 |
126 | ····invoke-interface·{p1},·Ljava/util/Iterator;->hasNext()Z | 121 | ····invoke-interface·{p1},·Ljava/util/Iterator;->hasNext()Z |
| |
Offset 136, 24 lines modified | Offset 131, 24 lines modified |
| |
136 | ····invoke-interface·{p1},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 131 | ····invoke-interface·{p1},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
137 | ····move-result-object·v0 | 132 | ····move-result-object·v0 |
| |
138 | ····check-cast·v0,·Landroid/net/LinkAddress; | 133 | ····check-cast·v0,·Landroid/net/LinkAddress; |
| |
139 | ····.line·109 | 134 | ····.line·100 |
140 | ····invoke-virtual·{v0},·Landroid/net/LinkAddress;->isIpv4()Z | 135 | ····invoke-virtual·{v0},·Landroid/net/LinkAddress;->isIpv4()Z |
| |
141 | ····move-result·v1 | 136 | ····move-result·v1 |
| |
142 | ····if-nez·v1,·:cond_0 | 137 | ····if-nez·v1,·:cond_0 |
| |
143 | ····goto·:goto_0 | 138 | ····goto·:goto_0 |
| |
144 | ····.line·111 | 139 | ····.line·102 |
145 | ····:cond_0 | 140 | ····:cond_0 |
146 | ····invoke-static·{v0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix; | 141 | ····invoke-static·{v0},·Landroid/net/util/PrefixUtils;->asIpPrefix(Landroid/net/LinkAddress;)Landroid/net/IpPrefix; |
| |
147 | ····move-result-object·v0 | 142 | ····move-result-object·v0 |
| |
148 | ····invoke-virtual·{p0,·v0},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z | 143 | ····invoke-virtual·{p0,·v0},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z |
| |
Offset 166, 15 lines modified | Offset 161, 15 lines modified |
166 | .method·private·varargs·getSanitizedAddressSuffix(I[B)B | 161 | .method·private·varargs·getSanitizedAddressSuffix(I[B)B |
167 | ····.locals·2 | 162 | ····.locals·2 |
| |
168 | ····and-int/lit16·p0,·p1,·0xff | 163 | ····and-int/lit16·p0,·p1,·0xff |
| |
169 | ····int-to-byte·p0,·p0 | 164 | ····int-to-byte·p0,·p0 |
| |
170 | ····.line·204 | 165 | ····.line·187 |
171 | ····array-length·p1,·p2 | 166 | ····array-length·p1,·p2 |
| |
172 | ····const/4·v0,·0x0 | 167 | ····const/4·v0,·0x0 |
| |
173 | ····:goto_0 | 168 | ····:goto_0 |
174 | ····if-ge·v0,·p1,·:cond_1 | 169 | ····if-ge·v0,·p1,·:cond_1 |
| |
Offset 202, 15 lines modified | Offset 197, 15 lines modified |
202 | ············"(", | 197 | ············"(", |
203 | ············"Ljava/util/List<", | 198 | ············"Ljava/util/List<", |
204 | ············"Landroid/net/IpPrefix;", | 199 | ············"Landroid/net/IpPrefix;", |
205 | ············">;)V" | 200 | ············">;)V" |
206 | ········} | 201 | ········} |
207 | ····.end·annotation | 202 | ····.end·annotation |
| |
208 | ····.line·118 | 203 | ····.line·109 |
209 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 204 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
210 | ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; | 205 | ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; |
| |
211 | ····move-result-object·v0 | 206 | ····move-result-object·v0 |
| |
212 | ····:cond_0 | 207 | ····:cond_0 |
Offset 223, 24 lines modified | Offset 218, 24 lines modified |
| |
223 | ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 218 | ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
224 | ····move-result-object·v1 | 219 | ····move-result-object·v1 |
| |
225 | ····check-cast·v1,·Landroid/net/ip/IpServer; | 220 | ····check-cast·v1,·Landroid/net/ip/IpServer; |
| |
226 | ····.line·119 | 221 | ····.line·110 |
227 | ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; | 222 | ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; |
| |
228 | ····move-result-object·v2 | 223 | ····move-result-object·v2 |
| |
229 | ····if-nez·v2,·:cond_1 | 224 | ····if-nez·v2,·:cond_1 |
| |
230 | ····goto·:goto_0 | 225 | ····goto·:goto_0 |
| |
231 | ····.line·122 | 226 | ····.line·113 |
232 | ····:cond_1 | 227 | ····:cond_1 |
233 | ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator; | 228 | ····invoke-interface·{p1},·Ljava/util/List;->iterator()Ljava/util/Iterator; |
| |
234 | ····move-result-object·v3 | 229 | ····move-result-object·v3 |
| |
235 | ····:cond_2 | 230 | ····:cond_2 |
236 | ····invoke-interface·{v3},·Ljava/util/Iterator;->hasNext()Z | 231 | ····invoke-interface·{v3},·Ljava/util/Iterator;->hasNext()Z |
Offset 251, 58 lines modified | Offset 246, 58 lines modified |
| |
251 | ····invoke-interface·{v3},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 246 | ····invoke-interface·{v3},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
252 | ····move-result-object·v4 | 247 | ····move-result-object·v4 |
| |
253 | ····check-cast·v4,·Landroid/net/IpPrefix; | 248 | ····check-cast·v4,·Landroid/net/IpPrefix; |
| |
254 | ····.line·123 | 249 | ····.line·114 |
255 | ····invoke-direct·{p0,·v4,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z | 250 | ····invoke-direct·{p0,·v4,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z |
| |
256 | ····move-result·v4 | 251 | ····move-result·v4 |
| |
257 | ····if-eqz·v4,·:cond_2 | 252 | ····if-eqz·v4,·:cond_2 |
| |
258 | ····const/16·v2,·0x71 | 253 | ····const/16·v2,·0x71 |
| |
259 | ····.line·124 | 254 | ····.line·115 |
260 | ····invoke-virtual·{v1,·v2},·Lcom/android/networkstack/tethering/util/StateMachine;->sendMessage(I)V | 255 | ····invoke-virtual·{v1,·v2},·Lcom/android/networkstack/tethering/util/StateMachine;->sendMessage(I)V |
| |
261 | ····goto·:goto_0 | 256 | ····goto·:goto_0 |
| |
262 | ····:cond_3 | 257 | ····:cond_3 |
263 | ····return-void | 258 | ····return-void |
264 | .end·method | 259 | .end·method |
| |
265 | .method·private·isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z | 260 | .method·private·isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z |
266 | ····.locals·1 | 261 | ····.locals·1 |
| |
267 | ····.line·232 | 262 | ····.line·215 |
268 | ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getPrefixLength()I | 263 | ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getPrefixLength()I |
| |
269 | ····move-result·p0 | 264 | ····move-result·p0 |
| |
270 | ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getPrefixLength()I | 265 | ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getPrefixLength()I |
| |
271 | ····move-result·v0 | 266 | ····move-result·v0 |
| |
272 | ····if-ge·p0,·v0,·:cond_0 | 267 | ····if-ge·p0,·v0,·:cond_0 |
| |
273 | ····.line·233 | 268 | ····.line·216 |
274 | ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress; | 269 | ····invoke-virtual·{p1},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress; |
| |
275 | ····move-result-object·p0 | 270 | ····move-result-object·p0 |
| |
276 | ····invoke-virtual·{p2,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z | 271 | ····invoke-virtual·{p2,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z |
| |
277 | ····move-result·p0 | 272 | ····move-result·p0 |
| |
278 | ····return·p0 | 273 | ····return·p0 |
| |
279 | ····.line·236 | 274 | ····.line·219 |
280 | ····:cond_0 | 275 | ····:cond_0 |
281 | ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress; | 276 | ····invoke-virtual·{p2},·Landroid/net/IpPrefix;->getAddress()Ljava/net/InetAddress; |
| |
282 | ····move-result-object·p0 | 277 | ····move-result-object·p0 |
| |
283 | ····invoke-virtual·{p1,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z | 278 | ····invoke-virtual·{p1,·p0},·Landroid/net/IpPrefix;->contains(Ljava/net/InetAddress;)Z |
| |
Offset 314, 34 lines modified | Offset 309, 34 lines modified |
314 | .method·private·isConflictWithUpstream(Landroid/net/IpPrefix;)Z | 309 | .method·private·isConflictWithUpstream(Landroid/net/IpPrefix;)Z |
315 | ····.locals·4 | 310 | ····.locals·4 |
| |
316 | ····const/4·v0,·0x0 | 311 | ····const/4·v0,·0x0 |
| |
317 | ····move·v1,·v0 | 312 | ····move·v1,·v0 |
| |
318 | ····.line·222 | 313 | ····.line·205 |
319 | ····:goto_0 | 314 | ····:goto_0 |
320 | ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 315 | ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
321 | ····invoke-virtual·{v2},·Landroid/util/ArrayMap;->size()I | 316 | ····invoke-virtual·{v2},·Landroid/util/ArrayMap;->size()I |
| |
322 | ····move-result·v2 | 317 | ····move-result·v2 |
| |
323 | ····if-ge·v1,·v2,·:cond_2 | 318 | ····if-ge·v1,·v2,·:cond_2 |
| |
324 | ····.line·223 | 319 | ····.line·206 |
325 | ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 320 | ····iget-object·v2,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
326 | ····invoke-virtual·{v2,·v1},·Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object; | 321 | ····invoke-virtual·{v2,·v1},·Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object; |
| |
327 | ····move-result-object·v2 | 322 | ····move-result-object·v2 |
| |
328 | ····check-cast·v2,·Ljava/util/List; | 323 | ····check-cast·v2,·Ljava/util/List; |
| |
329 | ····.line·224 | 324 | ····.line·207 |
330 | ····invoke-interface·{v2},·Ljava/util/List;->iterator()Ljava/util/Iterator; | 325 | ····invoke-interface·{v2},·Ljava/util/List;->iterator()Ljava/util/Iterator; |
| |
331 | ····move-result-object·v2 | 326 | ····move-result-object·v2 |
| |
332 | ····:cond_0 | 327 | ····:cond_0 |
333 | ····invoke-interface·{v2},·Ljava/util/Iterator;->hasNext()Z | 328 | ····invoke-interface·{v2},·Ljava/util/Iterator;->hasNext()Z |
| |
Offset 351, 15 lines modified | Offset 346, 15 lines modified |
| |
351 | ····invoke-interface·{v2},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 346 | ····invoke-interface·{v2},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
352 | ····move-result-object·v3 | 347 | ····move-result-object·v3 |
| |
353 | ····check-cast·v3,·Landroid/net/IpPrefix; | 348 | ····check-cast·v3,·Landroid/net/IpPrefix; |
| |
354 | ····.line·225 | 349 | ····.line·208 |
355 | ····invoke-direct·{p0,·p1,·v3},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z | 350 | ····invoke-direct·{p0,·p1,·v3},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictPrefix(Landroid/net/IpPrefix;Landroid/net/IpPrefix;)Z |
| |
356 | ····move-result·v3 | 351 | ····move-result·v3 |
| |
357 | ····if-eqz·v3,·:cond_0 | 352 | ····if-eqz·v3,·:cond_0 |
| |
358 | ····const/4·p0,·0x1 | 353 | ····const/4·p0,·0x1 |
Offset 374, 15 lines modified | Offset 369, 15 lines modified |
374 | ····:cond_2 | 369 | ····:cond_2 |
375 | ····return·v0 | 370 | ····return·v0 |
376 | .end·method | 371 | .end·method |
| |
377 | .method·private·isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z | 372 | .method·private·isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z |
378 | ····.locals·2 | 373 | ····.locals·2 |
| |
379 | ····.line·242 | 374 | ····.line·225 |
380 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 375 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
381 | ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; | 376 | ····invoke-virtual·{v0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; |
| |
382 | ····move-result-object·v0 | 377 | ····move-result-object·v0 |
| |
383 | ····:cond_0 | 378 | ····:cond_0 |
Offset 394, 20 lines modified | Offset 389, 20 lines modified |
| |
394 | ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 389 | ····invoke-interface·{v0},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
395 | ····move-result-object·v1 | 390 | ····move-result-object·v1 |
| |
396 | ····check-cast·v1,·Landroid/net/ip/IpServer; | 391 | ····check-cast·v1,·Landroid/net/ip/IpServer; |
| |
397 | ····.line·243 | 392 | ····.line·226 |
398 | ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; | 393 | ····invoke-direct·{p0,·v1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getDownstreamPrefix(Landroid/net/ip/IpServer;)Landroid/net/IpPrefix; |
| |
399 | ····move-result-object·v1 | 394 | ····move-result-object·v1 |
| |
400 | ····.line·244 | 395 | ····.line·227 |
401 | ····invoke-virtual·{p1,·v1},·Landroid/net/IpPrefix;->equals(Ljava/lang/Object;)Z | 396 | ····invoke-virtual·{p1,·v1},·Landroid/net/IpPrefix;->equals(Ljava/lang/Object;)Z |
| |
402 | ····move-result·v1 | 397 | ····move-result·v1 |
| |
403 | ····if-eqz·v1,·:cond_0 | 398 | ····if-eqz·v1,·:cond_0 |
| |
404 | ····const/4·p0,·0x1 | 399 | ····const/4·p0,·0x1 |
Offset 416, 68 lines modified | Offset 411, 130 lines modified |
| |
416 | ····:cond_1 | 411 | ····:cond_1 |
417 | ····const/4·p0,·0x0 | 412 | ····const/4·p0,·0x0 |
| |
418 | ····return·p0 | 413 | ····return·p0 |
419 | .end·method | 414 | .end·method |
| |
420 | .method·private·isReservedSubnet(I)Z | 415 | .method·private·maybeRemoveDeprectedUpstreams()V |
421 | ····.locals·0 | 416 | ····.locals·5 |
| |
| 417 | ····.line·128 |
| 418 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
422 | ····const/16·p0,·0x2c | 419 | ····invoke-virtual·{v0},·Landroid/util/ArraySet;->isEmpty()Z |
| |
423 | ····if-eq·p1,·p0,·:cond_1 | 420 | ····move-result·v0 |
| |
424 | ····const/16·p0,·0x31 | 421 | ····if-eqz·v0,·:cond_3 |
| |
425 | ····if-ne·p1,·p0,·:cond_0 | 422 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
426 | ····goto·:goto_0 | 423 | ····invoke-virtual·{v0},·Landroid/util/ArrayMap;->isEmpty()Z |
| |
427 | ····:cond_0 | 424 | ····move-result·v0 |
428 | ····const/4·p0,·0x0 | |
| 425 | ····if-eqz·v0,·:cond_0 |
| |
429 | ····goto·:goto_1 | 426 | ····goto·:goto_1 |
| |
430 | ····:cond_1 | 427 | ····.line·130 |
| 428 | ····:cond_0 |
| 429 | ····new-instance·v0,·Ljava/util/ArrayList; |
| |
| 430 | ····invoke-direct·{v0},·Ljava/util/ArrayList;-><init>()V |
| |
| 431 | ····.line·131 |
| 432 | ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager; |
| |
| 433 | ····invoke-virtual·{v1},·Landroid/net/ConnectivityManager;->getAllNetworks()[Landroid/net/Network; |
| |
| 434 | ····move-result-object·v1 |
| |
| 435 | ····invoke-static·{v1},·Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List; |
| |
| 436 | ····move-result-object·v1 |
| |
| 437 | ····const/4·v2,·0x0 |
| |
| 438 | ····.line·132 |
431 | ····:goto_0 | 439 | ····:goto_0 |
432 | ····const/4·p0,·0x1 | 440 | ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
| 441 | ····invoke-virtual·{v3},·Landroid/util/ArrayMap;->size()I |
| |
| 442 | ····move-result·v3 |
| |
| 443 | ····if-ge·v2,·v3,·:cond_2 |
| |
| 444 | ····.line·133 |
| 445 | ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
| 446 | ····invoke-virtual·{v3,·v2},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object; |
| |
| 447 | ····move-result-object·v3 |
| |
| 448 | ····check-cast·v3,·Landroid/net/Network; |
| |
| 449 | ····.line·134 |
| 450 | ····invoke-interface·{v1,·v3},·Ljava/util/List;->contains(Ljava/lang/Object;)Z |
| |
| 451 | ····move-result·v4 |
| |
| 452 | ····if-nez·v4,·:cond_1 |
| |
| 453 | ····invoke-virtual·{v0,·v3},·Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z |
| |
| 454 | ····:cond_1 |
| 455 | ····add-int/lit8·v2,·v2,·0x1 |
| |
| 456 | ····goto·:goto_0 |
| |
| 457 | ····.line·137 |
| 458 | ····:cond_2 |
| 459 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
| 460 | ····invoke-virtual·{p0,·v0},·Landroid/util/ArrayMap;->removeAll(Ljava/util/Collection;)Z |
| |
| 461 | ····:cond_3 |
433 | ····:goto_1 | 462 | ····:goto_1 |
434 | ····return·p0 | 463 | ····return-void |
435 | .end·method | 464 | .end·method |
| |
| |
436 | #·virtual·methods | 465 | #·virtual·methods |
437 | .method·dump(Lcom/android/networkstack/tethering/util/IndentingPrintWriter;)V | 466 | .method·dump(Lcom/android/networkstack/tethering/util/IndentingPrintWriter;)V |
438 | ····.locals·4 | 467 | ····.locals·4 |
| |
| 468 | ····.line·240 |
| 469 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; |
| |
439 | ····const-string·v0,·"mUpstreamPrefixMap:" | 470 | ····const-string·v0,·"mUpstreamPrefixMap:" |
| |
440 | ····.line·257 | 471 | ····.line·241 |
441 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V | 472 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V |
| |
442 | ····.line·258 | 473 | ····.line·242 |
443 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; | 474 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; |
| |
444 | ····const/4·v0,·0x0 | 475 | ····const/4·v0,·0x0 |
| |
445 | ····.line·259 | 476 | ····.line·243 |
446 | ····:goto_0 | 477 | ····:goto_0 |
447 | ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 478 | ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
448 | ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->size()I | 479 | ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->size()I |
| |
449 | ····move-result·v1 | 480 | ····move-result·v1 |
| |
450 | ····const-string·v2,·"·-·" | 481 | ····const-string·v2,·"·-·" |
| |
451 | ····if-ge·v0,·v1,·:cond_0 | 482 | ····if-ge·v0,·v1,·:cond_0 |
| |
452 | ····.line·260 | 483 | ····.line·244 |
453 | ····new-instance·v1,·Ljava/lang/StringBuilder; | 484 | ····new-instance·v1,·Ljava/lang/StringBuilder; |
| |
454 | ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V | 485 | ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V |
| |
455 | ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 486 | ····iget-object·v3,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
456 | ····invoke-virtual·{v3,·v0},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object; | 487 | ····invoke-virtual·{v3,·v0},·Landroid/util/ArrayMap;->keyAt(I)Ljava/lang/Object; |
Offset 502, 27 lines modified | Offset 559, 27 lines modified |
| |
502 | ····invoke-virtual·{p1,·v1},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V | 559 | ····invoke-virtual·{p1,·v1},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V |
| |
503 | ····add-int/lit8·v0,·v0,·0x1 | 560 | ····add-int/lit8·v0,·v0,·0x1 |
| |
504 | ····goto·:goto_0 | 561 | ····goto·:goto_0 |
| |
505 | ····.line·262 | 562 | ····.line·246 |
506 | ····:cond_0 | 563 | ····:cond_0 |
507 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; | 564 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; |
| |
508 | ····const-string·v0,·"mDownstreams:" | 565 | ····const-string·v0,·"mDownstreams:" |
| |
509 | ····.line·263 | 566 | ····.line·247 |
510 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V | 567 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V |
| |
511 | ····.line·264 | 568 | ····.line·248 |
512 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; | 569 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->increaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; |
| |
513 | ····.line·265 | 570 | ····.line·249 |
514 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 571 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
515 | ····invoke-virtual·{p0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; | 572 | ····invoke-virtual·{p0},·Landroid/util/ArraySet;->iterator()Ljava/util/Iterator; |
| |
516 | ····move-result-object·p0 | 573 | ····move-result-object·p0 |
| |
517 | ····:goto_1 | 574 | ····:goto_1 |
Offset 534, 15 lines modified | Offset 591, 15 lines modified |
| |
534 | ····invoke-interface·{p0},·Ljava/util/Iterator;->next()Ljava/lang/Object; | 591 | ····invoke-interface·{p0},·Ljava/util/Iterator;->next()Ljava/lang/Object; |
| |
535 | ····move-result-object·v0 | 592 | ····move-result-object·v0 |
| |
536 | ····check-cast·v0,·Landroid/net/ip/IpServer; | 593 | ····check-cast·v0,·Landroid/net/ip/IpServer; |
| |
537 | ····.line·266 | 594 | ····.line·250 |
538 | ····new-instance·v1,·Ljava/lang/StringBuilder; | 595 | ····new-instance·v1,·Ljava/lang/StringBuilder; |
| |
539 | ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V | 596 | ····invoke-direct·{v1},·Ljava/lang/StringBuilder;-><init>()V |
| |
540 | ····invoke-virtual·{v0},·Landroid/net/ip/IpServer;->interfaceType()I | 597 | ····invoke-virtual·{v0},·Landroid/net/ip/IpServer;->interfaceType()I |
| |
541 | ····move-result·v3 | 598 | ····move-result·v3 |
Offset 561, 25 lines modified | Offset 618, 25 lines modified |
| |
561 | ····move-result-object·v0 | 618 | ····move-result-object·v0 |
| |
562 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V | 619 | ····invoke-virtual·{p1,·v0},·Ljava/io/PrintWriter;->println(Ljava/lang/String;)V |
| |
563 | ····goto·:goto_1 | 620 | ····goto·:goto_1 |
| |
564 | ····.line·268 | 621 | ····.line·252 |
565 | ····:cond_1 | 622 | ····:cond_1 |
566 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; | 623 | ····invoke-virtual·{p1},·Lcom/android/networkstack/tethering/util/IndentingPrintWriter;->decreaseIndent()Lcom/android/networkstack/tethering/util/IndentingPrintWriter; |
| |
567 | ····return-void | 624 | ····return-void |
568 | .end·method | 625 | .end·method |
| |
569 | .method·public·getRandomSubAddr()I | 626 | .method·public·getRandomSubAddr()I |
570 | ····.locals·1 | 627 | ····.locals·1 |
| |
571 | ····.line·199 | 628 | ····.line·182 |
572 | ····new-instance·p0,·Ljava/util/Random; | 629 | ····new-instance·p0,·Ljava/util/Random; |
| |
573 | ····invoke-direct·{p0},·Ljava/util/Random;-><init>()V | 630 | ····invoke-direct·{p0},·Ljava/util/Random;-><init>()V |
| |
574 | ····invoke-virtual·{p0},·Ljava/util/Random;->nextInt()I | 631 | ····invoke-virtual·{p0},·Ljava/util/Random;->nextInt()I |
| |
575 | ····move-result·p0 | 632 | ····move-result·p0 |
Offset 587, 274 lines modified | Offset 644, 199 lines modified |
587 | ····const·v0,·0xffff | 644 | ····const·v0,·0xffff |
| |
588 | ····and-int/2addr·p0,·v0 | 645 | ····and-int/2addr·p0,·v0 |
| |
589 | ····return·p0 | 646 | ····return·p0 |
590 | .end·method | 647 | .end·method |
| |
591 | .method·public·maybeRemoveDeprecatedUpstreams()V | |
592 | ····.locals·2 | |
| |
593 | ····.line·141 | |
594 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | |
| |
595 | ····invoke-virtual·{v0},·Landroid/util/ArrayMap;->isEmpty()Z | |
| |
596 | ····move-result·v0 | |
| |
597 | ····if-eqz·v0,·:cond_0 | |
| |
598 | ····return-void | |
| |
599 | ····.line·144 | |
600 | ····:cond_0 | |
601 | ····new-instance·v0,·Ljava/util/HashSet; | |
| |
602 | ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | |
| |
603 | ····invoke-virtual·{v1},·Landroid/util/ArrayMap;->keySet()Ljava/util/Set; | |
| |
604 | ····move-result-object·v1 | |
| |
605 | ····invoke-direct·{v0,·v1},·Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V | |
| |
606 | ····.line·145 | |
607 | ····iget-object·v1,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConnectivityMgr:Landroid/net/ConnectivityManager; | |
| |
608 | ····invoke-virtual·{v1},·Landroid/net/ConnectivityManager;->getAllNetworks()[Landroid/net/Network; | |
| |
609 | ····move-result-object·v1 | |
| |
610 | ····invoke-static·{v1},·Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List; | |
| |
611 | ····move-result-object·v1 | |
| |
612 | ····invoke-interface·{v0,·v1},·Ljava/util/Set;->removeAll(Ljava/util/Collection;)Z | |
| |
613 | ····.line·147 | |
614 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | |
| |
615 | ····invoke-virtual·{p0,·v0},·Landroid/util/ArrayMap;->removeAll(Ljava/util/Collection;)Z | |
| |
616 | ····return-void | |
617 | .end·method | |
| |
618 | .method·public·releaseDownstream(Landroid/net/ip/IpServer;)V | 648 | .method·public·releaseDownstream(Landroid/net/ip/IpServer;)V |
619 | ····.locals·0 | 649 | ····.locals·0 |
| |
620 | ····.line·213 | 650 | ····.line·196 |
621 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 651 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
622 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->remove(Ljava/lang/Object;)Z | 652 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->remove(Ljava/lang/Object;)Z |
| |
623 | ····return-void | 653 | ····return-void |
624 | .end·method | 654 | .end·method |
| |
625 | .method·public·removeUpstreamPrefix(Landroid/net/Network;)V | 655 | .method·public·removeUpstreamPrefix(Landroid/net/Network;)V |
626 | ····.locals·0 | 656 | ····.locals·0 |
| |
627 | ····.line·133 | 657 | ····.line·124 |
628 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 658 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
629 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; | 659 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArrayMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; |
| |
630 | ····return-void | 660 | ····return-void |
631 | .end·method | 661 | .end·method |
| |
632 | .method·public·requestDownstreamAddress(Landroid/net/ip/IpServer;)Landroid/net/LinkAddress; | 662 | .method·public·requestDownstreamAddress(Landroid/net/ip/IpServer;)Landroid/net/LinkAddress; |
633 | ····.locals·7 | 663 | ····.locals·7 |
| |
634 | ····.line·160 | 664 | ····.line·146 |
635 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mConfig:Lcom/android/networkstack/tethering/TetheringConfiguration; | 665 | ····invoke-direct·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->maybeRemoveDeprectedUpstreams()V |
| |
636 | ····invoke-virtual·{v0},·Lcom/android/networkstack/tethering/TetheringConfiguration;->shouldEnableWifiP2pDedicatedIp()Z | |
| |
637 | ····move-result·v0 | |
| |
638 | ····const/4·v1,·0x3 | |
| |
639 | ····if-eqz·v0,·:cond_0 | |
| |
640 | ····.line·161 | |
641 | ····invoke-virtual·{p1},·Landroid/net/ip/IpServer;->interfaceType()I | |
| |
642 | ····move-result·v0 | |
| |
643 | ····if-ne·v0,·v1,·:cond_0 | |
| |
644 | ····.line·162 | |
645 | ····new-instance·p0,·Landroid/net/LinkAddress; | |
| |
646 | ····const-string·p1,·"192.168.49.1/24" | |
| |
647 | ····invoke-direct·{p0,·p1},·Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V | 666 | ····.line·149 |
| |
648 | ····return-object·p0 | |
| |
649 | ····.line·166 | |
650 | ····:cond_0 | |
651 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix; | 667 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mTetheringPrefix:Landroid/net/IpPrefix; |
| |
652 | ····invoke-virtual·{v0},·Landroid/net/IpPrefix;->getRawAddress()[B | 668 | ····invoke-virtual·{v0},·Landroid/net/IpPrefix;->getRawAddress()[B |
| |
653 | ····move-result-object·v0 | 669 | ····move-result-object·v0 |
| |
654 | ····.line·167 | 670 | ····.line·150 |
655 | ····invoke-virtual·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getRandomSubAddr()I | 671 | ····invoke-virtual·{p0},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getRandomSubAddr()I |
| |
656 | ····move-result·v2 | 672 | ····move-result·v1 |
| |
657 | ····shr-int/lit8·v3,·v2,·0x8 | 673 | ····shr-int/lit8·v2,·v1,·0x8 |
| |
658 | ····and-int/lit16·v3,·v3,·0xff | 674 | ····and-int/lit16·v2,·v2,·0xff |
| |
659 | ····new-array·v4,·v1,·[B | 675 | ····const/4·v3,·0x3 |
| |
660 | ····.line·169 | 676 | ····new-array·v4,·v3,·[B |
| |
| 677 | ····.line·152 |
661 | ····fill-array-data·v4,·:array_0 | 678 | ····fill-array-data·v4,·:array_0 |
| |
662 | ····invoke-direct·{p0,·v2,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getSanitizedAddressSuffix(I[B)B | 679 | ····invoke-direct·{p0,·v1,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getSanitizedAddressSuffix(I[B)B |
| |
663 | ····move-result·v2 | 680 | ····move-result·v1 |
| |
664 | ····aput-byte·v2,·v0,·v1 | 681 | ····aput-byte·v1,·v0,·v3 |
| |
665 | ····const/4·v1,·0x0 | 682 | ····const/4·v1,·0x0 |
| |
666 | ····:goto_0 | 683 | ····:goto_0 |
667 | ····const/16·v2,·0x100 | 684 | ····const/16·v3,·0x100 |
| |
668 | ····if-ge·v1,·v2,·:cond_4 | 685 | ····if-ge·v1,·v3,·:cond_3 |
| |
669 | ····add-int·v2,·v3,·v1 | 686 | ····add-int·v3,·v2,·v1 |
| |
670 | ····and-int/lit16·v2,·v2,·0xff | 687 | ····and-int/lit16·v3,·v3,·0xff |
| |
671 | ····.line·172 | |
672 | ····invoke-direct·{p0,·v2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isReservedSubnet(I)Z | |
| |
673 | ····move-result·v4 | 688 | ····const/16·v4,·0x2c |
| |
674 | ····if-eqz·v4,·:cond_1 | 689 | ····if-ne·v3,·v4,·:cond_0 |
| |
675 | ····goto·:goto_1 | 690 | ····goto·:goto_1 |
| |
676 | ····:cond_1 | 691 | ····:cond_0 |
677 | ····const/4·v4,·0x2 | 692 | ····const/4·v4,·0x2 |
| |
678 | ····int-to-byte·v2,·v2 | 693 | ····int-to-byte·v3,·v3 |
| |
679 | ····.line·174 | 694 | ····.line·157 |
680 | ····aput-byte·v2,·v0,·v4 | 695 | ····aput-byte·v3,·v0,·v4 |
| |
681 | ····.line·177 | 696 | ····.line·160 |
682 | ····:try_start_0 | 697 | ····:try_start_0 |
683 | ····invoke-static·{v0},·Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress; | 698 | ····invoke-static·{v0},·Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress; |
| |
684 | ····move-result-object·v2 | 699 | ····move-result-object·v3 |
685 | ····:try_end_0 | 700 | ····:try_end_0 |
686 | ····.catch·Ljava/net/UnknownHostException;·{:try_start_0·..·:try_end_0}·:catch_0 | 701 | ····.catch·Ljava/net/UnknownHostException;·{:try_start_0·..·:try_end_0}·:catch_0 |
| |
687 | ····.line·182 | 702 | ····.line·165 |
688 | ····new-instance·v4,·Landroid/net/IpPrefix; | 703 | ····new-instance·v4,·Landroid/net/IpPrefix; |
| |
689 | ····const/16·v5,·0x18 | 704 | ····const/16·v5,·0x18 |
| |
690 | ····invoke-direct·{v4,·v2,·v5},·Landroid/net/IpPrefix;-><init>(Ljava/net/InetAddress;I)V | 705 | ····invoke-direct·{v4,·v3,·v5},·Landroid/net/IpPrefix;-><init>(Ljava/net/InetAddress;I)V |
| |
691 | ····.line·184 | 706 | ····.line·167 |
692 | ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z | 707 | ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isDownstreamPrefixInUse(Landroid/net/IpPrefix;)Z |
| |
693 | ····move-result·v6 | 708 | ····move-result·v6 |
| |
694 | ····if-eqz·v6,·:cond_2 | 709 | ····if-eqz·v6,·:cond_1 |
| |
695 | ····goto·:goto_1 | 710 | ····goto·:goto_1 |
| |
696 | ····.line·186 | 711 | ····.line·169 |
697 | ····:cond_2 | 712 | ····:cond_1 |
698 | ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictWithUpstream(Landroid/net/IpPrefix;)Z | 713 | ····invoke-direct·{p0,·v4},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->isConflictWithUpstream(Landroid/net/IpPrefix;)Z |
| |
699 | ····move-result·v4 | 714 | ····move-result·v4 |
| |
700 | ····if-eqz·v4,·:cond_3 | 715 | ····if-eqz·v4,·:cond_2 |
| |
701 | ····:goto_1 | 716 | ····:goto_1 |
702 | ····add-int/lit8·v1,·v1,·0x1 | 717 | ····add-int/lit8·v1,·v1,·0x1 |
| |
703 | ····goto·:goto_0 | 718 | ····goto·:goto_0 |
| |
704 | ····.line·188 | 719 | ····.line·171 |
705 | ····:cond_3 | 720 | ····:cond_2 |
706 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; | 721 | ····iget-object·p0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mDownstreams:Landroid/util/ArraySet; |
| |
707 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z | 722 | ····invoke-virtual·{p0,·p1},·Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z |
| |
708 | ····.line·189 | 723 | ····.line·172 |
709 | ····new-instance·p0,·Landroid/net/LinkAddress; | 724 | ····new-instance·p0,·Landroid/net/LinkAddress; |
| |
710 | ····invoke-direct·{p0,·v2,·v5},·Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V | 725 | ····invoke-direct·{p0,·v3,·v5},·Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V |
| |
711 | ····return-object·p0 | 726 | ····return-object·p0 |
| |
712 | ····:catch_0 | 727 | ····:catch_0 |
713 | ····move-exception·p0 | 728 | ····move-exception·p0 |
| |
714 | ····.line·179 | 729 | ····.line·162 |
715 | ····new-instance·p1,·Ljava/lang/IllegalStateException; | 730 | ····new-instance·p1,·Ljava/lang/IllegalStateException; |
| |
716 | ····const-string·v0,·"Invalid·address,·shouldn\'t·happen." | 731 | ····const-string·v0,·"Invalid·address,·shouldn\'t·happen." |
| |
717 | ····invoke-direct·{p1,·v0,·p0},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V | 732 | ····invoke-direct·{p1,·v0,·p0},·Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V |
| |
718 | ····throw·p1 | 733 | ····throw·p1 |
| |
719 | ····:cond_4 | 734 | ····:cond_3 |
720 | ····const/4·p0,·0x0 | 735 | ····const/4·p0,·0x0 |
| |
721 | ····return-object·p0 | 736 | ····return-object·p0 |
| |
722 | ····nop | |
| |
723 | ····:array_0 | 737 | ····:array_0 |
724 | ····.array-data·1 | 738 | ····.array-data·1 |
725 | ········0x0t | 739 | ········0x0t |
726 | ········0x1t | 740 | ········0x1t |
727 | ········-0x1t | 741 | ········-0x1t |
728 | ····.end·array-data | 742 | ····.end·array-data |
729 | .end·method | 743 | .end·method |
| |
730 | .method·public·updateUpstreamPrefix(Landroid/net/Network;Landroid/net/LinkProperties;)V | 744 | .method·public·updateUpstreamPrefix(Landroid/net/Network;Landroid/net/LinkProperties;)V |
731 | ····.locals·1 | 745 | ····.locals·1 |
| |
732 | ····.line·96 | 746 | ····.line·87 |
733 | ····invoke-virtual·{p2},·Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List; | 747 | ····invoke-virtual·{p2},·Landroid/net/LinkProperties;->getAllLinkAddresses()Ljava/util/List; |
| |
734 | ····move-result-object·p2 | 748 | ····move-result-object·p2 |
| |
735 | ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getIpv4Prefixes(Ljava/util/List;)Ljava/util/ArrayList; | 749 | ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->getIpv4Prefixes(Ljava/util/List;)Ljava/util/ArrayList; |
| |
736 | ····move-result-object·p2 | 750 | ····move-result-object·p2 |
| |
737 | ····.line·97 | 751 | ····.line·88 |
738 | ····invoke-virtual·{p2},·Ljava/util/ArrayList;->isEmpty()Z | 752 | ····invoke-virtual·{p2},·Ljava/util/ArrayList;->isEmpty()Z |
| |
739 | ····move-result·v0 | 753 | ····move-result·v0 |
| |
740 | ····if-eqz·v0,·:cond_0 | 754 | ····if-eqz·v0,·:cond_0 |
| |
741 | ····.line·98 | 755 | ····.line·89 |
742 | ····invoke-virtual·{p0,·p1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->removeUpstreamPrefix(Landroid/net/Network;)V | 756 | ····invoke-virtual·{p0,·p1},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->removeUpstreamPrefix(Landroid/net/Network;)V |
| |
743 | ····return-void | 757 | ····return-void |
| |
744 | ····.line·102 | 758 | ····.line·93 |
745 | ····:cond_0 | 759 | ····:cond_0 |
746 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; | 760 | ····iget-object·v0,·p0,·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->mUpstreamPrefixMap:Landroid/util/ArrayMap; |
| |
747 | ····invoke-virtual·{v0,·p1,·p2},·Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; | 761 | ····invoke-virtual·{v0,·p1,·p2},·Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; |
| |
748 | ····.line·103 | 762 | ····.line·94 |
749 | ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->handleMaybePrefixConflict(Ljava/util/List;)V | 763 | ····invoke-direct·{p0,·p2},·Lcom/android/networkstack/tethering/PrivateAddressCoordinator;->handleMaybePrefixConflict(Ljava/util/List;)V |
| |
750 | ····return-void | 764 | ····return-void |
751 | .end·method | 765 | .end·method |