-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathsvctl.h
More file actions
51 lines (40 loc) · 853 Bytes
/
svctl.h
File metadata and controls
51 lines (40 loc) · 853 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <output.h>
#include <nlusctl.h>
struct ucbuf;
struct urbuf;
struct heap {
void* brk;
void* ptr;
void* end;
};
struct top {
int opts;
int argc;
int argi;
char** argv;
int fd;
int connected;
struct ucbuf uc;
struct urbuf ur;
struct bufout bo;
char smallbuf[128];
struct heap hp;
};
#define CTX struct top* ctx
#define MSG struct ucmsg* msg
#define AT struct ucattr* at
#define UC (&ctx->uc)
typedef struct ucattr* attr;
void output(CTX, char* buf, int len);
void flush_output(CTX);
void init_socket(CTX);
void expect_large(CTX);
void start_request(CTX, int cmd, int count, int length);
void add_str_attr(CTX, int key, char* name);
void send_request(CTX);
struct ucmsg* recv_reply(CTX);
void* heap_alloc(CTX, int size);
void dump_list(CTX, MSG);
void dump_info(CTX, MSG);
void dump_pid(CTX, MSG);
void dump_msg(CTX, MSG);