Root/tools/include/netio.h

Source at commit 49e7c83796bc04941e9dbcec69bc0751563ff4d4 created 2 years 6 months ago.
By Werner Almesberger, atusb/: use ""VDD" symbol from kicad-libs
1/*
2 * include/netio.h - Helper functions for socket I/O
3 *
4 * Written 2011 by Werner Almesberger
5 * Copyright 2011 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#ifndef NETIO_H
15#define NETIO_H
16
17#include <stdint.h>
18#include <sys/types.h>
19
20
21struct netio;
22
23extern int netio_verbose;
24
25int netio_getc(struct netio *dsc, uint8_t *res);
26ssize_t netio_read_until(struct netio *dsc, const char *end, void *buf,
27    size_t len, char *last);
28ssize_t netio_read(struct netio *dsc, void *buf, size_t len);
29int netio_write(struct netio *dsc, const void *data, size_t len);
30int netio_printf(struct netio *dsc, const char *fmt, ...);
31struct netio *netio_open(int s);
32void netio_close(struct netio *dsc);
33
34#endif /* !NETIO_H */
35

Archive Download this file



interactive