Blame include/ipmitool/ipmi_user.h

Packit Service ed0f68
/*
Packit Service ed0f68
 * Copyright (c) 2003 Sun Microsystems, Inc.  All Rights Reserved.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution and use in source and binary forms, with or without
Packit Service ed0f68
 * modification, are permitted provided that the following conditions
Packit Service ed0f68
 * are met:
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution of source code must retain the above copyright
Packit Service ed0f68
 * notice, this list of conditions and the following disclaimer.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Redistribution in binary form must reproduce the above copyright
Packit Service ed0f68
 * notice, this list of conditions and the following disclaimer in the
Packit Service ed0f68
 * documentation and/or other materials provided with the distribution.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * Neither the name of Sun Microsystems, Inc. or the names of
Packit Service ed0f68
 * contributors may be used to endorse or promote products derived
Packit Service ed0f68
 * from this software without specific prior written permission.
Packit Service ed0f68
 * 
Packit Service ed0f68
 * This software is provided "AS IS," without a warranty of any kind.
Packit Service ed0f68
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
Packit Service ed0f68
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
Packit Service ed0f68
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
Packit Service ed0f68
 * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
Packit Service ed0f68
 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
Packit Service ed0f68
 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.  IN NO EVENT WILL
Packit Service ed0f68
 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
Packit Service ed0f68
 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
Packit Service ed0f68
 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
Packit Service ed0f68
 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
Packit Service ed0f68
 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Packit Service ed0f68
 */
Packit Service ed0f68
Packit Service ed0f68
#ifndef IPMI_USER_H
Packit Service ed0f68
#define IPMI_USER_H
Packit Service ed0f68
Packit Service ed0f68
#if HAVE_CONFIG_H
Packit Service ed0f68
# include <config.h>
Packit Service ed0f68
#endif
Packit Service ed0f68
#include <ipmitool/ipmi.h>
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_PASSWORD_DISABLE_USER  0x00
Packit Service ed0f68
#define IPMI_PASSWORD_ENABLE_USER   0x01
Packit Service ed0f68
#define IPMI_PASSWORD_SET_PASSWORD  0x02
Packit Service ed0f68
#define IPMI_PASSWORD_TEST_PASSWORD 0x03
Packit Service ed0f68
Packit Service ed0f68
#define IPMI_USER_ENABLE_UNSPECIFIED 0x00
Packit Service ed0f68
#define IPMI_USER_ENABLE_ENABLED 0x40
Packit Service ed0f68
#define IPMI_USER_ENABLE_DISABLED 0x80
Packit Service ed0f68
#define IPMI_USER_ENABLE_RESERVED 0xC0
Packit Service ed0f68
Packit Service ed0f68
/* (22.27) Get and (22.26) Set User Access */
Packit Service ed0f68
struct user_access_t {
Packit Service ed0f68
	uint8_t callin_callback;
Packit Service ed0f68
	uint8_t channel;
Packit Service ed0f68
	uint8_t enabled_user_ids;
Packit Service ed0f68
	uint8_t enable_status;
Packit Service ed0f68
	uint8_t fixed_user_ids;
Packit Service ed0f68
	uint8_t ipmi_messaging;
Packit Service ed0f68
	uint8_t link_auth;
Packit Service ed0f68
	uint8_t max_user_ids;
Packit Service ed0f68
	uint8_t privilege_limit;
Packit Service ed0f68
	uint8_t session_limit;
Packit Service ed0f68
	uint8_t user_id;
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
/* (22.29) Get User Name */
Packit Service ed0f68
struct user_name_t {
Packit Service ed0f68
	uint8_t user_id;
Packit Service ed0f68
	uint8_t user_name[17];
Packit Service ed0f68
};
Packit Service ed0f68
Packit Service ed0f68
int ipmi_user_main(struct ipmi_intf *, int, char **);
Packit Service ed0f68
int _ipmi_get_user_access(struct ipmi_intf *intf,
Packit Service ed0f68
		struct user_access_t *user_access_rsp);
Packit Service ed0f68
int _ipmi_get_user_name(struct ipmi_intf *intf, struct user_name_t *user_name);
Packit Service ed0f68
int _ipmi_set_user_access(struct ipmi_intf *intf,
Packit Service ed0f68
		struct user_access_t *user_access_req,
Packit Service ed0f68
		uint8_t change_priv_limit_only);
Packit Service ed0f68
int _ipmi_set_user_password(struct ipmi_intf *intf,
Packit Service ed0f68
		uint8_t user_id, uint8_t operation,
Packit Service ed0f68
		const char *password, uint8_t is_twenty_byte);
Packit Service ed0f68
Packit Service ed0f68
#endif /* IPMI_USER_H */