Update and improve several comments inside the library
[nmdb.git] / libnmdb / internal.h
blobd80424c7fd57c79a576dc48ad0b06d5658df8fd3
2 #ifndef _INTERNAL_H
3 #define _INTERNAL_H
5 /* Different connection types. Used internally to differentiate between the
6 * different protocols in struct nmdb_srv. */
7 #define TIPC_CONN 1
8 #define TCP_CONN 2
9 #define UDP_CONN 3
10 #define SCTP_CONN 4
12 /* The ID code for requests is hardcoded for now, until asynchronous requests
13 * are implemented. */
14 #define ID_CODE 1
16 /* For a given buffer, how much into it should the generic library code write
17 * the message contents. */
18 #define TIPC_MSG_OFFSET 0
19 #define TCP_MSG_OFFSET 4
20 #define UDP_MSG_OFFSET 0
21 #define SCTP_MSG_OFFSET 0
23 /* Functions used internally but shared among the different files. */
24 int compare_servers(const void *s1, const void *s2);
25 ssize_t srecv(int fd, unsigned char *buf, size_t count, int flags);
26 ssize_t ssend(int fd, const unsigned char *buf, size_t count, int flags);
28 #endif