kernels/linux-2.4.0/drivers/net/wan/sdla_chdlc.c
/*============================================================================
 * Build media header.
 *
 * The trick here is to put packet type (Ethertype) into 'protocol' field of
 * the socket buffer, so that we don't forget it.  If packet type is not
 * supported, set skb->protocol to 0 and discard packet later.
 *
 * Return:	media header length.
 */
Build media header.
The trick here is to put packet type (Ethertype) into 'protocol' field of
the socket buffer, so that we don't forget it.  If packet type is not
supported, set skb->protocol to 0 and discard packet later.

media header length.
Build media header . The trick here is to put packet type ( Ethertype ) into ' protocol ' field of the socket buffer so that we don ' t forget it . If packet type is not supported set skb - > protocol to 0 and discard packet later . media header length .
static int if_header (struct sk_buff* skb, struct net_device* dev,
	unsigned short type, void* daddr, void* saddr, unsigned len)
{
	skb->protocol = htons(type);
	return CHDLC_HDR_LEN;
}
static int if_header ( struct sk_buff * skb , struct net_device * dev , unsigned short type , void * daddr , void * saddr , unsigned len ) { skb -> protocol = htons ( type ) ; return CHDLC_HDR_LEN ; }
Build media header.
Build media header .