|
Packit |
51d0f7 |
/*
|
|
Packit |
51d0f7 |
* Header file for the NetLabel Control Utility
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
* Author: Paul Moore <paul@paul-moore.com>
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
*/
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/*
|
|
Packit |
51d0f7 |
* (c) Copyright Hewlett-Packard Development Company, L.P., 2006
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
* This program is free software: you can redistribute it and/or modify
|
|
Packit |
51d0f7 |
* it under the terms of version 2 of the GNU General Public License as
|
|
Packit |
51d0f7 |
* published by the Free Software Foundation.
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
* This program is distributed in the hope that it will be useful,
|
|
Packit |
51d0f7 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
51d0f7 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
51d0f7 |
* GNU General Public License for more details.
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
51d0f7 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
51d0f7 |
*
|
|
Packit |
51d0f7 |
*/
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
#ifndef _NETLABELCTL_H
|
|
Packit |
51d0f7 |
#define _NETLABELCTL_H
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* global program name */
|
|
Packit |
51d0f7 |
extern char *nlctl_name;
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* global option variables */
|
|
Packit |
51d0f7 |
extern uint32_t opt_verbose;
|
|
Packit |
51d0f7 |
extern uint32_t opt_timeout;
|
|
Packit |
51d0f7 |
extern uint32_t opt_pretty;
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* warning/error reporting */
|
|
Packit |
51d0f7 |
#define MSG_WARN(_x) "%s: warning, "_x,nlctl_name
|
|
Packit |
51d0f7 |
#define MSG_WARN_MOD(_m,_x) "%s: warning[%s], "_x,nlctl_name,_m
|
|
Packit |
51d0f7 |
#define MSG_ERR(_x) "%s: error, "_x,nlctl_name
|
|
Packit |
51d0f7 |
#define MSG_ERR_MOD(_m,_x) "%s: error[%s], "_x,nlctl_name,_m
|
|
Packit |
51d0f7 |
#define MSG_OLD(_x) "%s: deprecated, "_x,nlctl_name
|
|
Packit |
51d0f7 |
#define MSG_OLD_MOD(_m,_x) "%s: deprecated[%s], "_x,nlctl_name,_m
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* message display */
|
|
Packit |
51d0f7 |
#define MSG(_x) (opt_pretty?_x:"")
|
|
Packit |
51d0f7 |
#define MSG_V(_x) (opt_verbose?_x"")
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* network address helper functions */
|
|
Packit |
51d0f7 |
void nlctl_addr_print(const struct nlbl_netaddr *addr);
|
|
Packit |
51d0f7 |
int nlctl_addr_parse(char *addr_str, struct nlbl_netaddr *addr);
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
/* module entry points */
|
|
Packit |
51d0f7 |
typedef int main_function_t(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
int mgmt_main(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
int map_main(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
int unlbl_main(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
int cipso_main(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
int calipso_main(int argc, char *argv[]);
|
|
Packit |
51d0f7 |
|
|
Packit |
51d0f7 |
#endif
|