ia64/xen-unstable

view tools/vnet/vnetd/marshal.h @ 3498:1d24a5b0b338

bitkeeper revision 1.1159.223.25 (41f2cb9aEKMZkZbvqBE0eXhpljlV4Q)

Description: fix path to python
There is no python2 in debian. Instead, use python.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jan 22 21:54:34 2005 +0000 (2005-01-22)
parents f65b65977b19
children 0a4b76b6b5a0
line source
1 /*
2 * Copyright (C) 2004 Mike Wray <mike.wray@hp.com>.
3 *
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of the
7 * License, or (at your option) any later version. This library is
8 * distributed in the hope that it will be useful, but WITHOUT ANY
9 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE.
11 * See the GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17 #ifndef _XEN_LIB_MARSHAL_H_
18 #define _XEN_LIB_MARSHAL_H_
20 #include "iostream.h"
22 /** A 16-bit uint in network order, e.g. a port number. */
23 typedef uint16_t net16_t;
25 /** A 32-bit uint in network order, e.g. an IP address. */
26 typedef uint32_t net32_t;
28 extern int marshal_flush(IOStream *io);
30 extern int marshal_bytes(IOStream *io, void *s, uint32_t s_n);
31 extern int unmarshal_bytes(IOStream *io, void *s, uint32_t s_n);
33 extern int marshal_uint8(IOStream *io, uint8_t x);
34 extern int unmarshal_uint8(IOStream *io, uint8_t *x);
36 extern int marshal_uint16(IOStream *io, uint16_t x);
37 extern int unmarshal_uint16(IOStream *io, uint16_t *x);
39 extern int marshal_uint32(IOStream *io, uint32_t x);
40 extern int unmarshal_uint32(IOStream *io, uint32_t *x);
42 extern int marshal_int32(IOStream *io, int32_t x);
43 extern int unmarshal_int32(IOStream *io, int32_t *x);
45 extern int marshal_uint64(IOStream *io, uint64_t x);
46 extern int unmarshal_uint64(IOStream *io, uint64_t *x);
48 extern int marshal_net16(IOStream *io, net16_t x);
49 extern int unmarshal_net16(IOStream *io, net16_t *x);
51 extern int marshal_net32(IOStream *io, net32_t x);
52 extern int unmarshal_net32(IOStream *io, net32_t *x);
54 extern int marshal_string(IOStream *io, char *s, uint32_t s_n);
55 extern int unmarshal_string(IOStream *io, char *s, uint32_t s_n);
56 extern int unmarshal_new_string(IOStream *io, char **s, uint32_t *s_n);
58 #endif /* ! _XEN_LIB_MARSHAL_H_ */