libnx  v4.8.0
Data Structures | Macros | Enumerations | Functions
tipc.h File Reference

Tiny IPC protocol. More...

#include "hipc.h"
#include "cmif.h"
#include "service.h"

Go to the source code of this file.

Data Structures

struct  TipcService
 tipc Service object structure More...
 
struct  TipcDispatchParams
 
struct  TipcRequestFormat
 

Macros

#define tipcDispatch(_s, _rid, ...)    tipcDispatchImpl((_s),(_rid),NULL,0,NULL,0,(TipcDispatchParams){ __VA_ARGS__ })
 
#define tipcDispatchIn(_s, _rid, _in, ...)    tipcDispatchImpl((_s),(_rid),&(_in),sizeof(_in),NULL,0,(TipcDispatchParams){ __VA_ARGS__ })
 
#define tipcDispatchOut(_s, _rid, _out, ...)    tipcDispatchImpl((_s),(_rid),NULL,0,&(_out),sizeof(_out),(TipcDispatchParams){ __VA_ARGS__ })
 
#define tipcDispatchInOut(_s, _rid, _in, _out, ...)    tipcDispatchImpl((_s),(_rid),&(_in),sizeof(_in),&(_out),sizeof(_out),(TipcDispatchParams){ __VA_ARGS__ })
 

Enumerations

enum  TipcCommandType { TipcCommandType_Close = 15 }
 

Functions

static void tipcCreate (TipcService *s, Handle h)
 Creates a tipc service object from an IPC session handle. More...
 
static void tipcClose (TipcService *s)
 Closes a tipc service. More...
 
static void tipcRequestInBuffer (HipcRequest *req, const void *buffer, size_t size, HipcBufferMode mode)
 
static void tipcRequestOutBuffer (HipcRequest *req, void *buffer, size_t size, HipcBufferMode mode)
 
static void tipcRequestInOutBuffer (HipcRequest *req, void *buffer, size_t size, HipcBufferMode mode)
 
static void tipcRequestHandle (HipcRequest *req, Handle handle)
 
static void _tipcRequestFormatProcessBuffer (TipcRequestFormat *fmt, u32 attr)
 
static void _tipcRequestProcessBuffer (HipcRequest *req, const SfBuffer *buf, u32 attr)
 
static void * tipcMakeRequest (u32 request_id, u32 data_size, bool send_pid, const SfBufferAttrs buffer_attrs, const SfBuffer *buffers, u32 num_handles, const Handle *handles)
 
static Handle tipcResponseGetCopyHandle (HipcResponse *res)
 
static Handle tipcResponseGetMoveHandle (HipcResponse *res)
 
static void _tipcResponseGetHandle (HipcResponse *res, SfOutHandleAttr type, Handle *out)
 
static Result tipcParseResponse (u32 out_size, void **out_data, u32 num_out_objects, TipcService *out_objects, const SfOutHandleAttrs out_handle_attrs, Handle *out_handles)
 
static Result tipcDispatchImpl (TipcService *s, u32 request_id, const void *in_data, u32 in_data_size, void *out_data, u32 out_data_size, TipcDispatchParams disp)
 

Detailed Description

Tiny IPC protocol.

Author
fincs
SciresM

Function Documentation

◆ tipcClose()

static void tipcClose ( TipcService s)
inlinestatic

Closes a tipc service.

Parameters
[in]sTIPC service object.

◆ tipcCreate()

static void tipcCreate ( TipcService s,
Handle  h 
)
inlinestatic

Creates a tipc service object from an IPC session handle.

Parameters
[out]sTIPC service object.
[in]hIPC session handle.