2 This file is part of GNUnet.
3 (C) 2010 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file transport/test_transport_wlan_dummy.c
22 * @brief helper for the testcase for plugin_transport_wlan.c
23 * @author David Brodski
27 #include "gnunet_constants.h"
28 #include "gnunet_os_lib.h"
29 #include "gnunet_transport_plugin.h"
30 #include "transport.h"
31 #include "plugin_transport_wlan.h"
32 #include "gnunet_common.h"
33 #include "gnunet-transport-wlan-helper.h"
34 #include "plugin_transport_wlan.h"
38 #include <sys/stat.h>
\r
40 #define FIFO_FILE1 "MYFIFOin"
\r
41 #define FIFO_FILE2 "MYFIFOout"
44 main(int argc, char *argv[])
51 //make the fifos if needed
52 if(stat(FIFO_FILE1,&st) != 0){
53 if(stat(FIFO_FILE2,&st) != 0){
54 perror("FIFO 2 exists, but FIFO 1 not");
\r
59 erg = mknod(FIFO_FILE1, S_IFIFO|0666, 0);
60 erg = mknod(FIFO_FILE2, S_IFIFO|0666, 0);
62 if((fpin = fopen(FIFO_FILE1, "r")) == NULL) {
\r
66 if((fpout = fopen(FIFO_FILE2, "w")) == NULL) {
\r
72 if(stat(FIFO_FILE2,&st) == 0){
73 perror("FIFO 1 exists, but FIFO 2 not");
\r
76 if((fpout = fopen(FIFO_FILE1, "w")) == NULL) {
\r
80 if((fpin = fopen(FIFO_FILE2, "r")) == NULL) {
\r
86 // Write the input to the output
\r