a3c51e88868665d0308e07eca1a4a32e3125b055
[ctsim.git] / include / byteorder.h
1 #ifndef NETORDER_H
2 #define NETORDER_H
3
4 /* netorder.cpp */
5
6 void *strreverse (void *dest, const void *src, size_t n);
7 int read_nint16 (kuint16 *n, int fd);
8 int write_nint16 (kuint16 const *n, int fd);
9 int read_nint32 (kuint32 *n, int fd);
10 int write_nint32 (kuint32 const *n, int fd);
11 int read_nfloat32 (float *f, int fd);
12 int write_nfloat32 (float const *f, int fd);
13 int read_nfloat64 (double *d, int fd);
14 int write_nfloat64 (double const *d, int fd);
15 void ConvertNetworkOrder (void* buffer, size_t bytes);
16 void ConvertReverseNetworkOrder (void* buffer, size_t bytes);
17
18 #endif