/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ILBADM_H
#define _ILBADM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdarg.h>
#include <inttypes.h>
#include <libilb.h>
#include <libintl.h>
#include <locale.h>
#define ILBADM_COPYRIGHT \
"Copyright 2009 Sun Microsystems, Inc. All rights reserved.\n" \
"Use is subject to license terms.\n"
/*
* flag values
*/
typedef enum {
ILBADM_OK = 0,
/* set it in ilbadm fuctions to indicate */
/* printing of non-generic error messages */
typedef enum {
/*
* we need a few codes for commands, can't use libilb ones
*/
typedef enum {
} ilbadm_cmd_t;
/* filched from snoop_ether.c */
typedef struct val_type {
int v_type;
typedef struct key_names {
typedef struct servnode {
typedef struct sgroup {
int sg_count;
char *sg_name;
typedef struct cmd_hlp {
char *h_help;
typedef struct cmd_names {
ilbadm_status_t ilbadm_add_server_to_group(int, char **);
ilbadm_status_t ilbadm_create_servergroup(int, char **);
ilbadm_status_t ilbadm_destroy_servergroup(int, char **);
ilbadm_status_t ilbadm_rem_server_from_group(int, char **);
ilbadm_status_t ilbadm_create_rule(int, char **);
ilbadm_status_t ilbadm_destroy_rule(int, char **);
ilbadm_status_t ilbadm_enable_rule(int, char **);
ilbadm_status_t ilbadm_disable_rule(int, char **);
ilbadm_status_t ilbadm_show_server(int, char **);
ilbadm_status_t ilbadm_enable_server(int, char **);
ilbadm_status_t ilbadm_disable_server(int, char **);
ilbadm_status_t ilbadm_show_servergroups(int, char **);
ilbadm_status_t ilbadm_show_rules(int, char **);
ilbadm_status_t ilbadm_show_stats(int, char **);
ilbadm_status_t ilbadm_create_hc(int, char **);
ilbadm_status_t ilbadm_destroy_hc(int, char **);
ilbadm_status_t ilbadm_show_hc(int, char **);
ilbadm_status_t ilbadm_show_hc_result(int, char **);
ilbadm_status_t ilbadm_noimport(int, char **);
ilbadm_status_t ilbadm_show_nat(int, char **);
ilbadm_status_t ilbadm_show_persist(int, char **);
int, int *);
ilbadm_status_t ilbadm_import(int, int, char *[], int);
ilbadm_status_t ilbadm_export(int, char *[]);
void print_cmdlist_short(char *, FILE *);
longlong_t *);
char *i_str_from_val(int, ilbadm_val_type_t *);
char *ilbadm_key_to_opt(ilbadm_key_code_t);
void Usage(char *);
void unknown_opt(char **, int);
const char *ilbadm_errstr(ilbadm_status_t);
void ilbadm_err(const char *format, ...);
#ifdef __cplusplus
}
#endif
#endif /* _ILBADM_H */