xorp

win_io.h

00001 /* -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*- */
00002 /* vim:set sts=4 ts=8: */
00003 
00004 /*
00005  * Copyright (c) 2001-2011 XORP, Inc and Others
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Lesser General Public License, Version
00009  * 2.1, June 1999 as published by the Free Software Foundation.
00010  * Redistribution and/or modification of this program under the terms of
00011  * any other version of the GNU Lesser General Public License is not
00012  * permitted.
00013  * 
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00017  * see the GNU Lesser General Public License, Version 2.1, a copy of
00018  * which can be found in the XORP LICENSE.lgpl file.
00019  * 
00020  * XORP, Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00021  * http://xorp.net
00022  */
00023 
00024 /*
00025  * $XORP: xorp/libxorp/win_io.h,v 1.10 2008/10/02 21:57:37 bms Exp $
00026  */
00027 
00028 #ifndef __LIBXORP_WIN_IO_H__
00029 #define __LIBXORP_WIN_IO_H__
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 #ifdef HOST_OS_WINDOWS
00036 
00037 int win_strerror_r(DWORD errnum, char *strerrbuf, size_t buflen);
00038 char *win_strerror(DWORD errnum);
00039 
00040 #define WINIO_ERROR_IOERROR (-1)    /* An I/O error on the pipe */
00041 #define WINIO_ERROR_HASINPUT    (-2)    /* Data is ready to be read */
00042 #define WINIO_ERROR_DISCONNECT  (-3)    /* The pipe was disconnected */
00043 
00044 ssize_t win_con_read(HANDLE h, void *buf, size_t bufsize);
00045 ssize_t win_pipe_read(HANDLE h, void *buf, size_t bufsize);
00046 
00047 #endif /* HOST_OS_WINDOWS */
00048 
00049 #ifdef __cplusplus
00050 }
00051 #endif
00052 
00053 #endif /* __LIBXORP_WIN_IO_H__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations