Module devices::virtio::video::protocol

source ·
Expand description

This file was generated by the following commands and modified manually.

$ bindgen virtio_video.h              \
    --allowlist-type "virtio_video.*" \
    --allowlist-var "VIRTIO_VIDEO_.*" \
    --with-derive-default            \
    --no-layout-tests                \
    --no-prepend-enum-name > protocol.rs
$ sed -i "s/__u/u/g" protocol.rs
$ sed -i "s/__le/Le/g" protocol.rs

The main points of the manual modifications are as follows:

  • Removed hdr from each command struct so that we can read the header and a command body separately. (cf. related discussion)
  • Derive implementations of AsBytes and FromBytes for each struct as needed.
  • Added GET_PARAMS_EXT and SET_PARAMS_EXT to allow querying and changing the resource type dynamically.
  • Moved some definitions such as virtio_video_config to device_constants to make them visible to vhost-user modules, and also pub-use them.

Structs§

Constants§

Type Aliases§