/**
 * @file   libipmi_struct.h
 * @author Rajasekhar (rajasekharj@amiindia.co.in)
 * @date   02-Sep-2004
 *
 * @brief  Contains data structures	required for establishing a session
 *
 */

#ifndef __LIBIPMI_STRUCT_H__
#define __LIBIPMI_STRUCT_H__
#include <stdint.h>
#include "com_IPMIDefs.h"
#include "com_IPMI_SDRRecord.h"
#define PACK __attribute__ ((packed))

/**
 @def UDS_CHANNEL_T
 @brief holds data required for network medium
*/
typedef struct UDS_CHANNEL_T_tag {
	uint16_t			hSocketPath;
	int			hSocket;
	uint8_t			byIsConnected;
} PACK UDS_CHANNEL_T;

/**
 @def IPMI20_UDS_SESSION_T
 @brief holds data required for maintaining session with unix domain socket medium
*/
typedef struct IPMI20_UDS_SESSION_T_tag {
  UDS_CHANNEL_T hUDSInfo;
//  char szUserName[MAX_USERNAME_LEN];
//  char szPwd[MAX_PASSWORD_LEN];
//  char szUName[MAX_USERNAME_LEN];
//  char abyIPAddr[IP6_ADDR_LEN];
  uint32_t dwSessionID;
//  uint8_t byPreSession;
//  uint8_t byAuthType;
//  uint8_t byRole;
  uint8_t byChannelNum;
  uint8_t byDefTimeout;
//  uint8_t byMaxRetries;
}PACK IPMI20_UDS_SESSION_T;


// /**
//  @def IPMI20_SESSION_T
//  @brief holds info for maintaining a session
// */
// typedef struct IPMI20_SESSION_T_tag {
// /* Medium type (Network, Serial, KCS, IPMB, USB) */
// 	uint8_t	byMediumType;
// #define	UDS_MEDIUM	          0x07

// /* tells whether session has started or not. */
// 	uint8_t	bySessionStarted;
// #define SESSION_NOT_STARTED 0x00
// #define SESSION_STARTED	0x01

// /* if this value is > 0, session reestablishment will be tried for byMaxRetries times. */
// 	uint8_t	byMaxRetries;
// /* LAN Eth Index for hold Eth number if multi NIc supported */
// 	uint8_t         EthIndex;
// 	IPMI20_UDS_SESSION_T		*hUDSSession;

// } PACK IPMI20_SESSION_T;

typedef enum
{
    AUTH_FLAG = 1,
    AUTH_BYPASS_FLAG,
}USER_Auth;





/* Undefine PACK so that it can be redefined in other header files */
#if defined (PACK)
#undef PACK
#endif

#endif /* __LIBIPMI_STRUCT_H__ */
