14a49301eSmrg/*
24a49301eSmrg * Copyright 2009 VMware, Inc.
34a49301eSmrg * All Rights Reserved.
44a49301eSmrg *
54a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a
64a49301eSmrg * copy of this software and associated documentation files (the "Software"),
74a49301eSmrg * to deal in the Software without restriction, including without limitation
84a49301eSmrg * on the rights to use, copy, modify, merge, publish, distribute, sub
94a49301eSmrg * license, and/or sell copies of the Software, and to permit persons to whom
104a49301eSmrg * the Software is furnished to do so, subject to the following conditions:
114a49301eSmrg *
124a49301eSmrg * The above copyright notice and this permission notice (including the next
134a49301eSmrg * paragraph) shall be included in all copies or substantial portions of the
144a49301eSmrg * Software.
154a49301eSmrg *
164a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
174a49301eSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184a49301eSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
194a49301eSmrg * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
204a49301eSmrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
214a49301eSmrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
224a49301eSmrg * USE OR OTHER DEALINGS IN THE SOFTWARE.
234a49301eSmrg */
244a49301eSmrg
254a49301eSmrg/*
264a49301eSmrg * This file contains the function defentions for connection see c file for
274a49301eSmrg * more comments covering function use.
284a49301eSmrg */
294a49301eSmrg
304a49301eSmrg#ifndef _RBUG_CONNECTION_H_
314a49301eSmrg#define _RBUG_CONNECTION_H_
324a49301eSmrg
33af69d88dSmrg#include "rbug_proto.h"
344a49301eSmrg
354a49301eSmrgstruct rbug_connection * rbug_from_socket(int socket);
364a49301eSmrg
374a49301eSmrgvoid rbug_disconnect(struct rbug_connection *c);
384a49301eSmrg
394a49301eSmrgstruct rbug_header * rbug_get_message(struct rbug_connection *c, uint32_t *serial);
404a49301eSmrg
414a49301eSmrgvoid rbug_free_header(struct rbug_header *header);
424a49301eSmrg
434a49301eSmrgstruct rbug_header * rbug_demarshal(struct rbug_proto_header *header);
444a49301eSmrg
454a49301eSmrg#endif
46