Module developers should follow these guidelines:
If a module does not understand the message types, the message types must be passed to the next module.
The module that acts on an M_IOCTL message sends an M_IOCACK or M_IOCNAK message in response to the ioctl(2). If the module does not understand the ioctl(2), it passes the M_IOCTL message to the next module.
Design modules so that they don't pertain to any particular driver but can be used with all drivers.
In general, modules should not require the data in an M_DATA message to follow a particular format, such as a specific alignment. This makes it easier to arbitrarily push modules on top of each other in a sensible fashion. Not following this rule can limit module usability.
Filter modules pushed between a service user and a service provider do not alter the contents of the M_PROTO or M_PCPROTO block in messages. The contents of the data blocks can be changed, but the message boundaries must be preserved.
The htonl(3N) and ntohl(3N) conversion routines follow the XNS5 publications. The functions continue to convert 32-bit quantities between network byte order and host byte order.