diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 09617c8fe530d2ed743373b22de73da412aac2ab..b39b97cc91ff421b8f3b7dfa9db2f59ade31d4c4 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -63,6 +63,54 @@ VIR_LOG_INIT("phyp.phyp_driver"); +#define LPAR_EXEC_ERR (-1) +#define SSH_CONN_ERR (-2) /* error while trying to connect to remote host */ +#define SSH_CMD_ERR (-3) /* error while trying to execute the remote cmd */ + +typedef struct _ConnectionData ConnectionData; +typedef ConnectionData *ConnectionDataPtr; +struct _ConnectionData { + LIBSSH2_SESSION *session; + int sock; +}; + +/* This is the lpar (domain) struct that relates + * the ID with UUID generated by the API + * */ +typedef struct _lpar lpar_t; +typedef lpar_t *lparPtr; +struct _lpar { + unsigned char uuid[VIR_UUID_BUFLEN]; + int id; +}; + +/* Struct that holds how many lpars (domains) we're + * handling and a pointer to an array of lpar structs + * */ +typedef struct _uuid_table uuid_table_t; +typedef uuid_table_t *uuid_tablePtr; +struct _uuid_table { + size_t nlpars; + lparPtr *lpars; +}; + +/* This is the main structure of the driver + * */ +typedef struct _phyp_driver phyp_driver_t; +typedef phyp_driver_t *phyp_driverPtr; +struct _phyp_driver { + uuid_tablePtr uuid_table; + virCapsPtr caps; + virDomainXMLOptionPtr xmlopt; + int vios_id; + + /* system_type: + * 0 = hmc + * 127 = ivm + * */ + int system_type; + char *managed_system; +}; /* * URI: phyp://user@[hmc|ivm]/managed_system diff --git a/src/phyp/phyp_driver.h b/src/phyp/phyp_driver.h index a5e736936930e05467682944353241b61e1b0a92..a82aafd64932d3765cafe8016efffd4d485394fc 100644 --- a/src/phyp/phyp_driver.h +++ b/src/phyp/phyp_driver.h @@ -25,59 +25,6 @@ #ifndef PHYP_DRIVER_H # define PHYP_DRIVER_H -# include "conf/capabilities.h" -# include "conf/domain_conf.h" -# include - -# define LPAR_EXEC_ERR -1 -# define SSH_CONN_ERR -2 /* error while trying to connect to remote host */ -# define SSH_CMD_ERR -3 /* error while trying to execute the remote cmd */ - -typedef struct _ConnectionData ConnectionData; -typedef ConnectionData *ConnectionDataPtr; -struct _ConnectionData { - LIBSSH2_SESSION *session; - int sock; -}; - -/* This is the lpar (domain) struct that relates - * the ID with UUID generated by the API - * */ -typedef struct _lpar lpar_t; -typedef lpar_t *lparPtr; -struct _lpar { - unsigned char uuid[VIR_UUID_BUFLEN]; - int id; -}; - -/* Struct that holds how many lpars (domains) we're - * handling and a pointer to an array of lpar structs - * */ -typedef struct _uuid_table uuid_table_t; -typedef uuid_table_t *uuid_tablePtr; -struct _uuid_table { - size_t nlpars; - lparPtr *lpars; -}; - -/* This is the main structure of the driver - * */ -typedef struct _phyp_driver phyp_driver_t; -typedef phyp_driver_t *phyp_driverPtr; -struct _phyp_driver { - uuid_tablePtr uuid_table; - virCapsPtr caps; - virDomainXMLOptionPtr xmlopt; - int vios_id; - - /* system_type: - * 0 = hmc - * 127 = ivm - * */ - int system_type; - char *managed_system; -}; - int phypRegister(void); #endif /* PHYP_DRIVER_H */