Blame


1 fb1a36c0 2022-01-09 op /*
2 fb1a36c0 2022-01-09 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 fb1a36c0 2022-01-09 op *
4 fb1a36c0 2022-01-09 op * Permission to use, copy, modify, and distribute this software for any
5 fb1a36c0 2022-01-09 op * purpose with or without fee is hereby granted, provided that the above
6 fb1a36c0 2022-01-09 op * copyright notice and this permission notice appear in all copies.
7 fb1a36c0 2022-01-09 op *
8 fb1a36c0 2022-01-09 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 fb1a36c0 2022-01-09 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 fb1a36c0 2022-01-09 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 fb1a36c0 2022-01-09 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 fb1a36c0 2022-01-09 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 fb1a36c0 2022-01-09 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 fb1a36c0 2022-01-09 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 fb1a36c0 2022-01-09 op */
16 fb1a36c0 2022-01-09 op
17 fb1a36c0 2022-01-09 op /* 9p client library */
18 fb1a36c0 2022-01-09 op
19 fb1a36c0 2022-01-09 op #ifndef NPCLIB_H
20 fb1a36c0 2022-01-09 op #define NPCLIB_H
21 fb1a36c0 2022-01-09 op
22 fb1a36c0 2022-01-09 op #include <stdint.h>
23 fb1a36c0 2022-01-09 op
24 fb1a36c0 2022-01-09 op extern uint16_t iota_tag;
25 fb1a36c0 2022-01-09 op extern struct evbuffer *evb;
26 fb1a36c0 2022-01-09 op
27 fb1a36c0 2022-01-09 op void write_hdr(uint32_t, uint8_t, uint16_t);
28 fb1a36c0 2022-01-09 op void write_hdr_auto(uint32_t, uint8_t);
29 fb1a36c0 2022-01-09 op void write_str(uint16_t, const char *);
30 fb1a36c0 2022-01-09 op void write_str_auto(const char *);
31 fb1a36c0 2022-01-09 op void write_buf(const void *, uint32_t);
32 fb1a36c0 2022-01-09 op void write_64(uint64_t);
33 fb1a36c0 2022-01-09 op void write_32(uint32_t);
34 fb1a36c0 2022-01-09 op void write_16(uint16_t);
35 fb1a36c0 2022-01-09 op void write_8(uint8_t);
36 fb1a36c0 2022-01-09 op
37 fb1a36c0 2022-01-09 op #define write_off write_64
38 fb1a36c0 2022-01-09 op #define write_fid write_32
39 fb1a36c0 2022-01-09 op #define write_tag write_16
40 fb1a36c0 2022-01-09 op
41 fb1a36c0 2022-01-09 op void tversion(const char *, uint32_t);
42 fb1a36c0 2022-01-09 op void tattach(uint32_t, uint32_t, const char *, const char *);
43 fb1a36c0 2022-01-09 op void tclunk(uint32_t);
44 fb1a36c0 2022-01-09 op void tflush(uint16_t);
45 fb1a36c0 2022-01-09 op void twalk(uint32_t, uint32_t, const char **, size_t);
46 fb1a36c0 2022-01-09 op void topen(uint32_t, uint8_t);
47 fb1a36c0 2022-01-09 op void tcreate(uint32_t, const char *, uint32_t, uint8_t);
48 fb1a36c0 2022-01-09 op void tread(uint32_t, uint64_t, uint32_t);
49 fb1a36c0 2022-01-09 op void twrite(uint32_t, uint64_t, const void *, uint32_t);
50 fb1a36c0 2022-01-09 op void tstat(uint32_t);
51 4e93fcbd 2022-01-17 op void twstat(uint32_t, const struct np_stat *);
52 fb1a36c0 2022-01-09 op void tremove(uint32_t);
53 fb1a36c0 2022-01-09 op
54 fb1a36c0 2022-01-09 op #endif