home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / PPPBCKP / SRC / SRC15B87.ZIP / TCP.H < prev    next >
C/C++ Source or Header  |  1998-01-03  |  2KB  |  99 lines

  1.  
  2. /*
  3.  * Waterloo TCP
  4.  *
  5.  * Copyright (c) 1990, 1991, 1992, 1993 Erick Engelke
  6.  *
  7.  * Portions copyright others, see copyright.h for details.
  8.  *
  9.  * This library is free software; you can use it or redistribute under
  10.  * the terms of the license included in LICENSE.H.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * file LICENSE.H for more details.
  16.  *
  17.  */
  18. #ifndef _wattcp_tcp_h
  19. #define _wattcp_tcp_h
  20.  
  21. #ifndef WTCP_VER
  22.  
  23. #define __WATTCP_USER__  /* Not compiling the kernel itself, hide some stuff */
  24.  
  25. #include "wattcp.h"
  26.  
  27. /* handle some early dumb naming conventions */
  28. #define dbuginit()      dbug_init()
  29.  
  30. /* Kernal version (major major minor minor) */
  31. #define WTCP_VER 0x0102
  32.  
  33. /*
  34.  * Typedefs and constants
  35.  */
  36.  
  37. typedef struct in_addr {
  38.     longword    s_addr;
  39. };
  40.  
  41. /*
  42.  * BSD-style socket info routines -- bsdname.c
  43.  */
  44. int getpeername( sock_type *s, void *dest, int *len );
  45. int getsockname(  sock_type *s, void *dest, int *len );
  46. char *getdomainname( char *name, int length );
  47. char *setdomainname( char *string );
  48. char *gethostname( char *name, int len );
  49. char *sethostname( char *name );
  50. void psocket( sock_type *s );
  51.  
  52. /*
  53.  * ICMP-related stuff -- pcicmp.c
  54.  */
  55. /*
  56.  * Send an icmp echo request using specified ttl and tos.
  57.  * if(icmp_id != NULL) store copy of the id there
  58.  */
  59. int _send_ping( longword host, longword countnum, byte ttl,
  60.                                             byte tos, longword *theid );
  61. /* backward compatibility */
  62. #define _ping( h, c ) _send_ping( h, c, 250, 0, NULL )
  63. longword _chk_ping( longword host , longword *ptr);
  64.  
  65. /*
  66.  * Daemons -- wattcpd.c
  67.  */
  68. int addwattcpd( void (*p)( void ) );
  69. int delwattcpd( void (*p)( void ) );
  70.  
  71. /*
  72.  * Background net I/O processing -- netback.c
  73.  */
  74. void backgroundon( void );
  75. void backgroundoff(void);
  76. void backgroundfn( void (*fn)() );
  77.  
  78. /*
  79.  * More background processing -- pcintr.c
  80.  */
  81. void wintr_enable( void );
  82. void wintr_disable( void );
  83. void wintr_shutdown( void );
  84. void wintr_init( void );
  85.  
  86. /*
  87.  * Socket stats -- pcstat.c
  88.  */
  89. int sock_stats( sock_type *s, word *days, word *inactive, word *cwindow, word *avg, word *sd );
  90.  
  91. /*
  92.  * Debug test routine -- test.c
  93.  */
  94. void debugpsocketlen( void );
  95.  
  96. #endif /* WTCP_VER */
  97.  
  98. #endif /* ndef _wattcp_tcp_h */
  99.