blob: 8afaa9250bbfb8c24a160d851f37fec43557d11c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* ISC license. */
#include <errno.h>
#include <skalibs/stralloc.h>
#include <bcnm/wpactrl.h>
#include "wpactrl-internal.h"
int wpactrl_querysa (wpactrl_t *a, char const *s, stralloc *sa, tain_t *stamp)
{
char buf[WPACTRL_PACKET_MAX] ;
ssize_t r = wpactrl_query(a, s, buf, WPACTRL_PACKET_MAX, stamp) ;
if (r < 0) return 0 ;
if (!r) return (errno = EPIPE, 0) ;
return stralloc_catb(sa, buf, r) ;
}
|