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