1dlpi_send(3DLPI)Data Link Provider Interface Library Functionsdlpi_send(3DLPI)
2
3
4
6 dlpi_send - send a data message using DLPI
7
9 cc [ flag... ] file... -ldlpi [ library... ]
10 #include <libdlpi.h>
11
12 int dlpi_send(dlpi_handle_t dh, const void *daddrp,
13 size_t daddrlen, const void *msgbuf, size_t msglen,
14 const dlpi_sendinfo_t *sendp);
15
16
18 The dlpi_send() function attempts to send the contents of msgbuf over
19 the DLPI link instance associated with the DLPI handle dh to the desti‐
20 nation address specified by daddrp. The size of msgbuf and daddrp are
21 provided by the msglen and daddrlen arguments, respectively. The
22 attempt will fail if dh is not in the DL_IDLE DLPI state, the address
23 named by daddrp is invalid, daddrlen is larger than DLPI_PHYSADDR_MAX,
24 or msglen is outside the range reported by dlpi_info(3DLPI).
25
26
27 If the sendp argument is NULL, data is sent using the bound SAP associ‐
28 ated with dh (see dlpi_bind(3DLPI)) and with default priority. Other‐
29 wise, sendp must point to a dlpi_sendinfo_t structure defined in <lib‐
30 dlpi.h> as follows:
31
32 typedef struct {
33 uint_t dsi_sap;
34 dl_priority_t dsi_prio;
35 } dlpi_sendinfo_t;
36
37
38
39 The dsi_sap value indicates the SAP to use for the message and the
40 dsi_prio argument indicates the priority. The priority range spans
41 from 0 to 100, with 0 being the highest priority. If one wishes to
42 only alter the SAP or priority (but not both), the current SAP can be
43 retrieved using dlpi_info(3DLPI), and the default priority can be spec‐
44 ified by using the DL_QOS_DONT_CARE constant.
45
46
47 If the handle is in raw mode (see DLPI_RAW in dlpi_open(3DLPI)), msgbuf
48 must start with the link-layer header (see dlpi(7P)). In raw mode, the
49 contents of daddrp and sendp are ignored, as they are already specified
50 by the link-layer header in msgbuf.
51
52
53 If msgbuf is accepted for delivery, no error is returned. However,
54 because only unacknowledged connectionless service (DL_CLDLS) is cur‐
55 rently supported, a successful return does not guarantee that the data
56 will be successfully delivered to daddrp.
57
59 Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno
60 contains the specific UNIX system error value. Otherwise, a DLPI error
61 value defined in <sys/dlpi.h> or an error value listed in the following
62 section is returned.
63
65 DLPI_EINHANDLE Invalid DLPI handle
66
67
68 DLPI_EINVAL Invalid argument
69
70
72 See attributes(5) for description of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Interface Stability │Committed │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │MT-Level │Safe │
83 └─────────────────────────────┴─────────────────────────────┘
84
86 dlpi_bind(3DLPI), dlpi_info(3DLPI), dlpi_open(3DLPI), libdlpi(3LIB),
87 attributes(5), dlpi(7P)
88
89
90
91SunOS 5.11 15 Jul 2008 dlpi_send(3DLPI)