about summary refs log tree commit diff
path: root/src/libwpactrl/wpactrl_addnetwork.c
blob: 7dfd7a4b1aac06d0f38f5ae93c0b6b451cd556ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <string.h>
#include <errno.h>
#include <skalibs/uint32.h>
#include <skalibs/error.h>
#include <bcnm/wpactrl.h>

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 ;
  if (uint32_scan(buf, id)) return 1 ;
  return (errno = EPROTO, 0) ;
}