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