Daniel Wagner | 23 May 2013 14:35
Picon

[PATCH v2] session_policy_local: Document policy file format

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

---

Hi,

Note this patch is valid after the UID/GID patches for the policy plugin
have been applied.

cheers,
daniel

 doc/policy-format.txt | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 doc/policy-format.txt

diff --git a/doc/policy-format.txt b/doc/policy-format.txt
new file mode 100644
index 0000000..6c77c5e
--- /dev/null
+++ b/doc/policy-format.txt
 <at>  <at>  -0,0 +1,77  <at>  <at> 
+ConnMan policy file format
+**************************
+
+The session policy pluging allows to configure/provision a session.
+ConnMan will be looking for policy files in STORAGEDIR/session_policy_local
+which by default points to /var/lib/connman. Policy file names must
+not include other characters than letters or numbers and must have
+a .policy suffix. Policy files are text files.
(Continue reading)

Daniel Wagner | 23 May 2013 11:37
Picon

[RFC v1 0/4] [RESEND] Use GList instead of GSequence for service list

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

Hi,

[The first RFC v1 version got some wrong patches in there. So here the
resend.]

I grouped the GSequence removal patches together and rebased
them on the current master. So no dependencies on any other patch
series I have sent so far.

cheers,
daniel

Daniel Wagner (4):
  session: Use service iterator instead of match/creation callbacks
  session: Use GList instead of GSequence for service list
  service: Use GList instead of GSequence for service list
  TODO: Mark GSequence removal done

 TODO          |   3 +-
 src/connman.h |  14 +--
 src/service.c | 334 ++++++++++++++++++++--------------------------------------
 src/session.c | 110 +++++++++----------
 4 files changed, 177 insertions(+), 284 deletions(-)

--

-- 
1.8.2.rc3.16.gce432ca
Daniel Wagner | 23 May 2013 11:34
Picon

[RFC v1 0/4] Use GList instead of GSequence for service list

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

Hi,

I grouped the GSequence removal patches together and rebased
them on the current master. So no dependencies on any other patch
series I have sent so far.

cheers,
daniel

Daniel Wagner (4):
  session: Use service iterator instead of match/creation callbacks
  session: Use GList instead of GSequence for service list
  service: Use GList instead of GSequence for service list
  TODO: Mark GSequence removal done

 TODO          |   3 +-
 src/connman.h |  14 +--
 src/service.c | 334 ++++++++++++++++++++--------------------------------------
 src/session.c | 110 +++++++++----------
 4 files changed, 177 insertions(+), 284 deletions(-)

--

-- 
1.8.2.rc3.16.gce432ca
Daniel Wagner | 23 May 2013 10:35
Picon

[RFC v0] service: Replace GSequence with GList

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

---

Hi,

A very rough first version. Just blindly replaced stuff and had even
to write a list_move() list manipulation funciton which almost sure
blows up. Only lightly tested and depends on 

[RFC v0 1/5] session: Use service iterator instead of match/creation callbacks

cheers,
daniel

 src/service.c | 309 +++++++++++++++++++++-------------------------------------
 1 file changed, 112 insertions(+), 197 deletions(-)

diff --git a/src/service.c b/src/service.c
index b8faa98..5c21e28 100644
--- a/src/service.c
+++ b/src/service.c
 <at>  <at>  -41,7 +41,7  <at>  <at> 

 static DBusConnection *connection = NULL;

-static GSequence *service_list = NULL;
+static GList *service_list = NULL;
 static GHashTable *service_hash = NULL;
 static GSList *counter_list = NULL;
(Continue reading)

Daniel Wagner | 22 May 2013 16:13
Picon

[RFC v0 0/5] session: Add service name match

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

Hi,

Here is my first draft version for supporting service name match
through the policy plugin, e.g:

  $ cat /var/lib/connman/session_policy_local/test.policy 
  [policy_foo]
  uid=wagi
  AllowedBearers=ethernet_082e5f290035_cable

Note, this is not supported via the D-Bus API. 

This series is based on 

https://github.com/bmwcarit/connman/tree/secmark-v7

and also available as

https://github.com/bmwcarit/connman/tree/policy-services-v0

  01 session: Use service iterator instead of match/creation callbacks

The first patch is prepers the stage for removing the GSequence in
session.c It is not strickly necessary but I found exposing the
implementation details from session.c in service.c just worth
keeping this internal API complex. 

  02 session: Use GList instead of GSequence for service list
(Continue reading)

Patrik Flykt | 22 May 2013 11:21
Picon

[PATCH 0/3] Connmanctl fixes

	Hi,

Fixed a few things not working with connmanctl.

Cheers,

	Patrik

Patrik Flykt (3):
  client: Reserve space for the trailing NULL in the array
  client: Fix index for IPv6 configuration option
  client: Fix minor issues in D-Bus path name checking

 client/commands.c |    7 ++++---
 client/input.c    |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

--

-- 
1.7.10.4
Daniel Wagner | 22 May 2013 08:59
Picon

[RFC v0] session: Use service iterator instead of match/creation callbacks

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

When a new session is created we need to get the initial list
of services which match the session AllowedBearers criteria. As soon
the session is running add or removed services are tracked via the
notifier interface.

We concluded that exposing all the services is not really necessary
and therefore we are using currently two callbacks to get the initial
list. That exposes implementation details from session to service, that
is GSequence. We also need to expose the type 'struct service_entry'.

