Address Resolution Routine Registration Specifics

The dlpi driver can support all generic interface types. DLPI is implemented to allow the user to specify address resolution routines for input and output using the STREAMS I_STR ioctl or to rely on the system default routines.

The operating system provides default address resolution routines (stored in the /usr/include/sys/ndd.h file) that are interface specific.

The default input address resolution routine is as follows:

ndd->ndd_demuxer->nd_address_input

The dlpi driver calls the input address resolution routine with a pointer to the MAC header (and, optionally, the LLC header) and a pointer to a memory buffer (mbuf) structure containing data. The actual contents of the data area depend on which type of packet format was specified. (See Packet Format Registration Specifics.)

The default output address resolution routine is:

ndd->ndd_demuxer->nd_address_resolve

The dlpi driver calls the output address resolution routine with a pointer to an output_bundle structure (described in /usr/include/net/nd_lan.h), an mbuf structure, and an ndd structure. The driver assigns the destination address to key_to_find and copies the pkt_format and bind time llc into helpers. If the user has provided a different DSAP than what was set at bind time, the driver also copies the DSAP values into helpers.The output resolution routine completes the MAC header and calls the ndd_output subroutine.

If you choose to specify an input or output address resolution routine or both, use the following sample code:

noinres(int fd) {
       return istr(fd, DL_INPUT_RESOLVE, 0);
}