Although the encapsulation and operational mode can be chosen independently, typically, DLPI mode is used for LLC-encapsulated traffic and raw mode is used for null encapsulation.
The driver's handling of packets depends on both the encapsulation method and the operational mode. For LLC-encapsulated traffic running in dlpi mode, the driver automatically adds the LLC header on transmit and strips the LLC header on receive before sending the message up the dlpi mode stream. In raw mode, however, the driver does not modify the packets at all. This includes any header included with the packet. Thus, an application using raw mode and LLC encapsulation must include its own headers on transmit and receives data with the LLC header intact.
Received packets are directed to application streams based on the type of encapsulation in use. If a packet is null-encapsulated, it is sent up the stream associated with the vpci on which the packet was received. If a packet is LLC-encapsulated, it is sent to the stream that has bound (using atm_bind()) the SAP found in the LLC header.