Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dm-log-userspace-transfer.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <net/sock.h>
#include <linux/workqueue.h>
#include <linux/connector.h>
#include <linux/device-mapper.h>
#include <linux/dm-log-userspace.h>
#include "dm-log-userspace-transfer.h"

Go to the source code of this file.

Data Structures

struct  receiving_pkg
 

Macros

#define DM_ULOG_RETRY_TIMEOUT   (15 * HZ)
 
#define DM_ULOG_PREALLOCED_SIZE   512
 

Functions

int dm_consult_userspace (const char *uuid, uint64_t luid, int request_type, char *data, size_t data_size, char *rdata, size_t *rdata_size)
 
int dm_ulog_tfr_init (void)
 
void dm_ulog_tfr_exit (void)
 

Macro Definition Documentation

#define DM_ULOG_PREALLOCED_SIZE   512

Definition at line 31 of file dm-log-userspace-transfer.c.

#define DM_ULOG_RETRY_TIMEOUT   (15 * HZ)

Definition at line 26 of file dm-log-userspace-transfer.c.

Function Documentation

int dm_consult_userspace ( const char uuid,
uint64_t  luid,
int  request_type,
char data,
size_t  data_size,
char rdata,
size_t rdata_size 
)

dm_consult_userspace : log's universal unique identifier (must be DM_UUID_LEN in size) : log's local unique identifier : found in include/linux/dm-log-userspace.h : data to tx to the server : size of data in bytes : place to put return data from server : value-result (amount of space given/amount of space used)

rdata_size is undefined on failure.

Memory used to communicate with userspace is zero'ed before populating to ensure that no unwanted bits leak from kernel space to user-space. All userspace log communications between kernel and user space go through this function.

Returns: 0 on success, -EXXX on failure

Definition at line 170 of file dm-log-userspace-transfer.c.

void dm_ulog_tfr_exit ( void  )

Definition at line 282 of file dm-log-userspace-transfer.c.

int dm_ulog_tfr_init ( void  )

Definition at line 259 of file dm-log-userspace-transfer.c.