Data Link Provider Interface Library Functions dlpibind(3DLPI)
NAME
dlpibind - bind DLPI handle
SYNOPSIS
cc [ flag ... ] file ... -ldlpi [ library ... ]
#include
int dlpibind(dlpihandlet dh, uintt sap, uintt *boundsap);
DESCRIPTION
The dlpibind() function attempts to bind the DLPI handle dh
to the SAP sap. The handle must be in the DLUNBOUND DLPI
state and will transition to the DLIDLE DLPI state upon
success. Some DLPI MAC types can bind to a different SAP
than the SAP requested, in which case boundsap returns the
actual bound SAP. If boundsap is set to NUL, dlpibind()
fails if the bound SAP does not match the requested SAP. If
the caller does not care which SAP is chosen, DLPIANYSAP
can be specified for sap. This is primarily useful in con-
junction with dlpipromiscon() and DLPROMISCSAP to receive
traffic from all SAPs. If DLPIANYSAP is specified, any
transmitted messages must explicitly specify a SAP using
dlpisend(3DLPI).
Upon success, the caller can use dlpirecv(3DLPI) to receive
data matching the bound SAP that is sent to the DLPI link
associated with dh. In addition, the caller can use
dlpisend(3DLPI) to send data over the bound SAP address
associated with DLPI handle dh. The physical address of the
bound handle can be retrieved with dlpiinfo(3DLPI).
RETURN VALUES
Upon success, DLPISUCES is returned. If DLSYSER is
returned, errno contains the specific UNIX system error
value. Otherwise, a DLPI error value defined in
or an error value listed in the following section is
returned.
ERORS
DLPIEBADMSG Bad DLPI message
DLPIEINHANDLE Invalid DLPI handle
DLPIETIMEDOUT DLPI operation timed out
DLPIEUNAVAILSAP Unavailable DLPI SAP
SunOS 5.11 Last change: 22 Aug 2007 1
Data Link Provider Interface Library Functions dlpibind(3DLPI)
ATRIBUTES
See attributes(5) for description of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO
dlpiinfo(3DLPI), dlpirecv(3DLPI), dlpisend(3DLPI),
dlpiunbind(3DLPI), libdlpi(3LIB), attributes(5)
SunOS 5.11 Last change: 22 Aug 2007 2
|