Logo Search packages:      
Sourcecode: fence-agents version File versions  Download package

Classes | Defines | Functions | Variables

ipmilan.c File Reference

#include "clusterautoconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <libintl.h>
#include <libgen.h>
#include "copyright.cf"
#include "expect.h"
Include dependency graph for ipmilan.c:

Go to the source code of this file.


struct  ipmi
struct  xml_parameter_s


#define dbg_printf(i, lvl, fmt, args...)
#define DEFAULT_METHOD   "onoff"
#define DEFAULT_TIMEOUT   20
#define ECIPHER   2048
#define ERR_OFF_FAIL   1
#define ERR_OK   0
#define ERR_ON_FAIL   1
#define ERR_STATUS_FAIL   1
#define ERR_STATUS_OFF   2
#define ERR_STATUS_ON   0
#define ESTATE   (8192*2)
#define IPMIID   "IPMI over LAN driver"
#define log(lvl, fmt, args...)   fprintf(stderr, fmt, ##args)
#define NOTIPMI   "Destroyed IPMI over LAN driver"
#define ST_CYCLE   4
#define ST_DIAG   5
#define ST_GENERIC_RESET   3
#define ST_POWEROFF   2
#define ST_POWERON   1
#define ST_STATUS   0
#define STATE_OFF   4096
#define STATE_ON   8192


static int build_cmd (char *command, size_t cmdlen, struct ipmi *ipmi, int op)
static int cleanup (char *line, size_t linelen)
static void fail_exit (const char *msg)
static int get_options_stdin (char *ip, size_t iplen, char *authtype, size_t atlen, char *passwd, size_t pwlen, char *pwd_script, size_t pwd_script_len, char *user, size_t userlen, char *op, size_t oplen, int *lanplus, int *verbose, int *timeout, int *power_wait, int *cipher, char *method, int methodlen, char *delay, size_t delaylen)
static int ipmi_cycle (struct ipmi *ipmi)
static void ipmi_destroy (struct ipmi *i)
static int ipmi_diag (struct ipmi *ipmi)
static int ipmi_expect (struct ipmi *ipmi, struct Etoken *toklist, int timeout)
static struct ipmiipmi_init (struct ipmi *i, char *host, char *authtype, char *user, char *password, int lanplus, int verbose, int timeout, int power_wait, int cipher)
static int ipmi_off (struct ipmi *ipmi)
static int ipmi_on (struct ipmi *ipmi)
static int ipmi_op (struct ipmi *ipmi, int op, struct Etoken *toklist)
static int ipmi_reap (struct ipmi *ipmi)
static int ipmi_spawn (struct ipmi *ipmi, const char *cmd)
static const char * ipmitool_path (void)
int main (int argc, char **argv)
static void print_xml_metadata (char *pname)
static char * str_prepare_for_sh (char *dest, char *source, int max_len)
static void usage_exit (char *pname)


const char * ipmitool_paths []
static struct Etoken power_cycle_complete []
static struct Etoken power_off_complete []
static struct Etoken power_on_complete []
static struct Etoken power_status []
struct xml_parameter_s xml_parameters []

Detailed Description

clumanager 1.2.x linux-cluster fence and/or GFS fence module for Intel/Bull/Dell Tiger4 machines via IPMI over lan. (Probably works with anything ipmitool can control, though.)

Note: REQUIRES ipmitool to operate. On certain machines, the hardware manufacturer provides this tool for you. Otherwise, check:


Definition in file ipmilan.c.

Generated by  Doxygen 1.6.0   Back to index