-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevsock.h
More file actions
35 lines (29 loc) · 734 Bytes
/
evsock.h
File metadata and controls
35 lines (29 loc) · 734 Bytes
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
#ifndef _EVSOCK_H
#define _EVSOCK_H
#include "diskev.h"
#ifndef EVHEAD_MAGIC
#define EVHEAD_MAGIC 0
#endif
#define EVTYPE_GROUP 1
#define EVTYPE_DONE 2
#define EVTYPE_ACTION 3
#define EVTYPE_DEVICE 4
#define EVTYPE_FS 5
#define EVTYPE_LABEL 6
#define EVTYPE_SERIAL 7
#define EVTYPE_FSUUID 8
#define EVTYPE_PARTUUID 9
struct evtlv {
short type;
short length;
char value[];
};
int evsock_open(void);
void evsock_close(int sock);
int evsock_connect(void);
void evsock_disconnect(int sock);
int evsock_read(int sock, char *buf, size_t *len);
int evsock_write(int sock, char *buf, size_t len);
int evev_parse(struct diskev *evt, char *data, int size);
int evev_build(char *data, int size, struct diskev *evt);
#endif // _EVSOCK_H