Document ioctls differently, like is done in other section four manpages.

This commit is contained in:
Ruslan Ermilov 2006-09-30 13:34:46 +00:00
parent a435c625d7
commit a4f3c15342

View File

@ -25,7 +25,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd April 20, 2006 .Dd September 30, 2006
.Dt IPMI 4 .Dt IPMI 4
.Os .Os
.Sh NAME .Sh NAME
@ -33,28 +33,6 @@
.Nd "OpenIPMI compatible IPMI interface driver" .Nd "OpenIPMI compatible IPMI interface driver"
.Sh SYNOPSIS .Sh SYNOPSIS
.Cd "device ipmi" .Cd "device ipmi"
.Pp
.In sys/ipmi.h
.Ft int
.Fn ioctl "int d" "IPMICTL_RECEIVE_MSG_TRUNC" "struct ipmi_recv *"
.Ft int
.Fn ioctl "int d" "IPMICTL_RECEIVE_MSG" "struct ipmi_recv *"
.Ft int
.Fn ioctl "int d" "IPMICTL_SEND_COMMAND" "struct ipmi_req *"
.Ft int
.Fn ioctl "int d" "IPMICTL_REGISTER_FOR_CMD" "struct ipmi_cmdspec *"
.Ft int
.Fn ioctl "int d" "IPMICTL_UNREGISTER_FOR_CMD" "struct ipmi_cmdspec *"
.Ft int
.Fn ioctl "int d" "IPMICTL_SET_GETS_EVENTS_CMD" "int *"
.Ft int
.Fn ioctl "int d" "IPMICTL_SET_MY_ADDRESS_CMD" "unsigned int *"
.Ft int
.Fn ioctl "int d" "IPMICTL_GET_MY_ADDRESS_CMD" "unsigned int *"
.Ft int
.Fn ioctl "int d" "IPMICTL_SET_MY_LUN_CMD" "unsigned int *"
.Ft int
.Fn ioctl "int d" "IPMICTL_GET_MY_LUN_CMD" "unsigned int *"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Tn IPMI .Tn IPMI
@ -73,28 +51,27 @@ The
driver in driver in
.Fx .Fx
is heavily adopted from the standard and is heavily adopted from the standard and
.Lx .Tn Linux
driver; however, not all features described in the driver; however, not all features described in the
standard are supported. standard are supported.
.Sh IOCTL .Sh IOCTLS
Sending and receiving messages through the Sending and receiving messages through the
.Nm .Nm
driver requires the use of IOCTLs. driver requires the use of
The IOCTLs are used due to the complexity of .Xr ioctl 2 .
The ioctls are used due to the complexity of
data sent to and from the device. data sent to and from the device.
Currently the following IOCTLs are defined: The
.Xr ioctl 2
command codes below are defined in
.In sys/ipmi.h .
The third argument to
.Xr ioctl 2
should be a pointer to the type indicated.
.Pp .Pp
.Dv IPMI_IOC_MAGIC Currently the following ioctls are supported:
The magic IOCTL value for this interface. .Bl -tag -width indent
.Pp .It Dv IPMICTL_RECEIVE_MSG Pq Vt "struct ipmi_recv"
.Dv IPMICTL_RECEIVE_MSG_TRUNC
Like
.Dv RECEIVE_MSG
but if the message can not fit into the buffer, it
will truncate the contents instead of leaving the data
in the buffer.
.Pp
.Dv IPMICTL_RECEIVE_MSG
Receive a message. Receive a message.
Possible error values: Possible error values:
.Bl -tag -width Er .Bl -tag -width Er
@ -106,8 +83,13 @@ An address supplied was invalid.
The address could not fit in the message buffer and The address could not fit in the message buffer and
will remain in the buffer. will remain in the buffer.
.El .El
.Pp .It Dv IPMICTL_RECEIVE_MSG_TRUNC Pq Vt "struct ipmi_recv"
.Dv IPMICTL_SEND_COMMAND Like
.Dv IPMICTL_RECEIVE_MSG
but if the message cannot fit into the buffer, it
will truncate the contents instead of leaving the data
in the buffer.
.It Dv IPMICTL_SEND_COMMAND Pq Vt "struct ipmi_req"
Send a message to the interface. Send a message to the interface.
Possible error values: Possible error values:
.Bl -tag -width Er .Bl -tag -width Er
@ -116,22 +98,18 @@ An address supplied was invalid
.It Bq Er ENOMEM .It Bq Er ENOMEM
Buffers could not be allowed for the command, out of memory. Buffers could not be allowed for the command, out of memory.
.El .El
.Pp .It Dv IPMICTL_SET_MY_ADDRESS_CMD Pq Vt "unsigned int"
.Dv IPMICTL_SET_MY_ADDRESS_CMD
Set the slave address for source messages. Set the slave address for source messages.
.Pp .It Dv IPMICTL_GET_MY_ADDRESS_CMD Pq Vt "unsigned int"
.Dv IPMICTL_GET_MY_ADDRESS_CMD
Get the slave address for source messages. Get the slave address for source messages.
.Pp .It Dv IPMICTL_SET_MY_LUN_CMD Pq Vt "unsigned int"
.Dv IPMICTL_SET_MY_LUN_CMD
Set the slave LUN for source messages. Set the slave LUN for source messages.
.Pp .It Dv IPMICTL_GET_MY_LUN_CMD Pq Vt "unsigned int"
.Dv IPMICTL_GET_MY_LUN_CMD
Get the slave LUN for source messages. Get the slave LUN for source messages.
.Pp .El
.Ss Unimplemented IOCTLS: .Ss Unimplemented Ioctls
.Pp .Bl -tag -width indent
.Dv IPMICTL_REGISTER_FOR_CMD .It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
Register to receive a specfic command Register to receive a specfic command
Possible error values: Possible error values:
.Bl -tag -width Er .Bl -tag -width Er
@ -142,8 +120,7 @@ The network function/command is already in use.
.It Bq Er ENOMEM .It Bq Er ENOMEM
Could not allocate memory. Could not allocate memory.
.El .El
.Pp .It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
.Dv IPMICTL_UNREGISTER_FOR_CMD
Unregister to receive a specific command Unregister to receive a specific command
Possible error values: Possible error values:
.Bl -tag -width Er .Bl -tag -width Er
@ -152,16 +129,17 @@ An address supplied was invalid.
.It Bq Er ENOENT .It Bq Er ENOENT
The network function/command was not found. The network function/command was not found.
.El .El
.Pp .El
.Ss Stub only IOCTL: .Ss Stub Only Ioctl
.Pp .Bl -tag -width indent
.Dv IPMICTL_SET_GETS_EVENTS_CMD .It Dv IPMICTL_SET_GETS_EVENTS_CMD Pq Vt int
Set whether this interface receives events. Set whether this interface receives events.
Possible error values: Possible error values:
.Bl -tag -width Er .Bl -tag -width Er
.It Bq Er EFAULT .It Bq Er EFAULT
An address supplied was invalid. An address supplied was invalid.
.El .El
.El
.Sh SEE ALSO .Sh SEE ALSO
.Xr ioctl 2 , .Xr ioctl 2 ,
.Xr watchdog 4 , .Xr watchdog 4 ,