Instead doing so we are using an iterator and keep all the
implementation details in session.c.
---

Hi,

I am about ripping out the GSequence from session.c and looked at this
code again and I belive there is little benefit in the current
approach. The reason for this is that I'd like to keep track of the services
in a hash table inside a session. That means the hash table will be
the owner and not as currently the list. Mostly, because a single linked list
or double liked list do not have destroy callbacks and it gets quite messy
withouth them. Therefore using a hash table makes things simpler. 

In otherwords I would need to touch the __connman_service_get_list()
and changed it to __connman_service_get_hash() and that seems rather
strange. What do you think?

(Continue reading)

Patrik Flykt | 21 May 2013 21:07
Picon

[PATCH] doc: Remove documentation for Technology IdleTimeout property

IdleTimeout hasn't so far been implemented in any release and will be
handled by other means if needed.
---
 doc/technology-api.txt |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/doc/technology-api.txt b/doc/technology-api.txt
index 92886e1..81adcbc 100644
--- a/doc/technology-api.txt
+++ b/doc/technology-api.txt
 <at>  <at>  -93,11 +93,3  <at>  <at>  Properties	boolean Powered [readwrite]
 			This property is only valid for the WiFi technology,
 			and is then mapped to the WPA pre-shared key clients
 			will have to use in order to establish a connection.
-
-		uint32  IdleTimeout [readwrite] [experimental]
-
-			If the technology is idle for given period then it
-			will go offline if no Service with this technology
-			has AutoConnect set to True.
-
-			If the timeout is 0, this feature is disabled.
--

-- 
1.7.10.4
Daniel Wagner | 21 May 2013 13:45
Picon

[PATCH] session: Fix service2bearer to return correct match all rule

From: Daniel Wagner <daniel.wagner <at> bmw-carit.de>

---
 src/session.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/session.c b/src/session.c
index db5eb2a..b0dca62 100644
--- a/src/session.c
+++ b/src/session.c
 <at>  <at>  -231,6 +231,7  <at>  <at>  static char *service2bearer(enum connman_service_type type)
 	case CONNMAN_SERVICE_TYPE_VPN:
 		return "vpn";
 	case CONNMAN_SERVICE_TYPE_UNKNOWN:
+		return "*";
 	case CONNMAN_SERVICE_TYPE_SYSTEM:
 	case CONNMAN_SERVICE_TYPE_GPS:
 	case CONNMAN_SERVICE_TYPE_GADGET:
--

-- 
1.8.2.rc3.16.gce432ca
Chengyi Zhao | 21 May 2013 12:39
Picon

[PATCH] Tethering: Add the hidden Access Point

From: Chengyi Zhao <chengyix.zhao <at> gmail.com>

Sometimes users need create the hidden Wi-Fi Access Point.

Because wpa_supplicant 2.0 has already added this hidden DBus interface
(the code "int ignore_broadcast_ssid;" of the file config_ssid.h, etc),
it is recommended to use wpa_supplicant 2.0 or later.

Signed-off-by: Chengyi Zhao <chengyix.zhao <at> gmail.com>
---
 doc/technology-api.txt     |    5 +++++
 gsupplicant/gsupplicant.h  |    7 +++++++
 gsupplicant/supplicant.c   |    4 ++++
 include/technology.h       |    3 ++-
 plugins/bluetooth.c        |    3 ++-
 plugins/bluetooth_legacy.c |    3 ++-
 plugins/ethernet.c         |    6 ++++--
 plugins/wifi.c             |   14 +++++++++++---
 src/technology.c           |   22 +++++++++++++++++++++-
 9 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/doc/technology-api.txt b/doc/technology-api.txt
index 92886e1..b48f88d 100644
--- a/doc/technology-api.txt
+++ b/doc/technology-api.txt
 <at>  <at>  -94,6 +94,11  <at>  <at>  Properties	boolean Powered [readwrite]
 			and is then mapped to the WPA pre-shared key clients
 			will have to use in order to establish a connection.

+		boolean Hidden [readwrite]
(Continue reading)

Patrik Flykt | 21 May 2013 12:32
Picon

[PATCH] timeserver: Periodically wake up to recheck used timeserver

The current situation is that a failed timeserver name resolution removes
the timeserver immediately from the list of used timeservers and a failure
to connect to the nameserver IP address will remove the timeserver after a
2 second delay. Currently no mechanism exists to re-create the list of
nameservers once the list has been exhausted or the more preferred
timeservers have been removed from it.

This implementation combats both problems where less used timeservers further
network hops away ends up being used despite a more optimal one being closer
as well as the exhaustion of the nameserver list. This is done by periodially
waking up and checking the timeserver in use. If the timeserver used is not
the most preferred one or the list of timeservers is empty, reset the
timeserver list and restart the timeserver polling procedure.
---
 src/timeserver.c |   82 +++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 72 insertions(+), 10 deletions(-)

diff --git a/src/timeserver.c b/src/timeserver.c
index 970b8eb..f3c1220 100644
--- a/src/timeserver.c
+++ b/src/timeserver.c
 <at>  <at>  -32,7 +32,11  <at>  <at> 

 #include "connman.h"

+#define TS_RECHECK_INTERVAL     7200
+
 static GSList *ts_list = NULL;
+static char *ts_current = NULL;
+static int ts_recheck_id = 0;
(Continue reading)


Gmane