ninenano

Client implementation of the 9P protocol for constrained devices

git clone https://git.8pit.net/ninenano.git

 1#ifndef NINEUTIL_H
 2#define NINEUTIL_H
 3
 4#include "9p.h"
 5#include <stdint.h>
 6
 7void advbuf(_9ppkt*, size_t);
 8void bufcpy(_9ppkt*, void*, size_t);
 9
10_9pfid* fidtbl(_9pfid*, uint32_t, _9pfidop);
11_9pfid* newfid(_9pfid*);
12
13int pstring(char*, _9ppkt*);
14int pnstring(char*, size_t, _9ppkt*);
15int hstring(char*, uint16_t, _9ppkt*);
16int hqid(_9pqid*, _9ppkt*);
17
18void htop8(uint8_t, _9ppkt*);
19void htop16(uint16_t, _9ppkt*);
20void htop32(uint32_t, _9ppkt*);
21void htop64(uint64_t, _9ppkt*);
22
23void ptoh8(uint8_t *dest, _9ppkt*);
24void ptoh16(uint16_t *dest, _9ppkt*);
25void ptoh32(uint32_t *dest, _9ppkt*);
26void ptoh64(uint64_t *dest, _9ppkt*);
27
28void initrand(void);
29uint32_t randu32(void);
30
31#endif