DLPI Library Functions dlpi_open(3DLPI) NAME dlpi_open - open DLPI link SYNOPSIS #include int dlpi_open(const char *linkname, dlpi_handle_t *dhp, uint_t flags); DESCRIPTION The dlpi_open() function creates an open instance of the DLPI Version 2 link named by "linkname" and associates it with a dynamically-allocated dlpi_handle_t, which is returned to the caller in "dhp" upon success. The DLPI handle is left in the DL_UNBOUND DLPI state after a successful open of the DLPI link. This function can open both DL_STYLE1 and DL_STYLE2 DLPI links. Currently, dlpi_open() scans the /dev directory for links, though other directories may be searched in the future. Within each scanned directory, dlpi_open() first looks for a matching DL_STYLE1 link, and then for a matching DL_STYLE2 link. If we consider "provider" to be "linkname" with its trailing digits removed, then a matching DL_STYLE1 link has a filename of "linkname", and a matching DL_STYLE2 link has a filename of "provider". If a DL_STYLE2 like is opened, dlpi_open() will automatically perform the necessary DLPI operations to place the DLPI link instance (and therefore the DLPI handle) in the DL_UNBOUND state. For the definition of "linkname", see dlpi(7P). The value of "flags" is constructed by a bitwise-inclusive-OR of the flags listed below, defined in . DLPI_PASSIVE Enable DLPI passive mode (see dlpi(7P)) on a DLPI link instance. Passive mode will persist until the DLPI handle is closed by dlpi_close(3DLPI). DLPI_RAW Enable DLPI raw mode (see dlpi(7P)) on a DLPI link instance. Raw mode will persist until the DLPI handle is closed by dlpi_close(3DLPI). DLPI_NATIVE Enable DLPI native mode (see dlpi(7P)) on a DLPI link instance. Native mode will persist until the DLPI handle is closed by dlpi_close(3DLPI). Each DLPI handle has an associated timeout value that is used as a timeout interval for certain libdlpi operations. The default timeout value is intended to ensure that DLPI_ETIMEDOUT will only be returned from a libdlpi operation if the DLPI link has truly become unresponsive. The timeout value can be changed via dlpi_set_timeout(3DLPI), though this should seldom be necessary. RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADLINK bad DLPI link DLPI_ELINKNAMEINVAL invalid DLPI linkname DLPI_ENOLINK DLPI link does not exist DLPI_ETIMEDOUT DLPI operation timed out DLPI_ERAWNOTSUP DLPI raw mode not supported DLPI_FAILURE DLPI operation failed SEE ALSO dlpi_close(3DLPI), dlpi_set_timeout(3DLPI), dlpi(7P) DLPI Library Functions dlpi_close(3DLPI) NAME dlpi_close - close DLPI link SYNOPSIS #include void dlpi_close(dlpi_handle_t dh); DESCRIPTION The dlpi_close() function closes the open DLPI link instance associated with "dh" and destroys "dh" after closing the DLPI link instance. SEE ALSO dlpi_open(3DLPI) DLPI Library Functions dlpi_info(3DLPI) NAME dlpi_info - get DLPI information SYNOPSIS #include int dlpi_info(dlpi_handle_t dh, dlpi_info_t *infop, uint_t opt); DESCRIPTION The dlpi_info() function provides DLPI information about the open DLPI link instance associated with DLPI handle "dh". DLPI information can be retrieved in any state of "dh" but some of the information may not be available if "dh" is in the DL_UNBOUND DLPI state. The DLPI information received will be copied into "infop", which must point to a dlpi_info_t allocated by the caller. The "opt" argument is reserved for future use and must be set to zero. The dlpi_info_t is a structure defined in as follows: typedef struct { uint_t di_opts; uint_t di_max_sdu; uint_t di_min_sdu; uint_t di_state; uchar_t di_mactype; char di_linkname[DLPI_LINKNAME_MAX]; uchar_t di_physaddr[DLPI_PHYSADDR_MAX]; uchar_t di_physaddrlen; uchar_t di_bcastaddr[DLPI_PHYSADDR_MAX]; uchar_t di_bcastaddrlen; uint_t di_sap; int di_timeout; dl_qos_cl_sel1_t di_qos_sel; dl_qos_cl_range1_t di_qos_range; } dlpi_info_t; di_opts Reserved for future dlpi_info_t expansion. di_max_sdu Maximum message size, in bytes, that the DLPI link is able to accept for transmission. Value is guaranteed to be greater than or equal to di_min_sdu. di_min_sdu Minimum message size, in bytes, that the DLPI link is able to accept for transmission. Value is guaranteed to be greater than or equal to one. di_state Current DLPI state of "dh"; either DL_UNBOUND or DL_IDLE. di_mactype MAC type supported by the DLPI link associated with "dh". See for the possible list of MAC types. di_linkname Link name associated with DLPI handle "dh". di_physaddr Link-layer physical address of bound "dh". If "dh" is in the DL_UNBOUND DLPI state, the contents of di_physaddr are unspecified. di_physaddrlen Physical address length, in bytes. If "dh" is in the DL_UNBOUND DLPI state, di_physaddrlen is set to zero. di_bcastaddr Link-layer broadcast address. If the di_mactype of the DLPI link does not support broadcast, the contents of di_bcastaddr are unspecified. di_bcastaddrlen Link-layer broadcast address length, in bytes. If the di_mactype of the DLPI link does not support broadcast, di_bcastaddrlen is set to zero. di_sap SAP currently bound to handle. If "dh" is in the DL_UNBOUND DLPI state, di_sap is set to zero. di_timeout Current timeout value, in seconds, set on the dlpi handle. di_qos_sel Current QOS parameters supported by the DLPI link instance associated with "dh". Unsupported QOS parameters are set to DL_UNKNOWN. di_qos_range Available range of QOS parameters supported by a DLPI link instance associated with DLPI handle "dh". Unsupported QOS range values are set to DL_UNKNOWN. RETURN VALUES Upon success DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_EINVAL invalid argument DLPI_ETIMEDOUT DLPI operation timed out DLPI_EVERNOTSUP unsupported DLPI Version DLPI_EMODENOTSUP unsupported DLPI connection mode DLPI_FAILURE DLPI operation failed EXAMPLE Example 1: Get link-layer broadcast address. The following example shows how dlpi_info() can be used. #include uchar_t * get_bcastaddr(const char *linkname, uchar_t *baddrlenp) { dlpi_handle_t dh; dlpi_info_t dlinfo; uchar_t *baddr; if (dlpi_open(linkname, &dh, 0) != DLPI_SUCCESS) return (NULL); if (dlpi_info(dh, &dlinfo, 0) != DLPI_SUCCESS) { dlpi_close(dh); return (NULL); } dlpi_close(dh); *baddrlenp = dlinfo.di_bcastaddrlen; if ((baddr = malloc(*baddrlenp)) == NULL) return (NULL); return (memcpy(baddr, dlinfo.di_bcastaddr, *baddrlenp)); } SEE ALSO dlpi_bind(3DLPI) DLPI Library Functions dlpi_bind(3DLPI) NAME dlpi_bind - bind DLPI handle SYNOPSIS #include int dlpi_bind(dlpi_handle_t dh, uint_t sap, uint_t *boundsap); DESCRIPTION The dlpi_bind() function attempts to bind the DLPI handle "dh" to the SAP "sap". The handle must be in the DL_UNBOUND DLPI state and will transition to the DL_IDLE DLPI state upon success. Note that some DLPI MAC type may bind to a different SAP than requested, in which case "boundsap" will return the actual bound SAP. However, if "boundsap" is set to NULL, then dlpi_bind() will fail if the bound SAP does not match the requested SAP. If the caller does not care which SAP is chosen, DLPI_ANY_SAP may be specified for "sap". This is primarily useful in conjunction with dlpi_promiscon() and DL_PROMISC_SAP to receive traffic from all SAPs. If DLPI_ANY_SAP is specified, then any transmitted messages must explicitly specify a SAP using dlpi_send(). Upon success, the caller can use dlpi_recv(3DLPI) to receive data matching the bound SAP that is sent to the DLPI link associated with "dh". In addition, the caller can use dlpi_send(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 dlpi_info(3DLPI). RETURN VALUES Upon success DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_ETIMEDOUT DLPI operation timed out DLPI_EUNAVAILSAP unavailable DLPI SAP SEE ALSO dlpi_info(3DLPI), dlpi_recv(3DLPI), dlpi_send(3DLPI), dlpi_unbind(3DLPI) DLPI Library Functions dlpi_unbind(3DLPI) NAME dlpi_unbind - unbind DLPI handle SYNOPSIS #include int dlpi_unbind(dlpi_handle_t dh); DESCRIPTION The dlpi_unbind() function unbinds the DLPI handle "dh" from the bound SAP. The handle must be in the DL_IDLE DLPI state and upon success, will transition to the DL_UNBOUND DLPI state. Upon success, the caller will no longer be able to send or receive data using the DLPI link associated with "dh". RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_ETIMEDOUT DLPI operation timed out SEE ALSO dlpi_bind(3DLPI) DLPI Library Functions dlpi_enabmulti(3DLPI) dlpi_disabmulti(3DLPI) NAME dlpi_enabmulti - enable DLPI multicast messages for an address dlpi_disabmulti - disable DLPI multicast messages for an address SYNOPSIS #include int dlpi_enabmulti(dlpi_handle_t dh, const void *addrp, size_t addrlen); int dlpi_disabmulti(dlpi_handle_t dh, const void *addrp, size_t addrlen); DESCRIPTION The dlpi_enabmulti() function enables reception of messages destined to the multicast address pointed to by "addrp" on the DLPI link instance associated with DLPI handle "dh". The DLPI link instance will only pass up messages destined for enabled multicast addresses. This operation can be performed in any DLPI state of a handle. The dlpi_disabmulti() function disables a specified multicast address pointed to by "addrp" on the DLPI link instance associated with DLPI handle "dh". This operation can be performed in any DLPI state of a handle. RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_ETIMEDOUT DLPI operation timed out DLPI_EINVAL invalid argument DLPI Library Functions dlpi_promiscon(3DLPI) dlpi_promiscoff(3DLPI) NAME dlpi_promiscon - enable DLPI promiscuous mode dlpi_promiscoff - disable DLPI promiscuous mode SYNOPSIS #include int dlpi_promiscon(dlpi_handle_t dh, uint_t level); int dlpi_promiscoff(dlpi_handle_t dh, uint_t level); DESCRIPTION The dlpi_promiscon() function enables promiscuous mode on a DLPI link instance associated with DLPI handle "dh", at the specified "level". After enabling promiscuous mode, the caller will be able to receive all messages destined for the DLPI link instance at the specified "level". This operation can be performed in any DLPI state of a handle. The dlpi_promiscoff() function disables promiscuous mode on a DLPI link instance associated with DLPI handle "dh", at the specified level. This operation can be performed in any DLPI state of a handle in which promiscuous mode is enabled at the specified "level". The "level" modes are: DL_PROMISC_PHYS - indicates promiscuous mode at the physical level DL_PROMISC_SAP - indicates promiscuous mode at the SAP level DL_PROMISC_MULTI - indicates promiscuous mode for all multicast addresses RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_ETIMEDOUT DLPI operation timed out DLPI_EINVAL invalid argument DLPI Library Functions dlpi_get_physaddr(3DLPI) NAME dlpi_get_physaddr - get physical address using DLPI SYNOPSIS #include int dlpi_get_physaddr(dlpi_handle_t dh, uint_t type, void *addrp, size_t *addrlenp); DESCRIPTION The dlpi_get_physaddr() function gets a physical address from the DLPI link instance associated with DLPI handle "dh". The retrieved address depends upon "type", which can be: DL_FACT_PHYS_ADDR - factory physical address DL_CURR_PHYS_ADDR - current physical address The operation can be performed in any DLPI state of "dh". The caller must ensure that "addrp" is at least DLPI_PHYSADDR_MAX bytes in size and "addrlenp" must contain the length of "addrp". Upon success, "addrp" will contain the specified physical address, and "addrlenp" will contain the physical address length. If a physical address is not available, "addrp" will be not be filled in and "addrlenp" will be set to zero. RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_EINVAL invalid argument DLPI_ETIMEDOUT DLPI operation timed out SEE ALSO dlpi_set_physaddr(3DLPI) DLPI Library Functions dlpi_set_physaddr(3DLPI) NAME dlpi_set_physaddr - set physical address using DLPI SYNOPSIS #include int dlpi_set_physaddr(dlpi_handle_t dh, uint_t type, const void *addrp, size_t addrlen); DESCRIPTION The dlpi_set_physaddr() function sets the physical address via DLPI handle "dh" associated with the DLPI link instance. Upon success, the physical address will be set to "addrp" with a length of "addrlen" bytes. Currently, "type" must be set to DL_CURR_PHYS_ADDR, which sets the current physical address. RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_EINVAL invalid argument DLPI_ETIMEDOUT DLPI operation timed out SEE ALSO dlpi_get_physaddr(3DLPI) DLPI Library Functions dlpi_mactype(3DLPI) NAME dlpi_mactype - convert a DLPI MAC type to a string SYNOPSIS #include const char *dlpi_mactype(uint_t mactype); DESCRIPTION The dlpi_mactype() function returns a pointer to a string describing the specified "mactype". Possible MAC types are defined in . Note that the string is not dynamically allocated and must not be freed by the caller. RETURN VALUES Upon success the function returns a pointer string describing the MAC type. If "mactype" is unknown, the string "Unknown MAC Type" is returned. DLPI Library Functions dlpi_send(3DLPI) NAME dlpi_send - send a data message using DLPI SYNOPSIS #include int dlpi_send(dlpi_handle_t dh, const void *daddrp, size_t daddrlen, const void *msgbuf, size_t msglen, const dlpi_sendinfo_t *sendp); DESCRIPTION The dlpi_send() function attempts to send "msglen" bytes from "msgbuf" over the DLPI link instance associated with DLPI handle "dh". If "dh" is not in the DL_IDLE DLPI state, the address named by "daddrp" is invalid, or "msglen" is outside the valid range (see dlpi_info(3DLPI)), the attempt will fail. The dlpi_sendinfo_t is a structure defined in as follows: typedef struct { uint_t dsi_sap; dl_priority_t dsi_prio; } dlpi_sendinfo_t; If "sendp" is set to NULL, data is sent over the bound SAP address associated with "dh" and the default priority range is used. Otherwise, data is sent using "dsi_sap" value and priority range is used as described below. SAP value that "dh" is bound to can be retrieved using dlpi_info(3DLPI). If the "dsi_prio" fields are set to DL_QOS_DONT_CARE, the default priority range is used. Otherwise, the specified "dsi_prio" priority range is used, with a value of zero being the highest and 100 being the lowest priority. If the handle is in raw mode (see dlpi_open(3DLPI)), then "msgbuf" must start with the link-layer header; see dlpi(7P). Also, the contents of "daddrp" and "sendp" will be ignored, since they are already specified by the link-layer header in "msgbuf". If "msgbuf" is accepted for delivery, no error will be returned. However, as only DL_CLDLS (unacknowledged connectionless service) is currently supported, a successful return does not guarantee that the data will in fact be delivered to "daddrp". RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EINHANDLE invalid DLPI handle DLPI_EINVAL invalid argument SEE ALSO dlpi_open(3DLPI), dlpi_info(3DLPI), dlpi_bind(3DLPI), dlpi(7P) DLPI Library Functions dlpi_recv(3DLPI) NAME dlpi_recv - receive a data message using DLPI SYNOPSIS #include int dlpi_recv(dlpi_handle_t dh, void *saddrp, size_t *saddrlenp, void *msgbuf, size_t *msglenp, int msec, dlpi_recvinfo_t *recvp); DESCRIPTION The dlpi_recv() function attempts to receive data messages over the DLPI link instance associated with DLPI handle "dh". If "dh" is not in the DL_IDLE DLPI state, the attempt will fail. The caller must ensure that "msgbuf" is at least "msglenp" bytes in size. Upon success, "msgbuf" will contain the data message received, "msglenp" will contain the number of bytes placed in "msgbuf". The caller must ensure that "saddrp" is at least DLPI_PHYSADDR_MAX bytes in size and "saddrlenp" must contain the length of "saddrp". Upon success, "saddrp" will contain the address of the source sending the data message and "saddrlenp" will contain the source address length. If the caller is not interested in the source address, both "saddrp" and "saddrlenp" can be left as NULL. If the source address is not available, "saddrp" will be not be filled in and "saddrlenp" will be set to zero. The dlpi_recvinfo_t is a structure defined in as follows: typedef struct { uchar_t dri_destaddr[DLPI_PHYSADDR_MAX]; uchar_t dri_destaddrlen; dlpi_addrtype_t dri_destaddrtype; | size_t dri_totmsglen; } dlpi_recvinfo_t; Upon success, if "recvp" is not set to NULL, "dri_destaddr" will contain the destination address, "dri_destaddrlen" will contain the destination address length and "dri_totmsglen" will contain the total length of the message received. If the destination address is unicast, "dri_destaddrtype" will be set to DLPI_ADDRTYPE_UNICAST, otherwise it will| be set to DLPI_ADDRTYPE_GROUP. Values of "msglenp" and "dri_totmsglen" may vary when a message larger than the size of "msgbuf" is received. In this case, the caller can use "dri_totmsglen" to determine the original total length of the message. If the handle is in raw mode (see dlpi_open(3DLPI)), then "msgbuf" will start with the link-layer header; see dlpi(7P). Also, the values of "saddrp", "saddrlenp" and all the members of dlpi_recvinfo_t except "dri_totmsglen" will be invalid, since all the address information is already included in the link-layer header returned by "msgbuf". If no message is received within "msec" milliseconds, dlpi_recv() returns DLPI_ETIMEDOUT. If "msec" is 0, dlpi_recv() will not block; if "msec" is -1, dlpi_recv() will block until a data message is received. RETURN VALUES Upon success, DLPI_SUCCESS is returned. If DL_SYSERR is returned, errno contains the specific UNIX system error value. Otherwise, a DLPI error value defined in or an error value listed in ERRORS will be returned. ERRORS DLPI_EBADMSG bad DLPI message DLPI_EINHANDLE invalid DLPI handle DLPI_EINVAL invalid argument DLPI_ETIMEDOUT DLPI operation timed out DLPI_EUNAVAILSAP unavailable DLPI SAP DLPI_FAILURE DLPI operation failed SEE ALSO dlpi_open(3DLPI), dlpi_bind(3DLPI), dlpi(7P) DLPI Library Functions dlpi_fd(3DLPI) NAME dlpi_fd - get DLPI file descriptor SYNOPSIS #include int dlpi_fd(dlpi_handle_t dh); DESCRIPTION The dlpi_fd() function returns the integer file descriptor that can be used to directly operate on the open DLPI stream associated with the DLPI handle "dh". This file descriptor can be used to perform non-DLPI operations that do not alter the state of the DLPI stream, such as waiting for an event using poll(2), or pushing and configuring additional STREAMS modules, such as pfmod(7M). If DLPI operations are directly performed on the file descriptor, or a STREAMS module is pushed that alters the message-passing interface such that DLPI operations can no longer be issued, then future operations on "dh" may not behave as documented. Note that the returned file descriptor is managed by libdlpi, and must not be closed. RETURN VALUES The function returns the integer file descriptor associated with the DLPI handle "dh". If "dh" is invalid, -1 is returned. DLPI Library Functions dlpi_set_timeout(3DLPI) NAME dlpi_set_timeout - set DLPI handle timeout interval SYNOPSIS #include int dlpi_set_timeout(dlpi_handle_t dh, int sec); DESCRIPTION The dlpi_set_timeout() function sets the timeout interval to "sec" seconds on DLPI handle "dh". This timeout is used by libdlpi functions that require explicit acknowledgment from the associated DLPI link, and bounds the number of seconds that a function will wait for an acknowledgment before returning DLPI_ETIMEDOUT. Except for dlpi_recv(3DLPI) (which has a timeout argument), any function that is documented to return DLPI_ETIMEDOUT may take up to the timeout interval to complete. Callers that do not require an upper bound on timeouts are strongly encouraged to never call dlpi_set_timeout(), and allow libdlpi to use its default timeout value. The default timeout value is intended to ensure that DLPI_ETIMEDOUT will only be returned if the DLPI link has truly become unresponsive. The default timeout value is intended to ensure that DLPI_ETIMEDOUT will only be returned if the DLPI link has truly become unresponsive. However, callers that do require an explicit upper bound can specify that value at any time by calling dlpi_set_timeout(). However, note that values less than 5 seconds may trigger spurious failures on certain DLPI links and systems under high load, and thus are discouraged. Attempts to set the timeout value to less than 1 second will fail. If "sec" is set to DLPI_DEF_TIMEOUT, the default timeout value is restored. RETURN VALUES Upon success, DLPI_SUCCESS is returned. Otherwise, a DLPI error value listed in ERRORS will be returned. ERRORS DLPI_EINHANDLE invalid DLPI handle DLPI Library Functions dlpi_strerror(3DLPI) NAME dlpi_strerror - get DLPI error message SYNOPSIS #include const char *dlpi_strerror(int err); DESCRIPTION The dlpi_strerror() function maps the error code in "err" into an error message string, and returns a pointer to that string. If "err" is DL_SYSERR, then a string describing the current value of "errno" is returned. Otherwise, if "err" corresponds to an error code listed in or , a string describing that error is returned. Note that the string is not dynamically allocated and must not be freed by the caller. RETURN VALUES Upon success the function returns a pointer to the error message string. If the error code is unknown, the string "Unknown DLPI error" is returned. DLPI Library Functions dlpi_linkname(3DLPI) NAME dlpi_linkname - get DLPI link name SYNOPSIS #include const char *dlpi_linkname(dlpi_handle_t dh); DESCRIPTION The dlpi_linkname() function returns a pointer to the link name of the DLPI link instance associated with DLPI handle "dh". Note that the returned string is managed by libdlpi and must not be modified or freed by the caller. RETURN VALUES Upon success the function returns a pointer to the link name associated with the DLPI handle. DLPI Library Functions dlpi_iftype(3DLPI) NAME dlpi_iftype - convert a DLPI MAC type to a BSD socket interface type SYNOPSIS #include uint_t dlpi_iftype(uint_t dlpitype); DESCRIPTION The dlpi_iftype() function returns a BSD socket interface type. The interface types mapped are the types that are used in Solaris and are defined in . There are some additional types for which a direct mapping exists. RETURN VALUES Upon success, the corresponding BSD socket interface type is returned. Otherwise, zero will be returned. See Also libdlpi(3LIB), attributes(5) DLPI Library Functions dlpi_arptype(3DLPI) NAME dlpi_arptype - convert a DLPI MAC type to an ARP hardware type SYNOPSIS #include uint_t dlpi_arptype(uint_t dlpitype); DESCRIPTION The dlpi_arptype() function returns a ARP hardware type. The ARP types mapped are the types that are used in Solaris and are defined in . RETURN VALUES Upon success the corresponding ARP hardware type is returned. Otherwise, zero will be returned. See Also libdlpi(3LIB), attributes(5)