| Current File : //usr/share/man/man3dlpi/dlpi_walk.3dlpi |
'\" te
.\" Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
.TH dlpi_walk 3DLPI "7 Apr 2011" "SunOS 5.11" "Data Link Provider Interface Library Functions"
.SH NAME
dlpi_walk \- traverse DLPI links
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... -\fBldlpi\fR [ \fIlibrary\fR... ]
#include <libdlpi.h>
\fBvoid\fR \fBdlpi_walk\fR(\fBdlpi_walkfunc_t *\fR\fIfn\fR, \fBvoid *\fR\fIarg\fR, \fBuint_t\fR \fIflags\fR);
.fi
.LP
.nf
\fBtypedef boolean_t\fR \fBdlpi_walkfunc_t\fR(\fBconst char *\fR\fIname\fR, \fBvoid *\fR\fIarg\fR);
.fi
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIfn\fR\fR
.ad
.RS 13n
.rt
Function to invoke for each link. Arguments are:
.sp
.ne 2
.mk
.na
\fB\fIname\fR\fR
.ad
.RS 8n
.rt
The name of the DLPI interface.
.RE
.sp
.ne 2
.mk
.na
\fB\fIarg\fR\fR
.ad
.RS 8n
.rt
The \fIarg\fR parameter passed in to \fBdlpi_walk()\fR.
.RE
.RE
.sp
.ne 2
.mk
.na
\fB\fIarg\fR\fR
.ad
.RS 13n
.rt
An opaque argument that is passed transparently to the user-supplied \fIfn\fR() function.
.RE
.sp
.ne 2
.mk
.na
\fB\fIflags\fR\fR
.ad
.RS 13n
.rt
This parameter is reserved for future use. The caller should pass in 0.
.RE
.SH DESCRIPTION
.sp
.LP
The \fBdlpi_walk()\fR function visits all DLPI links in the current zone. The walk does not visit DLPI links in the non-global zones when called from the global zone. For each link visited, the user-supplied \fIfn\fR() function is invoked. The walk terminates either when all links have been visited or when \fIfn\fR() returns \fBB_TRUE\fR.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
MT-LevelSafe
.TE
.SH SEE ALSO
.sp
.LP
\fBlibdlpi\fR(3LIB), \fBattributes\fR(5)