home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / driverkit / IONetwork.h < prev    next >
Text File  |  1993-11-04  |  1KB  |  71 lines

  1. /*
  2.  * Copyright (c) 1992 NeXT Computer, Inc.
  3.  *
  4.  * Network interface class.
  5.  *
  6.  * HISTORY
  7.  *
  8.  * 10 December 1992 David E. Bohman at NeXT
  9.  *    Created.
  10.  */
  11.  
  12. #ifdef    KERNEL
  13.  
  14. #import <objc/Object.h>
  15. #import <bsd/net/netif.h>
  16.  
  17. @interface IONetwork:Object
  18. {
  19. @private
  20.     netif_t    _netif;
  21.     int        _IONetwork_reserved[4];
  22. }
  23.  
  24. - initForNetworkDevice:device
  25.         name:(const char *)name
  26.         unit:(unsigned int)unit
  27.         type:(const char *)type
  28.         maxTransferUnit:(unsigned int)mtu
  29.         flags:(unsigned int)flags;
  30.  
  31. - (int)handleInputPacket:(netbuf_t)pkt
  32.         extra:(void *)extra;
  33.  
  34. - (unsigned)inputPackets;
  35. - (void)incrementInputPackets;
  36. - (void)incrementInputPacketsBy:(unsigned)increment;
  37.  
  38. - (unsigned)inputErrors;
  39. - (void)incrementInputErrors;
  40. - (void)incrementInputErrorsBy:(unsigned)increment;
  41.  
  42. - (unsigned)outputPackets;
  43. - (void)incrementOutputPackets;
  44. - (void)incrementOutputPacketsBy:(unsigned)increment;
  45.  
  46. - (unsigned)outputErrors;
  47. - (void)incrementOutputErrors;
  48. - (void)incrementOutputErrorsBy:(unsigned)increment;
  49.  
  50. - (unsigned)collisions;
  51. - (void)incrementCollisions;
  52. - (void)incrementCollisionsBy:(unsigned)increment;
  53.  
  54. @end
  55.  
  56. @protocol IONetworkDeviceMethods
  57.  
  58. - (int)finishInitialization;
  59.  
  60. - (int)outputPacket:(netbuf_t)pkt
  61.         address:(void *)addrs;
  62.  
  63. - (netbuf_t)allocateNetbuf;
  64.  
  65. - (int)performCommand:(const char *)command
  66.         data:(void *)data;
  67.  
  68. @end
  69.  
  70. #endif    KERNEL
  71.