Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Squashed 'connman/' changes from 075e1bb..97c3189
97c3189 Release 1.22
86373b4 dnsproxy: Check split routing when creating a server
27dba28 gdbus: Add g_dbus_client_set_ready_watch()
8bc2a4e dnsproxy: Destroy list using g_list_free_full
a33522d AUTHORS: Mention Maneesh's contributions
5ecc2a1 doc: Add API documentation about WiFi P2P Peer
48d43a8 test: Add method related to P2P services
73f8579 gsupplicant: Fix WPS sync-up error with wpa_supplicant
e5c6a34 session: Set state to disconnected when deactivating a session
ee485f6 service: Use connect reason from the failed service
90334bf session: Don't sent disconnects to sessions when updating
9d727fd session: Disconnect on configuration or session change
dd3492f session: Allow Session Connect and Disconnect be called multiple times
3b6f9c2 client: Allow Session Connect and Disconnect be called multiple times
e377722 session: Remove session, not service, from session list
2dba966 session: Do not remove non existing policy routing tables
aae5825 session: Do no create two instances of struct connman_service_info
76cb209 session: Update active sessions only on Session Connect and Disconnect
ddf176a nfacct: Remove support for NFACCT
fa4176b session: Remove unused NFACCT rules
32e260c session_policy_local: Do not use NULL as key to do a hash table lookup
404c4a4 stats: Use bool type instead integer
47b56b8 session: Update session state only after activation has been tried
3cf2e18 session: Expand '*' to all bearer types
027cbb0 AUTHORS: Mention Andrew's contributions
844286e doc: Update connection managment algorithm
4990bf7 test: Add a script to test P2P through wpa_supplicant DBus if
a1d11b7 test: Remove useless supplicant's old DBus interface test script
095a8f7 gdhcp: Refactor renew/rebind method
cd2c5c5 gdbus: Replace g_timeout_add with g_idle_add
c42a5f9 gdbus: Fix incorrect DBusConnection reference counting
72cc087 gdbus: Fix memory leak
12aad90 ntp: Exponential backoff when timeouting a sent message
eef5afa ntp: Support Kiss-of-Death packet
aed46d8 service: Check session policy before autoconnect is run.
0f76471 session: Add session policy autoconnect support
0e8b339 session: Make session policy global
1f7f926 session: Assign a service to sessions
d4cadd8 service: Disconnect on when last session is deactivated
5280685 service: Add connect reason to debug out in auto connnect
1a24280 service: Add connect reason to __connman_serice_auto_connect()
afd8f2d service: Add connect reason to __connman_service_connect()
88b837e session: Mark session active or inactive
470013d session: Remove service selection implementation
ec09003 Add Gadget session and weighting support.
1a831b6 AUTHORS: Mention Glenn's and Jonathan's contributions
996cbf1 src: Let systemd unmount remote filesystems before stopping connman
a587af9 src: Add D-Bus autostart configuration file
6ad4048 plugins: Add networking support to gadget plugin.
c09371c src: Introduce define for CONNMAN_NETWORK_TYPE_GADGET.
9abdf5f plugins: Refactor Gadget into separate plugin and file.
1e4e965 AUTHORS: Mention Hannu's contributions
30e16a1 ntp: Only accept NTP packets from the defined time server
a29da8c wispr: Handle wispr redirect properly
23fdeed inet: Eliminate misleading error logging
cb88f96 AUTHORS: Mention Philippe's contributions
089e52f README: Update recommended wpa_supplicant version and web page info
3bb94d4 gdhcp: Factor out DHCP Request sending
bd37ce0 Add REBOOTING state support for dhcp client
289c7fc gsupplicant: Rely on wpa_supplicant retry mechanism
9e59cc8 AUTHORS: Mention Alban's contributions
82ad017 config: add ifb in NetworkInterfaceBlacklist default
63aeaf6 src: Add Eduroam network .config file
0d7ad08 doc: Fix formatting
2ca6fb4 dnsproxy: Enable added DNS servers only for the default service
4f04f75 service: Add helper function for detecting a default service index
7b415b9 test: Add script for setting timezone
fefd145 client: Add initial completion for config and session commands
bd03493 client: Add support for monitor command completion
12c6a7a client: Add completion for tether command
f27040c client: Add on/off completion support for agent modes
95d42a7 client: Complete only one service or technology where appropriate
bee4ba8 client: Add helper function for ending readline completion
27088b9 client: Remove extra string duplication when completing commands
0f1dee2 client: Export command line word count function

