home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / MacTCP Library 1.1 / Library / LowLevel ƒ / Source ƒ / IP.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-04  |  840 b   |  42 lines  |  [TEXT/SPM ]

  1. /*
  2.     IP.c
  3.     
  4.     Code to implement the IP functions.
  5.     
  6.     01/30/94 dn - Created.
  7.     11/28/94 mc - Converted to CodeWarrior
  8.     12/04/95 dn - Prep'd for Apprentice 4
  9. */
  10.  
  11. #include <MyTCPIncludes.h>
  12.  
  13. /*
  14.     IP_EchoICMP
  15.     
  16.     Allows a host to determine whether a remote host is operational without bringing up a protocal like TCP
  17.     or UDP.  IP_EchoICMP can also be used to determine the responsiveness of a network.
  18. */
  19. OSErr IP_EchoICMP(ICMPParamBlock* pb,Boolean async){
  20.     
  21.     if (pb->ioCRefNum==0)
  22.         return ipNilRefNum;
  23.         
  24.     pb->csCode=ipctlEchoICMP;
  25.     
  26.     return SyncAsync((ParmBlkPtr)pb,async);
  27. }
  28.  
  29. /*
  30.     IP_LAPStats
  31.     
  32.     Returns the statistics kept by MacTCP on the LAP (Link Access Protocol).
  33. */
  34. OSErr IP_LAPStats(ICMPParamBlock* pb,Boolean async){
  35.     
  36.     if (pb->ioCRefNum==0)
  37.         return ipNilRefNum;
  38.     
  39.     pb->csCode=ipctlLAPStats;
  40.     
  41.     return SyncAsync((ParmBlkPtr)pb,async);
  42. }