1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef TEST_UTIL_H 17 #define TEST_UTIL_H 18 19 #include <stddef.h> 20 #include "qemu_pipe.h" 21 22 23 double now_secs(void); 24 25 typedef struct { 26 int socket; 27 } Pipe; 28 29 int pipe_openSocket( Pipe* pipe, int port ); 30 int pipe_openQemuPipe( Pipe* pipe, const char* pipename ); 31 int pipe_send( Pipe* pipe, const void* buff, size_t bufflen ); 32 int pipe_recv( Pipe* pipe, void* buff, size_t bufflen ); 33 void pipe_close( Pipe* pipe ); 34 35 #endif /* TEST_UTIL_H */ 36