git-subtree-dir: connman
git-subtree-split: 97c3189
  • Loading branch information
Lorn Potter committed Apr 12, 2014
1 parent cbb12cf commit c447d84
Show file tree
Hide file tree
Showing 297 changed files with 2,160 additions and 3,893 deletions.
File renamed without changes.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

File renamed without changes.
7 changes: 7 additions & 0 deletions connman/AUTHORS → AUTHORS
Expand Up @@ -64,3 +64,10 @@ Mateusz Potrola <mateuszx.potrola@intel.com>
Jaehyun Kim <jeik01.kim@samsung.com>
Zhang Zhengguang <zhengguang.zhang@intel.com>
Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Alban Crequy <alban.crequy@collabora.co.uk>
Philippe Coval <philippe.coval@open.eurogiciel.org>
Hannu Mallat <hannu.mallat@jollamobile.com>
Glenn Schmottlach <Glenn.Schmottlach@xs-embedded.com>
Jonathan Liu <net147@gmail.com>
Andrew LeCain <electricalpanel@gmail.com>
Maneesh Jain <maneesh.jain@samsung.com>
File renamed without changes.
8 changes: 8 additions & 0 deletions connman/ChangeLog → ChangeLog
@@ -1,3 +1,11 @@
ver 1.22:
Fix issue with WPS state synchronization.
Fix issue with DNS servers and default service.
Fix issue with DHCP client and rebooting state.
Add support for NTP exponential backoff handling.
Add support for NTP kiss-of-death packet handling.
Add support for Ethernet gadget networking.

ver 1.21:
Fix issue with WiFi networks and zero SSID length.
Fix issue with security details for hidden WiFi networks.
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions connman/Makefile.am → Makefile.am
Expand Up @@ -43,9 +43,7 @@ gweb_sources += gweb/giognutls.h gweb/gionotls.c
endif

shared_sources = src/shared/util.h src/shared/util.c \
src/shared/netlink.h src/shared/netlink.c \
src/shared/nfacct.h src/shared/nfacct.c \
src/shared/nfnetlink_acct_copy.h
src/shared/netlink.h src/shared/netlink.c

if DATAFILES

Expand Down Expand Up @@ -107,7 +105,7 @@ src_connmand_SOURCES = $(gdhcp_sources) $(gweb_sources) \
src/session.c src/tethering.c src/wpad.c src/wispr.c \
src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \
src/inotify.c src/firewall.c src/nfacct.c src/ipv6pd.c
src/inotify.c src/firewall.c src/ipv6pd.c

src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
@GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ @GNUTLS_LIBS@ \
Expand Down Expand Up @@ -347,7 +345,7 @@ test_scripts = test/get-state test/list-services \
test/test-counter test/set-ipv4-method test/set-ipv6-method \
test/get-services test/get-proxy-autoconfig test/set-proxy \
test/enable-tethering test/disable-tethering test/backtrace \
test/test-session test/test-supplicant \
test/test-session test/p2p-on-supplicant \
test/test-new-supplicant test/service-move-before \
test/set-global-timeservers test/get-global-timeservers \
test/set-nameservers test/set-domains test/set-timeservers \
Expand Down Expand Up @@ -375,7 +373,8 @@ EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
doc/vpn-manager-api.txt doc/vpn-overview.txt \
doc/session-policy-format.txt

EXTRA_DIST += src/main.conf
EXTRA_DIST += src/main.conf \
src/eduroam.config

MANUAL_PAGES += doc/connman.8 doc/connman.conf.5

Expand Down
5 changes: 5 additions & 0 deletions connman/Makefile.plugins → Makefile.plugins
Expand Up @@ -16,6 +16,11 @@ builtin_modules += ethernet
builtin_sources += plugins/ethernet.c
endif

