Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NetworkManager enhancement proposal

97 views
Skip to first unread message

edgar_chen

unread,
Jun 21, 2013, 8:01:45 PM6/21/13
to dev-b2g, Ken Chang, Vicamo Yang, Hsin-Yi Tsai, Dimi Lee, Vincent Chang, Shian-Yow Wu
Hi all,

Recently, Taipei team had a internal discussion about the NetworkManager
enhancement. We think it is worth sharing to you about the details. Any
suggestion or comment is always welcome!!

In current b2g, NetworkManager is a module that takes care of the
routing decision and provides some network/connection related
information. We propose to enhance it to handle more things. I tried to
summaries as below:

_Why we are going to do this?_
1. Connection policy is an important feature on device. In current b2g,
the connection policy is controlled in each interface. For example, when
Wifi connection is established, device should drop mobile connection to
save battery power [1]. This policy is controlled in RIL side, RIL needs
to monitor the wifi connection. When wifi connection is established, RIL
will close it's data connection. And when wifi connection is dropped,
RIL will try to establish it's connection back. This seems trivial, but
when the policy is becoming more and more complicate, it is not easy to
maintain in a disperse way. So it is necessary to have a central module
to make a decision based on the policy.

2. Some feature will request a special connection for sending data.
Taking mms in current b2g as example, mms service needs to establish a
mms connection to send message (Use MMS APN to make a data call).
Imagine that if there are two modules, A and B, need the same
connection, X. Module A makes a release request cause it finish it's
task and need not the connection any more. But module B is still in use.
In this case, the connection X should not be released because it is
still used by module B. Now we don't have a generic way to handle those
establish/release requests for a specific connection, and also have no a
central manager to manage them.

_Goals:_
1. Policy control in a centralize way.
** Policy can be configurable.
2. Easy to add a new network.
** We believe there are more and more networks will be supported in
b2g.
3. Manage establish/release request for a specific connection in a
centralize way.
4. Maybe it can be a platform independent module.

_Proposal:_
1. Having a general network interface.
- To add a new network, we just need to implement this interface
and register/unregister it to NetworkManager.
- NetworkManager can control registered network through this interface.
2. When does a network register/unregister.
- Register: when the network is available to use, i.e radio is on
or driver is loaded .. etc.
- Unregister: when the network is unavailable to use or not existed
anymore, i.e radio is off or driver is unloaded .. etc.
3. How dose NetworkManager control the registered network?
- connect(): Ask the network try to establish connection.
- disconnect(): Ask the network drop connection.

_Draft software architecture:_
https://docs.google.com/drawings/d/1wldBv82IsGwls-a3yAFDB-Jj1HeOtUnDuJRg7JfzRQU/edit?usp=sharing

_Proposed network interface:_
interface nsINetworkInterface {
readonly attribute nsINetworkInfo info;
readonly attribute DOMString[] hostRoutes;
readonly attribute DOMString poxyHost;
readonly attribute long proxyPort;

void connect(); // Request network establish connection.
void disconnect(); // Request network drop connection.

attribute nsIDOMEventListener onnetworkinfochanged; // Trigger
when network status is changed
}

interface nsINetworkInfo {
readonly attribute long type;
readonly attribute DOMString serviceId;
readonly attribute DOMString ip;
readonly attribute DOMString netmask;
readonly attribute DOMString broadcast;
readonly attribute DOMString gateway;
readonly attribute DOMString dns1;
readonly attribute DOMString dns2;
}

We are still under discussion, we will share to you when having any
progress.

Thanks

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=817985


Best Regards,
Edgar Chen
--
Mozilla Taiwan
ec...@mozilla.com

Krishna Kumar

unread,
Jun 21, 2013, 8:17:18 PM6/21/13
to edgar_chen, dev-b2g, Ken Chang, Vicamo Yang, Hsin-Yi Tsai, Dimi Lee, Vincent Chang, Shian-Yow Wu
Hello Edgar,
This sounds interesting.
Specifically on your point 1), there are some operators, who have specific
applications which need to go through the cellular connection, even if
there is a WiFi connection. This is for billing reasons. I have seen this
mostly with US operators and some mega-European operators - so this may
not a short term concern. However, can the architecture be developed to
take into account, application specific exceptions?
Thanks,
Krishna
_______________________________________________
dev-b2g mailing list
dev...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Julien Wajsberg

unread,
Jun 24, 2013, 6:36:04 AM6/24/13
to Krishna Kumar, Vicamo Yang, edgar_chen, Vincent Chang, Shian-Yow Wu, Ken Chang, Hsin-Yi Tsai, Dimi Lee, dev-b2g
I know some applications on the french Orange network that needs to use
the cellular connection for authentication reason. On Android, they
specifically ask the user to disconnect first from Wi-Fi when they are
connected, at least the first time.
signature.asc

Jordano Francisco (UK)

unread,
Jun 24, 2013, 6:43:25 AM6/24/13
to Julien Wajsberg, Krishna Kumar, Vicamo Yang, edgar_chen, Vincent Chang, Shian-Yow Wu, Ken Chang, Hsin-Yi Tsai, Dimi Lee, dev-b2g
Hi,

As Julien commented is a common practice between carriers to force users
to go via 3G to authenticate them.

Is the case of some Telefonica OBs (O2, Movistar, and probably more) that
use this mechanism.

Cheers,
F.
0 new messages