1f08c3bdfSopenharmony_ci/*
2f08c3bdfSopenharmony_ci *
3f08c3bdfSopenharmony_ci *   Copyright (c) International Business Machines  Corp., 2001
4f08c3bdfSopenharmony_ci *
5f08c3bdfSopenharmony_ci *   This program is free software;  you can redistribute it and/or modify
6f08c3bdfSopenharmony_ci *   it under the terms of the GNU General Public License as published by
7f08c3bdfSopenharmony_ci *   the Free Software Foundation; either version 2 of the License, or
8f08c3bdfSopenharmony_ci *   (at your option) any later version.
9f08c3bdfSopenharmony_ci *
10f08c3bdfSopenharmony_ci *   This program is distributed in the hope that it will be useful,
11f08c3bdfSopenharmony_ci *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
12f08c3bdfSopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
13f08c3bdfSopenharmony_ci *   the GNU General Public License for more details.
14f08c3bdfSopenharmony_ci *
15f08c3bdfSopenharmony_ci *   You should have received a copy of the GNU General Public License
16f08c3bdfSopenharmony_ci *   along with this program;  if not, write to the Free Software
17f08c3bdfSopenharmony_ci *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18f08c3bdfSopenharmony_ci */
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_ci/* inet.h */
21f08c3bdfSopenharmony_ci#include <stdio.h>
22f08c3bdfSopenharmony_ci#include <sys/types.h>
23f08c3bdfSopenharmony_ci#include <sys/socket.h>
24f08c3bdfSopenharmony_ci#include <netinet/in.h>
25f08c3bdfSopenharmony_ci#include <arpa/inet.h>
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci#define SERV_TCP_PORT  6300
28f08c3bdfSopenharmony_ci#define SERV_UDP_PORT  6300
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci/* address for server */
31f08c3bdfSopenharmony_cichar *pname;
32f08c3bdfSopenharmony_ci
33f08c3bdfSopenharmony_ciextern int writen(int fd, char *ptr, int nbytes);
34f08c3bdfSopenharmony_ciextern int readline(int fd, char *ptr, int maxlen);
35f08c3bdfSopenharmony_ciextern void noprintf(char* string, ...);
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ci
38f08c3bdfSopenharmony_ci/* debug */
39f08c3bdfSopenharmony_ci#ifdef DEBUG
40f08c3bdfSopenharmony_ci
41f08c3bdfSopenharmony_ci#define prtln()	fflush(NULL); \
42f08c3bdfSopenharmony_ci		printf("Reached %s: %d\n", __FILE__, __LINE__);
43f08c3bdfSopenharmony_ci#define dprt	printf
44f08c3bdfSopenharmony_ci#define dprt2(args)    printf args
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ci#else
47f08c3bdfSopenharmony_ci
48f08c3bdfSopenharmony_ci#define prtln()
49f08c3bdfSopenharmony_ci#define dprt	noprintf
50f08c3bdfSopenharmony_ci#define dprt2(args) noprintf args
51f08c3bdfSopenharmony_ci
52f08c3bdfSopenharmony_ci#endif
53