home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / msr313src.zip / msnlib.h < prev    next >
C/C++ Source or Header  |  1993-07-12  |  3KB  |  90 lines

  1. /* File MSNLIB.H
  2.  * Kermit include file for TCP C modules
  3.  *
  4.  * Copyright (C) 1991,1993, Trustees of Columbia University in the
  5.  *  City of New York.  Permission is granted to any individual or
  6.  *  institution to use, copy, or redistribute this software as long as
  7.  *  it is not sold for profit and this copyright notice is retained.
  8.  *
  9.  * The C code is designed for the small memory model of Microsoft C versions
  10.  * 5.1 and later, with structures packed on one byte boundaries. No other
  11.  * options are expected.
  12.  *
  13.  * Last edit:
  14.  * 6 Sept 1991
  15.  */
  16.  
  17. #ifndef NULL
  18. #define NULL 0
  19. #endif
  20.  
  21. /* Function prototypes */
  22.  
  23. #ifndef byte
  24. typedef unsigned char byte;
  25. #endif  /* byte */
  26. #ifndef word
  27. typedef unsigned int word;
  28. #endif  /* word */
  29. #ifndef longword
  30. typedef unsigned long longword;
  31. #endif /* longword */
  32.  
  33. void outch( byte );        /* print character to stdio */
  34. void outs( byte * );        /* print an ASCIIZ string to stdio */
  35. void outsn( byte *, int );    /* print a string with len max n */
  36. void outhex( byte );
  37. void outhexes( void *, int );
  38. void ntoa(byte *, unsigned long);
  39.  
  40. unsigned long realclock( void );
  41. unsigned long set_timeout( unsigned int );
  42. unsigned long set_ttimeout( unsigned int );
  43. int chk_timeout( unsigned long );
  44.  
  45. unsigned long intel( unsigned long );
  46. unsigned intel16( unsigned );
  47. unsigned int checksum( void *ptr, int len ); /* IP checksum */
  48.  
  49. int  ourmod(int, int);
  50. int  ourdiv(int, int);
  51. long ourlmod(long, int);
  52. long ourldiv(long, int);
  53.  
  54. /* Library function replacements */
  55.  
  56. int    atoi(byte *);
  57. byte * ltoa(long, byte *, int);
  58. byte * itoa(int, byte *, int);
  59. int    isdigit(const byte);
  60. byte * strchr(void *, const byte);
  61. byte FAR * strchrf(byte FAR *, const byte);
  62. byte * strcat(void *, void *);
  63. byte * strncat(void *, void *, int);
  64. byte * strcpy(void *, void *);
  65. byte * strncpy(void *, void *, int);
  66. int    strlen(void *);
  67. int    strcmp(void *, void *);
  68. int    stricmp(void *, void *);
  69. int    strncmp(byte *, void *, int);
  70. void * bcopy(void *, void *, int);
  71. void * bcopyff(void FAR *, void FAR *, int);
  72. void * memset(void *, byte, int);
  73. void * pkt_received(void);
  74. int    pkt_eth_init(void);
  75. int    pkt_init(void);
  76. int    pkt_send(byte *, int);
  77. int    pkt_release(void);
  78. void   pkt_buf_release(byte *);
  79. void   pkt_buf_wipe(void);
  80. void   enable(void);
  81. void   disable (void);
  82.  
  83. /* supporting assembly language routines in file msnut1.asm */
  84. longword intel(longword x);
  85. word    intel16(word x);
  86. void FAR * malloc(word x);
  87. void    free(void FAR *);
  88. int    fstchr(const char FAR *, word, byte);
  89. longword aton(byte *);
  90.