X hits on this document

PDF document

February 10, 2006 - page 213 / 238

895 views

0 shares

0 downloads

0 comments

213 / 238

Appendix J

#include

<sys/types.h>

#include

<sys/stat.h>

#include

<fcntl.h>

#include

<errno.h>

#include

<sys/select.h>

#include

<sys/ioctl.h>

#include

<linux/ipmi.h>

#include

<stdio.h>

Command Receiver Program

int

fd;

int

rv;

int

i;

_ struct ipmi cmdspec cmdspec;

unsigned char

_ _ _ data[IPMI MAX MSG LENGTH];

struct ipmi_addr

addr;

struct ipmi_recv

recv;

struct ipmi_req

req;

fd_set

rset;

int

count;

int

got_one;

fd = open("/dev/ipmi0", O_RDWR); if (fd == -1) {

f d = o p e n ( " / d e v / i p m i d e v / 0 " , O _ R D W R ) if (fd == -1) { ;

201

int main(int argc, char *argv) {

#define MY NETFN #define MY CMD _ _

0x32 0x01

Document info
Document views895
Page views895
Page last viewedSat Dec 10 19:10:03 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments