blob: 8bdfed91a51a26a50773d49326976c57bbdde5d3 [file]
.\" -*- nroff -*-
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
.\"
.TH UMAD_GET_CA 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual"
.SH "NAME"
umad_get_ca, umad_release_ca \- get and release InfiniBand device port attributes
.SH "SYNOPSIS"
.nf
.B #include <infiniband/umad.h>
.sp
.BI "int umad_get_ca(char " "*ca_name" ", umad_ca_t " "*ca" );
.sp
.BI "int umad_release_ca(umad_ca_t " "*ca" );
.fi
.SH "DESCRIPTION"
.B umad_get_ca()
gets the attributes of the InfiniBand device
.I ca_name\fR.
It fills
the
.I ca
structure with the device attributes specified by
the
.I ca_name
or with the default device attributes if
.I ca_name
is NULL.
.B umad_release_ca()
should be called before the
.I ca
structure is deallocated.
The argument
.I ca
is an
.I umad_ca_t
struct, as specified in <infiniband/umad.h>.
.PP
.nf
typedef struct umad_ca {
.in +8
char ca_name[UMAD_CA_NAME_LEN]; /* Name of the device */
uint node_type; /* Type of the device */
int numports; /* Number of physical ports */
char fw_ver[20]; /* FW version */
char ca_type[40]; /* CA type (e.g. MT23108, etc.) */
char hw_ver[20]; /* Hardware version */
uint64_t node_guid; /* Node GUID */
uint64_t system_guid; /* System image GUID */
umad_port_t *ports[UMAD_CA_MAX_PORTS]; /* Array of device port properties */
.in -8
} umad_ca_t;
.fi
.PP
.B umad_release_ca()
releases the resources that were allocated in the function
.B umad_get_ca()\fR.
.SH "RETURN VALUE"
.B umad_get_ca()
and
.B umad_release_ca()
return 0 on success, and a negative value on error.
.SH "AUTHORS"
.TP
Hal Rosenstock <halr@voltaire.com>
.TP
Dotan Barak <dotanb@mellanox.co.il>