1 /*
2  * Copyright (C) 2009, Mukesh Rathor, Oracle Corp.  All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public
6  * License v2 as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public
14  * License along with this program; If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 typedef uint16_t domid_t;
18 typedef unsigned char uchar;
19 
20 #include "../xg/xg_public.h"
21 
22 int gx_remote_open (char *commstr);
23 void gx_remote_close(void);
24 int gx_getpkt (char *buf);
25 void gx_write_ok(char *buf);
26 void gx_write_err(char *buf);
27 void gx_convert_int_to_ascii (char *from, char *to, int n);
28 void gx_convert_ascii_to_int (char *from, char *to, int n);
29 int gx_putpkt (char *buf);
30 void gx_decode_m_packet(char *, uint64_t *, int *);
31 char *gx_decode_M_packet(char *, uint64_t *, int *);
32 void gx_decode_zZ_packet(char *, uint64_t *);
33 void gx_reply_ok(char *);
34 void gx_reply_error(char *);
35 int gx_fromhex(int);
36 int gx_tohex(int);
37 int gx_local_cmd(domid_t domid, vcpuid_t vcpuid);
38 void gxprt(const char *fmt, ...);
39