1dlpi_bind(3DLPI)Data Link Provider Interface Library Functionsdlpi_bind(3DLPI)
2
3
4

NAME

6       dlpi_bind - bind DLPI handle
7

SYNOPSIS

9       cc [ flag ... ] file ... -ldlpi [ library ... ]
10       #include <libdlpi.h>
11
12       int dlpi_bind(dlpi_handle_t dh, uint_t sap, uint_t *boundsap);
13
14

DESCRIPTION

16       The dlpi_bind() function attempts to bind the DLPI handle dh to the SAP
17       sap. The handle must be in the DL_UNBOUND DLPI state and  will  transi‐
18       tion  to  the  DL_IDLE DLPI state upon success. Some DLPI MAC types can
19       bind to a different SAP than the SAP requested, in which case  boundsap
20       returns  the  actual bound SAP. If boundsap is set to NULL, dlpi_bind()
21       fails if the bound SAP does not match the requested SAP. If the  caller
22       does  not  care  which SAP is chosen, DLPI_ANY_SAP can be specified for
23       sap. This is primarily useful in conjunction with dlpi_promiscon()  and
24       DL_PROMISC_SAP  to  receive  traffic  from all SAPs. If DLPI_ANY_SAP is
25       specified, any transmitted messages must explicitly specify a SAP using
26       dlpi_send(3DLPI).
27
28
29       Upon  success,  the  caller  can  use  dlpi_recv(3DLPI) to receive data
30       matching the bound SAP that is sent to the DLPI  link  associated  with
31       dh.  In addition, the caller can use dlpi_send(3DLPI) to send data over
32       the bound SAP address associated with  DLPI  handle  dh.  The  physical
33       address of the bound handle can be retrieved with dlpi_info(3DLPI).
34

RETURN VALUES

36       Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno
37       contains the specific UNIX system error value. Otherwise, a DLPI  error
38       value defined in <sys/dlpi.h> or an error value listed in the following
39       section is returned.
40

ERRORS

42       DLPI_EBADMSG        Bad DLPI message
43
44
45       DLPI_EINHANDLE      Invalid DLPI handle
46
47
48       DLPI_ETIMEDOUT      DLPI operation timed out
49
50
51       DLPI_EUNAVAILSAP    Unavailable DLPI SAP
52
53

ATTRIBUTES

55       See attributes(5) for description of the following attributes:
56
57
58
59
60       ┌─────────────────────────────┬─────────────────────────────┐
61       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
62       ├─────────────────────────────┼─────────────────────────────┤
63       │Interface Stability          │Committed                    │
64       ├─────────────────────────────┼─────────────────────────────┤
65       │MT-Level                     │Safe                         │
66       └─────────────────────────────┴─────────────────────────────┘
67

SEE ALSO

69       dlpi_info(3DLPI),          dlpi_recv(3DLPI),          dlpi_send(3DLPI),
70       dlpi_unbind(3DLPI), libdlpi(3LIB), attributes(5)
71
72
73
74SunOS 5.11                        22 Aug 2007                 dlpi_bind(3DLPI)
Impressum