From a7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Jul 2014 18:04:32 +0200 Subject: Imported Upstream version 2.9.3 --- util/ipmilan2.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 util/ipmilan2.c (limited to 'util/ipmilan2.c') diff --git a/util/ipmilan2.c b/util/ipmilan2.c new file mode 100644 index 0000000..0ff2fac --- /dev/null +++ b/util/ipmilan2.c @@ -0,0 +1,68 @@ +/* + * ipmilan2.c + * + * Interface to call libintf_lanplus from ipmitool to do RMCP+ protocol. + * + * 01/09/07 Andy Cress - created + * 02/22/07 Andy Cress - initialize cipher_suite to 3 (was 0) + */ +#include +#include +#include +#include +#if defined(LINUX) || defined(BSD) +#include +#endif + +#undef HAVE_LANPLUS + +// #define DEBUG 1 +#ifndef HAVE_LANPLUS +/* No lanplus, so stub these functions returning errors. */ +#define uchar unsigned char +#define ushort unsigned short +#define LAN_ERR_INVPARAM -8 +#define LOG_WARN 4 +#define LOG_MSG_LENGTH 1024 /*usu. ipmicmd.h*/ +int verbose = 0; +char fdbglog = 0; +void set_loglevel(int level); +void lprintf(int level, const char * format, ...); + +int ipmi_open_lan2(char *node, char *user, char *pswd, int fdebugcmd) +{ if (fdebugcmd) verbose = 1; return(LAN_ERR_INVPARAM); } + +int ipmi_close_lan2(char *node) +{ return(LAN_ERR_INVPARAM); } + +int ipmi_cmdraw_lan2(char *node, uchar cmd, uchar netfn, uchar lun, + uchar sa, uchar bus, uchar *pdata, int sdata, + uchar *presp, int *sresp, uchar *pcc, char fdebugcmd) +{ return(LAN_ERR_INVPARAM); } + +int ipmi_cmd_lan2(char *node, ushort cmd, uchar *pdata, int sdata, + uchar *presp, int *sresp, uchar *pcc, char fdebugcmd) +{ return(LAN_ERR_INVPARAM); } + +int lan2_send_sol( uchar *payload, int len, void *rsp) +{ return(LAN_ERR_INVPARAM); } +int lan2_recv_sol( void *rsp ) +{ return(LAN_ERR_INVPARAM); } +int lan2_keepalive(int type, void *rsp) +{ return(LAN_ERR_INVPARAM); } +void lan2_recv_handler( void *rs ) +{ return; } +void lan2_set_sol_data(int insize, int outsize, int port, void *handler, + char esc_char) +{ return; } +int lan2_get_fd(void) { return(1); } +void lanplus_set_recvdelay( int delay ) { return; } +long lan2_get_latency( void ) { return(1); } +int lan2_send_break( void *rsp) { return(LAN_ERR_INVPARAM); } +int lan2_send_ctlaltdel( void *rsp) { return(LAN_ERR_INVPARAM); } + +#else /* else HAVE_LANPLUS is defined */ + +#endif + +/* end ipmilan2.c */ -- cgit v1.2.3