if GADGET
builtin_modules += gadget
builtin_sources += plugins/gadget.c
endif

gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
gsupplicant/supplicant.c gsupplicant/dbus.c

Expand Down
File renamed without changes.
12 changes: 11 additions & 1 deletion connman/README → README
Expand Up @@ -71,6 +71,14 @@ For a working system, certain configuration options need to be enabled:
enabled. This option can be used to build a small daemon
for a specific system if Ethernet support is not required.

--disable-gadget

Disable support for USB Ethernet Gadget devices

By default USB Ethernet Gadget technology support is built-in and
enabled. This option can be used to build a small daemon
for a specific system if USB Ethernet Gadget support is not required.

--disable-wifi

Disable support for WiFi devices
Expand Down Expand Up @@ -286,6 +294,7 @@ options need to be enabled:
CONFIG_USB_GADGET
CONFIG_USB_ETH


wpa_supplicant configuration
============================

Expand All @@ -310,7 +319,7 @@ CONFIG_AUTOSCAN_EXPONENTIAL=y
This will enable the exact same function as bgscan but while being
disconnected.

It is recommended to use wpa_supplicant 1.x or later.
It is recommended to use wpa_supplicant 2.x or later.

If wpa_supplicant is configured to D-Bus autostart, then ConnMan will
trigger the autostart of wpa_supplicant. However please keep in mind
Expand Down Expand Up @@ -351,6 +360,7 @@ Mailing list:
connman@connman.net

For additional information about the project visit ConnMan web site:
https://01.org/connman
http://www.connman.net

You can report bugs at https://01.org/jira/browse/CM
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
173 changes: 150 additions & 23 deletions connman/client/commands.c → client/commands.c
Expand Up @@ -1733,11 +1733,6 @@ static int cmd_session(char *args[], int num, struct connman_option *options)
if (!session_path)
return session_create(TRUE);

if (session_connected == true) {
fprintf(stdout, "Session already connected\n");
return 0;
}

return session_connect();

} else if (!strcmp(command, "disconnect")) {
Expand All @@ -1747,12 +1742,6 @@ static int cmd_session(char *args[], int num, struct connman_option *options)
return 0;
}

if (session_connected == false) {
fprintf(stdout, "Session already "
"disconnected\n");
return 0;
}

