Add enum BufferType to indicate buffer type(send or recv buffer).