summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/bcnm/wpactrl.h40
-rw-r--r--src/libwpactrl/wpactrl-internal.h2
-rw-r--r--src/libwpactrl/wpactrl_addnetwork.c2
-rw-r--r--src/libwpactrl/wpactrl_associate.c2
-rw-r--r--src/libwpactrl/wpactrl_command.c2
-rw-r--r--src/libwpactrl/wpactrl_fd_timed_recv.c4
-rw-r--r--src/libwpactrl/wpactrl_findnetwork.c2
-rw-r--r--src/libwpactrl/wpactrl_query.c4
-rw-r--r--src/libwpactrl/wpactrl_querysa.c2
-rw-r--r--src/libwpactrl/wpactrl_removenetwork.c2
-rw-r--r--src/libwpactrl/wpactrl_selectnetwork.c2
-rw-r--r--src/libwpactrl/wpactrl_setnetworkoption.c2
-rw-r--r--src/libwpactrl/wpactrl_start.c4
-rw-r--r--src/libwpactrl/wpactrl_startscan.c4
-rw-r--r--src/libwpactrl/wpactrl_xchg_computedeadline.c2
-rw-r--r--src/libwpactrl/wpactrl_xchg_event.c2
-rw-r--r--src/libwpactrl/wpactrl_xchg_init.c2
-rw-r--r--src/libwpactrl/wpactrl_xchg_timeout.c2
-rw-r--r--src/utils/bcnm-waitif.c4
19 files changed, 43 insertions, 43 deletions
diff --git a/src/include/bcnm/wpactrl.h b/src/include/bcnm/wpactrl.h
index 5602037..9db675f 100644
--- a/src/include/bcnm/wpactrl.h
+++ b/src/include/bcnm/wpactrl.h
@@ -43,7 +43,7 @@ struct wpactrl_s
int fds ;
int fda ;
uint32_t options ;
- tain_t tto ;
+ tain tto ;
size_t datahead ;
stralloc data ;
stralloc filters ;
@@ -55,15 +55,15 @@ struct wpactrl_s
extern wpactrl_t const wpactrl_zero ;
-extern int wpactrl_start (wpactrl_t *, char const *, unsigned int, tain_t *) ;
+extern int wpactrl_start (wpactrl_t *, char const *, unsigned int, tain *) ;
#define wpactrl_start_g(a, path, timeout) wpactrl_start(a, path, (timeout), &STAMP)
extern void wpactrl_end (wpactrl_t *) ;
-extern wparesponse_t wpactrl_command (wpactrl_t *, char const *, tain_t *) ;
+extern wparesponse_t wpactrl_command (wpactrl_t *, char const *, tain *) ;
#define wpactrl_command_g(a, q) wpactrl_command(a, (q), &STAMP)
-extern ssize_t wpactrl_query (wpactrl_t *, char const *, char *, size_t, tain_t *) ;
+extern ssize_t wpactrl_query (wpactrl_t *, char const *, char *, size_t, tain *) ;
#define wpactrl_query_g(a, q, ans, ansmax) wpactrl_query(a, q, ans, (ansmax), &STAMP)
-extern int wpactrl_querysa (wpactrl_t *, char const *, stralloc *, tain_t *) ;
+extern int wpactrl_querysa (wpactrl_t *, char const *, stralloc *, tain *) ;
#define wpactrl_querysa_g(a, q, sa) wpactrl_querysa(a, q, (sa), &STAMP)
extern int wpactrl_filter_add (wpactrl_t *, char const *) ;
@@ -117,14 +117,14 @@ extern int wpactrl_networks_parse (char const *, size_t, genalloc * /* wpactrl_n
/* Functions for easy iopause around async commands */
-typedef int wpactrl_xchg_func_t (wpactrl_t *, char const *, size_t, void *, tain_t *) ;
-typedef wpactrl_xchg_func_t *wpactrl_xchg_func_t_ref ;
+typedef int wpactrl_xchg_func (wpactrl_t *, char const *, size_t, void *, tain *) ;
+typedef wpactrl_xchg_func *wpactrl_xchg_func_ref ;
typedef struct wpactrl_xchgitem_s wpactrl_xchgitem_t, *wpactrl_xchgitem_t_ref ;
struct wpactrl_xchgitem_s
{
char const *filter ;
- wpactrl_xchg_func_t_ref cb ;
+ wpactrl_xchg_func_ref cb ;
} ;
typedef struct wpactrl_xchg_s wpactrl_xchg_t, *wpactrl_xchg_t_ref ;
@@ -133,7 +133,7 @@ struct wpactrl_xchg_s
wpactrl_xchgitem_t const *tab ;
unsigned int n ;
unsigned int i ;
- tain_t deadline ;
+ tain deadline ;
int status ;
void *aux ;
} ;
@@ -141,13 +141,13 @@ struct wpactrl_xchg_s
#define WPACTRL_XCHG_INIT(array, size, limit, extra) { array, size, 0, limit, ECONNABORTED, extra }
extern wpactrl_xchg_t const wpactrl_xchg_zero ;
-extern void wpactrl_xchg_init (wpactrl_xchg_t *, wpactrl_xchgitem_t const *, unsigned int, tain_t const *, void *) ;
+extern void wpactrl_xchg_init (wpactrl_xchg_t *, wpactrl_xchgitem_t const *, unsigned int, tain const *, void *) ;
extern int wpactrl_xchg_start (wpactrl_t *, wpactrl_xchg_t *) ;
-extern void wpactrl_xchg_computedeadline (wpactrl_xchg_t const *, tain_t *) ;
-extern int wpactrl_xchg_timeout (wpactrl_t *, wpactrl_xchg_t *, tain_t const *) ;
+extern void wpactrl_xchg_computedeadline (wpactrl_xchg_t const *, tain *) ;
+extern int wpactrl_xchg_timeout (wpactrl_t *, wpactrl_xchg_t *, tain const *) ;
#define wpactrl_xchg_timeout_g(a, dt) wpactrl_xchg_timeout(a, (dt), &STAMP)
-extern int wpactrl_xchg_event (wpactrl_t *, wpactrl_xchg_t *, tain_t *) ;
+extern int wpactrl_xchg_event (wpactrl_t *, wpactrl_xchg_t *, tain *) ;
#define wpactrl_xchg_event_g(a, dt) wpactrl_xchg_event(a, (dt), &STAMP)
typedef struct wpactrl_xchg_cbres_s wpactrl_xchg_cbres_t, *wpactrl_xchg_cbres_t_ref ;
@@ -164,25 +164,25 @@ extern void wpactrl_xchg_cbres_free (wpactrl_xchg_cbres_t *) ;
/* High-level functions for common calls to wpa_supplicant */
-extern int wpactrl_addnetwork (wpactrl_t *, uint32_t *, tain_t *) ;
+extern int wpactrl_addnetwork (wpactrl_t *, uint32_t *, tain *) ;
#define wpactrl_addnetwork_g(a, idp) wpactrl_addnetwork(a, (idp), &STAMP)
-extern wparesponse_t wpactrl_removenetwork (wpactrl_t *, uint32_t, tain_t *) ;
+extern wparesponse_t wpactrl_removenetwork (wpactrl_t *, uint32_t, tain *) ;
#define wpactrl_removenetwork_g(a, id) wpactrl_removenetwork(a, (id), &STAMP)
-extern int wpactrl_findnetwork (wpactrl_t *, char const *, uint32_t *, tain_t *) ;
+extern int wpactrl_findnetwork (wpactrl_t *, char const *, uint32_t *, tain *) ;
#define wpactrl_findnetwork_g(a, ssid, idp) wpactrl(a, ssid, (idp), &STAMP)
-extern wparesponse_t wpactrl_setnetworkoption (wpactrl_t *, uint32_t, char const *, char const *, tain_t *) ;
+extern wparesponse_t wpactrl_setnetworkoption (wpactrl_t *, uint32_t, char const *, char const *, tain *) ;
#define wpactrl_setnetworkoption_g(a, id, var, val) wpactrl_setnetworkoption(a, id, var, (val), &STAMP)
-extern wparesponse_t wpactrl_selectnetwork (wpactrl_t *, uint32_t, tain_t *) ;
+extern wparesponse_t wpactrl_selectnetwork (wpactrl_t *, uint32_t, tain *) ;
#define wpactrl_selectnetwork_g(a, id) wpactrl_selectnetwork(a, (id), &STAMP)
-extern int wpactrl_associate (wpactrl_t *, char const *, char const *, tain_t *) ;
+extern int wpactrl_associate (wpactrl_t *, char const *, char const *, tain *) ;
#define wpactrl_associate_g(a, ssid, psk) wpactrl_associate(a, ssid, (psk), &STAMP)
-extern int wpactrl_startscan (wpactrl_t *, wpactrl_xchg_t *, wpactrl_xchg_cbres_t *, tain_t const *, tain_t *) ;
+extern int wpactrl_startscan (wpactrl_t *, wpactrl_xchg_t *, wpactrl_xchg_cbres_t *, tain const *, tain *) ;
#define wpactrl_startscan_g(a, xchg, res, limit) wpactrl_startscan(a, xchg, res, (limit), &STAMP)
#ifdef __cplusplus
diff --git a/src/libwpactrl/wpactrl-internal.h b/src/libwpactrl/wpactrl-internal.h
index 50f2fbd..07d417d 100644
--- a/src/libwpactrl/wpactrl-internal.h
+++ b/src/libwpactrl/wpactrl-internal.h
@@ -13,7 +13,7 @@
#define WPACTRL_RECV_MAX 32
extern ssize_t wpactrl_fd_recv (int, char *, size_t) ;
-extern ssize_t wpactrl_fd_timed_recv (int, char *, size_t, tain_t const *, tain_t *) ;
+extern ssize_t wpactrl_fd_timed_recv (int, char *, size_t, tain const *, tain *) ;
extern size_t wpactrl_filter_exact_search (wpactrl_t const *, char const *) gccattr_pure ;
extern size_t wpactrl_xchgset_find (wpactrl_t const *, uint32_t) ;
diff --git a/src/libwpactrl/wpactrl_addnetwork.c b/src/libwpactrl/wpactrl_addnetwork.c
index 65e5963..7dfd7a4 100644
--- a/src/libwpactrl/wpactrl_addnetwork.c
+++ b/src/libwpactrl/wpactrl_addnetwork.c
@@ -6,7 +6,7 @@
#include <skalibs/error.h>
#include <bcnm/wpactrl.h>
-int wpactrl_addnetwork (wpactrl_t *a, uint32_t *id, tain_t *stamp)
+int wpactrl_addnetwork (wpactrl_t *a, uint32_t *id, tain *stamp)
{
char buf[UINT32_FMT] ;
if (wpactrl_query(a, "ADD_NETWORK", buf, UINT32_FMT, stamp) < 0) return 0 ;
diff --git a/src/libwpactrl/wpactrl_associate.c b/src/libwpactrl/wpactrl_associate.c
index 08f3656..ae82112 100644
--- a/src/libwpactrl/wpactrl_associate.c
+++ b/src/libwpactrl/wpactrl_associate.c
@@ -4,7 +4,7 @@
#include <errno.h>
#include <bcnm/wpactrl.h>
-int wpactrl_associate (wpactrl_t *a, char const *ssid, char const *psk, tain_t *stamp)
+int wpactrl_associate (wpactrl_t *a, char const *ssid, char const *psk, tain *stamp)
{
uint32_t id ;
int r = wpactrl_findnetwork(a, ssid, &id, stamp) ;
diff --git a/src/libwpactrl/wpactrl_command.c b/src/libwpactrl/wpactrl_command.c
index d10e346..a20fe9d 100644
--- a/src/libwpactrl/wpactrl_command.c
+++ b/src/libwpactrl/wpactrl_command.c
@@ -11,7 +11,7 @@ struct wparesponse_map_s
wparesponse_t r ;
} ;
-wparesponse_t wpactrl_command (wpactrl_t *a, char const *s, tain_t *stamp)
+wparesponse_t wpactrl_command (wpactrl_t *a, char const *s, tain *stamp)
{
static struct wparesponse_map_s const wparesponses[] =
{
diff --git a/src/libwpactrl/wpactrl_fd_timed_recv.c b/src/libwpactrl/wpactrl_fd_timed_recv.c
index db181c1..dc50a91 100644
--- a/src/libwpactrl/wpactrl_fd_timed_recv.c
+++ b/src/libwpactrl/wpactrl_fd_timed_recv.c
@@ -22,8 +22,8 @@ static ssize_t get (struct blah_s *blah)
return sanitize_read(wpactrl_fd_recv(blah->fd, blah->s, blah->len)) ;
}
-ssize_t wpactrl_fd_timed_recv (int fd, char *s, size_t len, tain_t const *deadline, tain_t *stamp)
+ssize_t wpactrl_fd_timed_recv (int fd, char *s, size_t len, tain const *deadline, tain *stamp)
{
struct blah_s blah = { .fd = fd, .s = s, .len = len } ;
- return timed_get(&blah, (initfunc_t_ref)&getfd, (getfunc_t_ref)&get, deadline, stamp) ;
+ return timed_get(&blah, (init_func_ref)&getfd, (get_func_ref)&get, deadline, stamp) ;
}
diff --git a/src/libwpactrl/wpactrl_findnetwork.c b/src/libwpactrl/wpactrl_findnetwork.c
index e5851d0..cb8868f 100644
--- a/src/libwpactrl/wpactrl_findnetwork.c
+++ b/src/libwpactrl/wpactrl_findnetwork.c
@@ -5,7 +5,7 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-int wpactrl_findnetwork (wpactrl_t *a, char const *ssid, uint32_t *id, tain_t *stamp)
+int wpactrl_findnetwork (wpactrl_t *a, char const *ssid, uint32_t *id, tain *stamp)
{
char buf[WPACTRL_PACKET_MAX] ;
stralloc sa = STRALLOC_ZERO ;
diff --git a/src/libwpactrl/wpactrl_query.c b/src/libwpactrl/wpactrl_query.c
index b8b42df..0bdf388 100644
--- a/src/libwpactrl/wpactrl_query.c
+++ b/src/libwpactrl/wpactrl_query.c
@@ -5,9 +5,9 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-ssize_t wpactrl_query (wpactrl_t *a, char const *q, char *ans, size_t ansmax, tain_t *stamp)
+ssize_t wpactrl_query (wpactrl_t *a, char const *q, char *ans, size_t ansmax, tain *stamp)
{
- tain_t deadline ;
+ tain deadline ;
tain_add(&deadline, stamp, &a->tto) ;
if (!ipc_timed_send(a->fds, q, strlen(q), &deadline, stamp)) return WPA_ERROR ;
return wpactrl_fd_timed_recv(a->fds, ans, ansmax, &deadline, stamp) ;
diff --git a/src/libwpactrl/wpactrl_querysa.c b/src/libwpactrl/wpactrl_querysa.c
index 8afaa92..23b3ff2 100644
--- a/src/libwpactrl/wpactrl_querysa.c
+++ b/src/libwpactrl/wpactrl_querysa.c
@@ -5,7 +5,7 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-int wpactrl_querysa (wpactrl_t *a, char const *s, stralloc *sa, tain_t *stamp)
+int wpactrl_querysa (wpactrl_t *a, char const *s, stralloc *sa, tain *stamp)
{
char buf[WPACTRL_PACKET_MAX] ;
ssize_t r = wpactrl_query(a, s, buf, WPACTRL_PACKET_MAX, stamp) ;
diff --git a/src/libwpactrl/wpactrl_removenetwork.c b/src/libwpactrl/wpactrl_removenetwork.c
index f943b72..1c4b47d 100644
--- a/src/libwpactrl/wpactrl_removenetwork.c
+++ b/src/libwpactrl/wpactrl_removenetwork.c
@@ -3,7 +3,7 @@
#include <skalibs/uint32.h>
#include <bcnm/wpactrl.h>
-wparesponse_t wpactrl_removenetwork (wpactrl_t *a, uint32_t id, tain_t *stamp)
+wparesponse_t wpactrl_removenetwork (wpactrl_t *a, uint32_t id, tain *stamp)
{
char buf[15 + UINT32_FMT] = "REMOVE_NETWORK " ;
buf[15 + uint32_fmt(buf + 15, id)] = 0 ;
diff --git a/src/libwpactrl/wpactrl_selectnetwork.c b/src/libwpactrl/wpactrl_selectnetwork.c
index 25842e4..98f9332 100644
--- a/src/libwpactrl/wpactrl_selectnetwork.c
+++ b/src/libwpactrl/wpactrl_selectnetwork.c
@@ -3,7 +3,7 @@
#include <skalibs/uint32.h>
#include <bcnm/wpactrl.h>
-wparesponse_t wpactrl_selectnetwork (wpactrl_t *a, uint32_t id, tain_t *stamp)
+wparesponse_t wpactrl_selectnetwork (wpactrl_t *a, uint32_t id, tain *stamp)
{
char buf[15 + UINT32_FMT] = "SELECT_NETWORK " ;
buf[15 + uint32_fmt(buf + 15, id)] = 0 ;
diff --git a/src/libwpactrl/wpactrl_setnetworkoption.c b/src/libwpactrl/wpactrl_setnetworkoption.c
index 5b2fdca..9d7e8f8 100644
--- a/src/libwpactrl/wpactrl_setnetworkoption.c
+++ b/src/libwpactrl/wpactrl_setnetworkoption.c
@@ -4,7 +4,7 @@
#include <skalibs/uint32.h>
#include <bcnm/wpactrl.h>
-wparesponse_t wpactrl_setnetworkoption (wpactrl_t *a, uint32_t id, char const *var, char const *val, tain_t *stamp)
+wparesponse_t wpactrl_setnetworkoption (wpactrl_t *a, uint32_t id, char const *var, char const *val, tain *stamp)
{
size_t varlen = strlen(var) ;
size_t vallen = strlen(val) ;
diff --git a/src/libwpactrl/wpactrl_start.c b/src/libwpactrl/wpactrl_start.c
index 420861b..77f73e8 100644
--- a/src/libwpactrl/wpactrl_start.c
+++ b/src/libwpactrl/wpactrl_start.c
@@ -14,9 +14,9 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-int wpactrl_start (wpactrl_t *a, char const *path, unsigned int timeout, tain_t *stamp)
+int wpactrl_start (wpactrl_t *a, char const *path, unsigned int timeout, tain *stamp)
{
- tain_t tto, deadline ;
+ tain tto, deadline ;
int fda, fds ;
stralloc sa = STRALLOC_ZERO ;
if (timeout) tain_from_millisecs(&tto, timeout) ;
diff --git a/src/libwpactrl/wpactrl_startscan.c b/src/libwpactrl/wpactrl_startscan.c
index 7ce5f52..4de9a4d 100644
--- a/src/libwpactrl/wpactrl_startscan.c
+++ b/src/libwpactrl/wpactrl_startscan.c
@@ -4,7 +4,7 @@
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
-static int wpactrl_scan_cb (wpactrl_t *a, char const *s, size_t len, void *aux, tain_t *stamp)
+static int wpactrl_scan_cb (wpactrl_t *a, char const *s, size_t len, void *aux, tain *stamp)
{
wpactrl_xchg_cbres_t *res = aux ;
char buf[WPACTRL_PACKET_MAX] ;
@@ -21,7 +21,7 @@ static wpactrl_xchgitem_t wpactrl_xchgitem_scan =
.cb = &wpactrl_scan_cb
} ;
-int wpactrl_startscan (wpactrl_t *a, wpactrl_xchg_t *xchg, wpactrl_xchg_cbres_t *res, tain_t const *deadline, tain_t *stamp)
+int wpactrl_startscan (wpactrl_t *a, wpactrl_xchg_t *xchg, wpactrl_xchg_cbres_t *res, tain const *deadline, tain *stamp)
{
wparesponse_t r = wpactrl_command(a, "SCAN", stamp) ;
if (r != WPA_OK && r != WPA_FAILBUSY) return (errno = EIO, 0) ;
diff --git a/src/libwpactrl/wpactrl_xchg_computedeadline.c b/src/libwpactrl/wpactrl_xchg_computedeadline.c
index baaac77..78a3348 100644
--- a/src/libwpactrl/wpactrl_xchg_computedeadline.c
+++ b/src/libwpactrl/wpactrl_xchg_computedeadline.c
@@ -3,7 +3,7 @@
#include <skalibs/tai.h>
#include <bcnm/wpactrl.h>
-void wpactrl_xchg_computedeadline (wpactrl_xchg_t const *dt, tain_t *deadline)
+void wpactrl_xchg_computedeadline (wpactrl_xchg_t const *dt, tain *deadline)
{
if (tain_less(&dt->deadline, deadline)) *deadline = dt->deadline ;
}
diff --git a/src/libwpactrl/wpactrl_xchg_event.c b/src/libwpactrl/wpactrl_xchg_event.c
index d639d24..23ad93b 100644
--- a/src/libwpactrl/wpactrl_xchg_event.c
+++ b/src/libwpactrl/wpactrl_xchg_event.c
@@ -18,7 +18,7 @@ static inline size_t wpactrl_findmsg (wpactrl_t *a, char const *filter)
return i ;
}
-int wpactrl_xchg_event (wpactrl_t *a, wpactrl_xchg_t *dt, tain_t *stamp)
+int wpactrl_xchg_event (wpactrl_t *a, wpactrl_xchg_t *dt, tain *stamp)
{
size_t pos, len ;
if (dt->i >= dt->n) return 2 ;
diff --git a/src/libwpactrl/wpactrl_xchg_init.c b/src/libwpactrl/wpactrl_xchg_init.c
index b9d35f0..4a7af1b 100644
--- a/src/libwpactrl/wpactrl_xchg_init.c
+++ b/src/libwpactrl/wpactrl_xchg_init.c
@@ -3,7 +3,7 @@
#include <errno.h>
#include <bcnm/wpactrl.h>
-void wpactrl_xchg_init (wpactrl_xchg_t *dt, wpactrl_xchgitem_t const *tab, unsigned int n, tain_t const *limit, void *aux)
+void wpactrl_xchg_init (wpactrl_xchg_t *dt, wpactrl_xchgitem_t const *tab, unsigned int n, tain const *limit, void *aux)
{
dt->tab = tab ;
dt->n = n ;
diff --git a/src/libwpactrl/wpactrl_xchg_timeout.c b/src/libwpactrl/wpactrl_xchg_timeout.c
index fd99390..8b80e44 100644
--- a/src/libwpactrl/wpactrl_xchg_timeout.c
+++ b/src/libwpactrl/wpactrl_xchg_timeout.c
@@ -4,7 +4,7 @@
#include <skalibs/tai.h>
#include <bcnm/wpactrl.h>
-int wpactrl_xchg_timeout (wpactrl_t *a, wpactrl_xchg_t *dt, tain_t const *stamp)
+int wpactrl_xchg_timeout (wpactrl_t *a, wpactrl_xchg_t *dt, tain const *stamp)
{
if (!tain_less(stamp, &dt->deadline))
{
diff --git a/src/utils/bcnm-waitif.c b/src/utils/bcnm-waitif.c
index c5fd556..8a2e595 100644
--- a/src/utils/bcnm-waitif.c
+++ b/src/utils/bcnm-waitif.c
@@ -25,13 +25,13 @@ static inline int check (bcnm_if_link_state_t *tab, size_t n, unsigned int mask,
int main (int argc, char const *const *argv)
{
iopause_fd x = { .events = IOPAUSE_READ } ;
- tain_t deadline, tto ;
+ tain deadline, tto ;
int not = 0 ;
unsigned int mask = 1 ;
unsigned int kbufsize = 131072 ;
PROG = "bcnm-waitif" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
unsigned int t = 0 ;
for (;;)
{