Current File : //usr/share/man/man9f/net_protocol_walk.9f
'\" te
.\" Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
.TH net_protocol_walk 9F "3 Dec 2010" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
net_protocol_walk \- step through the list of registered network protocols
.SH SYNOPSIS
.LP
.nf
#include <sys/neti.h>

net_handle_t net_protocol_walk(netid_t \fIstack_id\fR, net_handle_t \fInet\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI).
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fIstack_id\fR\fR
.ad
.RS 12n
.rt  
the IP stack instance ID obtained by a calling \fBgetzoneid\fR(3C)  and typecasting its return value to \fBnetid_t\fR
.RE

.sp
.ne 2
.mk
.na
\fB\fInet\fR\fR
.ad
.RS 12n
.rt  
value returned from a successful call to \fBnet_protocol_lookup\fR(9F).
.RE

.SH DESCRIPTION
.sp
.LP
The \fBnet_protocol_walk()\fR function walks through all of the network protocols that have been registered with this interface. The initial call to \fBnet_protocol_walk()\fR should be made by passing in \fBNULL\fR as the value for \fInet\fR. When this function returns \fBNULL\fR, the end of the list has been reached.
.sp
.LP
A caller of \fBnet_protocol_walk()\fR is required to walk through the entire list of network protocols, until \fBNULL\fR is returned or, when finished with using the value returned, pass it into a call to \fBnet_protocol_release\fR(9F).
.SH RETURN VALUES
.sp
.LP
The \fBnet_protocol_walk()\fR function returns \fBNULL\fR when the end of the list is returned. Otherwise, it returns a non-\fBNULL\fR value as a token for being passed into other function calls within this interface.
.SH CONTEXT
.sp
.LP
The \fBnet_protocol_walk()\fR function may be called from user,  kernel, or interrupt context.
.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
_
Availabilitysystem/core-os
_
Interface StabilityCommitted
.TE

.SH SEE ALSO
.sp
.LP
\fBnet_protocol_lookup\fR(9F), \fBnet_protocol_release\fR(9F), \fBattributes\fR(5)