Lines Matching defs:network

53 // States of a network:
59 // This state is entered when a registered NetworkAgent for a VPN network transitions to the
60 // CONNECTING state (TODO: go through this state for every network, not just VPNs).
61 // ConnectivityService will tell netd to create the network early in order to add extra UID
62 // routing rules referencing the netID. These rules need to be in place before the network is
63 // connected to avoid racing against client apps trying to connect to a half-setup network.
66 // ConnectivityService will tell netd to create the network if it was not already created, and
69 // If this network can satisfy the default NetworkRequest, then NetworkMonitor will
71 // If this network cannot satisfy the default NetworkRequest, it will immediately be
73 // A network may remain in this state if NetworkMonitor fails to find Internet connectivity,
82 // The device's default network connection:
84 // Networks in states #4 and #5 may be used as a device's default network connection if they
86 // A network, that satisfies the default NetworkRequest, in state #5 should always be chosen
87 // in favor of a network, that satisfies the default NetworkRequest, in state #4.
89 // for the default network connection, the one with the higher score should be chosen.
91 // When a network disconnects:
93 // If a network's transport disappears, for example:
99 // then that network can transition from any state (#1-#5) to unregistered. This happens by
101 // ConnectivityService also tells netd to destroy the network.
103 // When ConnectivityService disconnects a network:
105 // If a network has no chance of satisfying any requests (even if it were to become validated
108 // If the network was satisfying a foreground NetworkRequest (i.e. had been the highest scoring that
109 // satisfied the NetworkRequest's constraints), but is no longer the highest scoring network for any
110 // foreground NetworkRequest, then there will be a 30s pause to allow network communication to be
111 // wrapped up rather than abruptly terminated. During this pause the network is said to be
112 // "lingering". During this pause if the network begins satisfying a foreground NetworkRequest,
114 // the network is no longer considered "lingering". After the linger timer expires, if the network
123 public final Network network;
133 // Set to true after the first time this network is marked as CONNECTED. Once set, the network
134 // shows up in API calls, is able to satisfy NetworkRequests and can become the default network.
142 // The result of the last validation attempt on this network (true if validated, false if not).
145 // If true, becoming unvalidated will lower the network's score. This is only meaningful if the
151 // Whether a captive portal was ever detected on this network.
155 // Whether a captive portal was found during the last network validation attempt.
159 // satisfied by a higher-scoring network. so as to allow communication to wrap up before the
160 // network is taken down. This usually only happens to the default network. Lingering ends with
161 // either the linger timeout expiring and the network being taken down, or the network
191 * Inform ConnectivityService that the network LINGER period has
197 // All linger timers for this network, sorted by expiry time. A linger timer is added whenever
198 // a request is moved to a network with a better score, regardless of whether the network is or
208 // network is lingering or not. Always set to the expiry of the LingerTimer that expires last.
209 // When the timer fires, all linger state is cleared, and if the network has no requests, it is
216 // Whether the network is lingering or not. Must be maintained separately from the above because
218 // (Example: we don't linger a network if it would become the best for a NetworkRequest if it
227 // Score for explicitly connected network.
229 // This ensures that a) the explicitly selected network is never trumped by anything else, and
230 // b) the explicitly selected network is never torn down.
259 network = net;
271 // Functions for manipulating the requests satisfied by this network.
302 * Add {@code networkRequest} to this network as it's satisfied by this network.
322 * Remove the specified request from this network.
335 * Returns whether this network is currently satisfying the request with the specified ID.
343 * network.
350 * Returns the number of requests currently satisfied by this network for which
358 * Returns the number of requests currently satisfied by this network of type
366 * Returns the number of foreground requests currently satisfied by this network.
373 * Returns the number of requests of any type currently satisfied by this network.
380 * Returns whether the network is a background network. A network is a background network if it
382 * a background request, it would be a speculative network that is only being kept up because
389 // Does this network satisfy request?
411 // If this network is explicitly selected and the user has decided to use it even if it's
414 // down an explicitly selected network before the user gets a chance to prefer it when
415 // a higher-scoring network (e.g., Ethernet) is available.
460 new NetworkCapabilities(networkCapabilities), network, subscriberId, null);
465 * Sets the specified request to linger on this network for the specified time. Called by
466 * ConnectivityService when the request is moved to another network with a higher score.
470 // Cannot happen. Once a request is lingering on a particular network, we cannot
471 // re-linger it unless that network becomes the best for that request again, in which
483 * Cancel lingering. Called by ConnectivityService when a request is added to this network.
484 * Returns true if the given request was lingering on this network, false otherwise.
519 "NETWORK_LINGER_COMPLETE." + network.netId,
556 "network{" + network + "} nethandle{" + network.getNetworkHandle() + "} " +
571 (network == null ? "null" : network.toString()) + "]";