*wliapitest.c
*/
#include<stdio.h> |
| |
#include<fcntl.h> |
| |
#include<sys/errno.h> |
| |
#include<api.h> |
|
|
#define IBAC_TEST | "ibac_test" | |
main(int argc, char *argv[]) | ||
wli_fap_t | ptype = WLIAPI_FAP_IBAC; | |
wliapi_err_t | err = WLIAPI_SUCCESS; | |
int |
| fd = 0; |
fd = open(IBAC_TEST, O_CREATO_TRUNCO_RDWR, 0666); if ( fd < 0 ) {
(void) fprintf(stderr,
"Failed to create a test file; error %d\n", errno);
}
close(fd);
err = wli_add_fap(IBAC_TEST, ptype); if (err) {
fprintf(stderr, "Failed to add fap %d\n", err);
}
err = wli_check_fap(IBAC_TEST, ptype, WLIAPI_FREAD); if (err) {
fprintf(stderr, "Failed to check fap %d\n", err);
}
err = wli_del_fap(IBAC_TEST, ptype); if (err) {
fprintf(stderr, "Failed to del fap %d\n", err);
}
return(err);
}