Type Definitions

Defines

POINTER_SHAPE_BUFFERS
MAX_POINTER_SIZE
PLPContext

Typedefs

typedef enum LG_RendererCursor LG_RendererCursor

Enums

enum T_STATE

Values:

enumerator T_RUNNING
enumerator T_ERR
enumerator T_STOP
enum LP_STATE

Values:

enumerator LP_STATE_RUNNING
enumerator LP_STATE_INVALID
enumerator LP_STATE_STOP
enumerator LP_STATE_RESTART
enum LG_RendererCursor

Values:

enumerator LG_CURSOR_COLOR
enumerator LG_CURSOR_MONOCHROME
enumerator LG_CURSOR_MASKED_COLOR
enum LPMemState

Values:

enumerator LP_MEM_UNREGISTERED

Memory has not been registered for RDMA transfers.

enumerator LP_MEM_REGISTERED_TEMP

Memory has been registered temporarily. This is used when the physical pages backing the buffer may change once a client reconnects, e.g. in the case that DMABUF (/dev/kvmfr*) is used.

enumerator LP_MEM_REGISTERED_PERM

Memory has been registered for the entire session. The page mappings will not change while LGProxy is running.

enumerator LP_MEM_MAX

Sentinel value.

Functions

PLPContext lpAllocContext()

Allocates Memory for lpAllocContext.

Returns:

PLPContext

void lpDestroyContext(PLPContext ctx)

Destroy PTRFContext.

Parameters:

ctx – Context to use

struct LPClient

Public Members

PLGMPHost lgmp_host

LGMP host.

PLGMPHostQueue host_q

Host queue for frame data.

PLGMPHostQueue pointer_q

Pointer LGMP queue.

PTRFContext client_ctx

PTRFContext containing client connection.

PTRFContext sub_channel

Subchannel for handling cursor data.

enum T_STATE thread_flags

Thread flags for monitoring subchannel.

PLGMPMemory frame_memory[LGMP_Q_FRAME_LEN]

LGMP memory for frame data.

PLGMPMemory pointer_memory[LGMP_Q_POINTER_LEN]

LGMP memory for pointer data.

PLGMPMemory cursor_shape[POINTER_SHAPE_BUFFERS]

LGMP memory for cursor shape data.

unsigned int frame_index

Frame index.

unsigned int pointer_index

Pointer index.

unsigned cursor_shape_index

Cursor shape index.

bool pointer_shape_valid

Pointer shape state.

bool sub_started

Subchannel state whether it has started or not.

pthread_t cursor_thread

Cursor thread.

struct LPHost

Public Members

PLGMPClient lgmp_client

LGMP client.

PLGMPClientQueue client_q

LGMP client queue for frames.

PLGMPClientQueue pointer_q

LGMP pointer queue.

PTRFContext server_ctx

Server listening context.

PTRFContext client_ctx

Client context, will be created once a new client is received.

PTRFContext sub_channel

Subchannel for handling cursor data.

enum T_STATE thread_flags

Subchannel flags for thread monitoring.

struct LPUserOpts

Public Members

int64_t poll_int

Libfabric polling interval in nanoseconds. If this is 0 (default), then busy waiting will be used. If this is negative, then the program will use synchronous mode.

bool delete_exit

Delete the shared memory file on program exit. By default, this is false.

struct LPContext
#include <lp_types.h>

Context containing all connection details for the server and client and also LGMP Queues, Client, Host information.

Public Members

LPMemState mem_state

Memory state.

enum LP_STATE state

App State.

const char *shm

Shared memory file path.

void *ram

Pointer to shared memory.

uint32_t ram_size

Size of the shared memory.

bool format_valid

Frame format valid state.

int shmFile

File Descriptor for the shared memory file.

LPClient lp_client

LP Client Context.

LPHost lp_host

LP Host Context.

LPUserOpts opts

User defined options (e.g. Delete shm file on closing)

bool dma_buf

DMA Buffer support.