Blame


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