]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/management/libibumad/man/umad_recv.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / management / libibumad / man / umad_recv.3
1 .\" -*- nroff -*-
2 .\"
3 .TH UMAD_RECV 3  "May 11, 2007" "OpenIB" "OpenIB Programmer\'s Manual"
4 .SH "NAME"
5 umad_recv \- receive umad
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/umad.h>
9 .sp
10 .BI "int umad_recv(int " "portid" ", void " "*umad" ", int " "*length" ", int " "timeout_ms");
11 .fi
12 .SH "DESCRIPTION"
13 .B umad_recv()
14 waits up to
15 .I timeout_ms\fR
16 milliseconds for a packet to be received from the port specified by
17 .I portid\fR.
18 The packet is copied to the
19 .I umad\fR
20 buffer if there is sufficient room and the received
21 .I length\fR is indicated.
22 If the buffer is not large enough, the size of the umad
23 buffer needed is returned in
24 .I length\fR.
25 A negative
26 .I timeout_ms\fR
27 makes the function block until a packet is received. A
28 .I timeout_ms\fR
29 parameter of zero indicates a non blocking read.
30 .SH "RETURN VALUE"
31 .B umad_recv()
32 returns non negative receiving agentid on success, and a negative value on error as follows:
33  -EINVAL      invalid port handle or agentid
34  -EIO         receive operation failed
35  -EWOULDBLOCK non blocking read can't be fulfilled
36 .SH "SEE ALSO"
37 .BR umad_poll (3)
38 .SH "AUTHOR"
39 .TP
40 Hal Rosenstock <halr@voltaire.com>