blob: 4c5bb18d2fc287cfe85f26d3b653a64b204a05bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
* Copyright 2017 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Authors: Jérôme Glisse <jglisse@redhat.com>
*/
#ifndef COMPOTE_H
#define COMPOTE_H
#include <stdint.h>
typedef struct {
int fd;
} compote_context_t;
typedef struct {
uint64_t foffset;
uint64_t nbytes;
void *ptr;
} compote_mo_t;
int compote_context_new(compote_context_t **ctxp);
void compote_context_del(compote_context_t **ctxp);
int compote_context_ioctl(compote_context_t *ctx, int command, void *arg);
int compote_mo_new(compote_context_t *ctx, compote_mo_t **mop, uint64_t nbytes);
void compote_mo_del(compote_context_t *ctx, compote_mo_t **mop);
#endif // COMPOTE_H
|