libnwam_priv.h revision 6ba597c56d749c61b4f783157f63196d7b2445f0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This file contains private data structures and APIs of libnwam. Currently
* these are used by nwamd (nwam_event_*() and nwam_record_audit_event()) and
* netcfgd (nwam_backend_*()) only, supporting the event messaging, audit
* and backend configuration access that nwamd and netcfgd supply.
*
* Implementation is MT safe.
*/
#ifndef _LIBNWAM_PRIV_H
#define _LIBNWAM_PRIV_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libnwam.h>
/* Name of directory containing the doors */
#define NWAM_DOOR_DIR "/etc/svc/volatile/nwam"
/* Name of door used to communicate with libnwam backend (in netcfgd) */
/* Name of door used to communicate with nwamd */
/* Requests to nwamd door */
typedef enum {
/* Status returned by nwamd door */
typedef enum {
#define NWAMD_MAX_NUM_WLANS 64
typedef union {
/* Used for EVENT_[UN]REGISTER requests */
struct {
char nwdad_name[MAXPATHLEN];
/* Used for ACTION requests */
struct {
char nwdad_name[NWAM_MAX_NAME_LEN];
char nwdad_parent[NWAM_MAX_NAME_LEN];
/* Used for STATE requests */
struct {
char nwdad_name[NWAM_MAX_NAME_LEN];
char nwdad_parent[NWAM_MAX_NAME_LEN];
/* Used for PRIORITY_GROUP requests */
struct {
struct {
char nwdad_name[NWAM_MAX_NAME_LEN];
char nwdad_essid[NWAM_MAX_NAME_LEN];
char nwdad_bssid[NWAM_MAX_NAME_LEN];
char nwdad_key[NWAM_MAX_NAME_LEN];
typedef struct {
typedef enum {
typedef struct nwam_backend_door_arg {
/*
* Functions needed to initialize/stop processing of libnwam backend data
* (used in netcfgd).
*/
extern nwam_error_t nwam_backend_init(void);
extern void nwam_backend_fini(void);
/*
* create audit session, report event, end session. Used by nwamd.
*/
int, int);
/*
* NWAM daemon functions, used to send, stop sending, initialize or finish
* event IPC. Used by nwamd.
*/
extern void nwam_event_send_fini(void);
extern nwam_error_t nwam_event_queue_init(const char *);
extern void nwam_event_queue_fini(const char *);
#ifdef __cplusplus
}
#endif
#endif /* _LIBNWAM_PRIV_H */