return session_disconnect();
} else if (!strcmp(command, "config")) {
if (!session_path) {
Expand Down Expand Up @@ -1796,6 +1785,16 @@ static char *lookup_service(const char *text, int state)
return NULL;
}

static char *lookup_service_arg(const char *text, int state)
{
if (__connmanctl_input_calc_level() > 1) {
__connmanctl_input_lookup_end();
return NULL;
}

return lookup_service(text, state);
}

static char *lookup_technology(const char *text, int state)
{
static int len = 0;
Expand All @@ -1816,12 +1815,27 @@ static char *lookup_technology(const char *text, int state)
return NULL;
}

static char *lookup_technology_arg(const char *text, int state)
{
if (__connmanctl_input_calc_level() > 1) {
__connmanctl_input_lookup_end();
return NULL;
}

return lookup_technology(text, state);
}

static char *lookup_technology_offline(const char *text, int state)
{
static int len = 0;
static bool end = false;
char *str;

if (__connmanctl_input_calc_level() > 1) {
__connmanctl_input_lookup_end();
return NULL;
}

if (state == 0) {
len = strlen(text);
end = false;
Expand All @@ -1842,6 +1856,56 @@ static char *lookup_technology_offline(const char *text, int state)
return NULL;
}

static char *lookup_on_off(const char *text, int state)
{
char *onoff[] = { "on", "off", NULL };
static int idx = 0;
static int len = 0;

char *str;

if (!state) {
idx = 0;
len = strlen(text);
}

while (onoff[idx]) {
str = onoff[idx];
idx++;

if (!strncmp(text, str, len))
return strdup(str);
}

return NULL;
}

static char *lookup_tether(const char *text, int state)
{
int level;

level = __connmanctl_input_calc_level();
if (level < 2)
return lookup_technology(text, state);

if (level == 2)
return lookup_on_off(text, state);

__connmanctl_input_lookup_end();

return NULL;
}

static char *lookup_agent(const char *text, int state)
{
if (__connmanctl_input_calc_level() > 1) {
__connmanctl_input_lookup_end();
return NULL;
}

return lookup_on_off(text, state);
}

static struct connman_option service_options[] = {
{"properties", 'p', "[<service>] (obsolete)"},
{ NULL, }
Expand Down Expand Up @@ -1878,6 +1942,58 @@ static struct connman_option session_options[] = {
{ NULL, }
};

static char *lookup_options(struct connman_option *options, const char *text,
int state)
{
static int idx = 0;
static int len = 0;
const char *str;

if (state == 0) {
idx = 0;
len = strlen(text);
}

while (options[idx].name) {
str = options[idx].name;
idx++;

if (str && strncmp(text, str, len) == 0)
return strdup(str);
}

return NULL;
}

static char *lookup_monitor(const char *text, int state)
{
int level;

level = __connmanctl_input_calc_level();

if (level < 2)
return lookup_options(monitor_options, text, state);

if (level == 2)
return lookup_on_off(text, state);

__connmanctl_input_lookup_end();
return NULL;
}

static char *lookup_config(const char *text, int state)
{
if (__connmanctl_input_calc_level() < 2)
return lookup_service(text, state);

return lookup_options(config_options, text, state);
}

static char *lookup_session(const char *text, int state)
{
return lookup_options(session_options, text, state);
}

static const struct {
const char *cmd;
const char *argument;
Expand All @@ -1900,27 +2016,28 @@ static const struct {
" wifi [on|off] <ssid> <passphrase> ",
NULL, cmd_tether,
"Enable, disable tethering, set SSID and passphrase for wifi",
lookup_technology },
lookup_tether },
{ "services", "[<service>]", service_options, cmd_services,
"Display services", lookup_service },
"Display services", lookup_service_arg },
{ "scan", "<technology>", NULL, cmd_scan,
"Scans for new services for given technology", lookup_technology },
"Scans for new services for given technology",
lookup_technology_arg },
{ "connect", "<service>", NULL, cmd_connect,
"Connect a given service", lookup_service },
"Connect a given service", lookup_service_arg },
{ "disconnect", "<service>", NULL, cmd_disconnect,
"Disconnect a given service", lookup_service },
"Disconnect a given service", lookup_service_arg },
{ "config", "<service>", config_options, cmd_config,
"Set service configuration options", lookup_service },
"Set service configuration options", lookup_config },
{ "monitor", "[off]", monitor_options, cmd_monitor,
"Monitor signals from interfaces", NULL },
"Monitor signals from interfaces", lookup_monitor },
{ "agent", "on|off", NULL, cmd_agent,
"Agent mode", NULL },
"Agent mode", lookup_agent },
{"vpnconnections", "[<connection>]", NULL, cmd_vpnconnections,
"Display VPN connections", NULL },
{ "vpnagent", "on|off", NULL, cmd_vpnagent,
"VPN Agent mode", NULL },
"VPN Agent mode", lookup_agent },
{ "session", "on|off|connect|disconnect|config", session_options,
cmd_session, "Enable or disable a session", NULL },
cmd_session, "Enable or disable a session", lookup_session },
{ "help", NULL, NULL, cmd_help,
"Show help", NULL },
{ "exit", NULL, NULL, cmd_exit,
Expand Down Expand Up @@ -1970,10 +2087,20 @@ static int cmd_help(char *args[], int num, struct connman_option *options)

__connmanctl_lookup_cb __connmanctl_get_lookup_func(const char *text)
{
int i;
int i, cmdlen, textlen;

if (!text)
return NULL;

textlen = strlen(text);

for (i = 0; cmd_table[i].cmd; i++) {
if (g_strcmp0(cmd_table[i].cmd, text) == 0)
cmdlen = strlen(cmd_table[i].cmd);

if (textlen > cmdlen && text[cmdlen] != ' ')
continue;

if (strncmp(cmd_table[i].cmd, text, cmdlen) == 0)
return cmd_table[i].cb;
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c447d84

Please sign in to comment.