Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • libxcb libxcb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 41
    • Issues 41
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • lib
  • libxcblibxcb
  • Merge requests
  • !27

Add AF_VSOCK

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Choung Park requested to merge cspark-gitlab/libxcb:master into master Apr 25, 2022
  • Overview 0
  • Commits 1
  • Changes 2

This patch extends the existing libxcb protocol framework for AF_VSOCK by adding a new protocol name 'vsock':

DISPLAY=vsock/[<VMADDR_CID>]:<display_number>[.<screen_number>]

For example, in order to have X11 clients running in a virtual machine forwarded to the X11 server running in the host, you can set the DISPLAY variable as:

export DISPLAY=vsock/2:0.0

It can be shortened as the following:

export DISPLAY=vsock/:0

'2' is the assigned number for VMADDR_CID_HOST and it's used as a default value when it's not found in the DISPLAY variable. For a port number, it can be any 'unsigned int', but in order to maintain consistency, it's defined the same as the TCP method: 6000 + <display_number>.

See also: https://stefano-garzarella.github.io/posts/2019-11-08-kvmforum-2019-vsock/ https://man7.org/linux/man-pages/man7/vsock.7.html https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vm_sockets.h

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master