blob: 47786955a401ca50e483c936cfc20536c459619c (
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
39
40
41
42
43
44
45
46
47
48
|
#ifndef TRANS_H
#define TRANS_H
struct trans_handle;
struct trans_msg;
typedef int(*trans_cb_t)(struct trans_handle *h, struct trans_msg *msg);
struct trans_msg {
/* netlink command */
int cmd;
/* common attributes */
int type;
int idx;
/* flags indicating error/ack message */
int err;
int ack;
/* attributes based on cmd field */
union {
/* data message */
struct {
void *ptr;
int len;
uint flags;
} data;
/* notify message */
int action;
/* error message */
int error;
/* group message */
int group;
};
};
int trans_init(struct trans_handle *h, trans_cb_t cb);
int trans_close(struct trans_handle *h);
int trans_process(struct trans_handle *h);
int trans_send(struct trans_handle *h, struct trans_msg *msg);
int trans_group(struct trans_handle *h, int group);
int trans_fd(struct trans_handle *h);
#include "trans-libnl.h"
#endif /* !TRANS_H */
|