Split ifnet serialize step 1/many: Add if_{serialize,deserialize,tryserialize}()
function pointers to ifnet.
These three function pointers accept ifnet struct and ifnet_serialize
enumeration.
The ifnet_serialize enumeration indicates the serialization type:
IFNET_SERIALIZE_ALL:
All of the serializers should be held. Except for if_start and if_input,
this enumeration must be used when call ifnet function pointers.
IFNET_SERIALIZE_TX:
Only transmit serializer should be held. This enumeration could be used
when calling ifnet.if_start.
IFNET_SERIALIZE_RX:
Only receive serializer should be held. This enumeration could be used
when calling ifnet.if_input.
If the NIC driver does not set these three function pointer, then if_attach()
will set them to the default ones: only one serializer (if_serializer) is used
and ifnet_serialize parameter is ignored.
Following several inline functions are added which are sheer wrappers of the
three ifnet serialize function pointers:
ifnet_serialize_{all,tx,rx}()
ifnet_deserialize_{all,tx,rx}()
ifnet_tryserialize_{all,tx,rx}()
All of the protocol layers and most of the pseudo drivers are converted.
Discussed-with: dillon@