home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / MISC / SRC / INSTALL / NET.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-23  |  1.3 KB  |  42 lines

  1. #ifndef H_NET
  2. #define H_NET
  3.  
  4. #include "bptypes.h"
  5. #include "devices.h"
  6.  
  7. struct netInterface {
  8.     int isConfigured, isUp;
  9.     char dev[10];
  10.     int useBootp;
  11.  
  12.     /* broadcast and netmask don't really need to be here, but it keeps our
  13.        interface configuration ioctl()'s a bit more generic */
  14.     int32 ip, netmask, broadcast, network;
  15. } ;
  16.  
  17. struct netConfig {
  18.     int isConfigured;
  19.     char hostname[255];
  20.     char domainname[255];
  21.     char * nameserver[3];
  22.     char defaultGateway[255];
  23. } ;
  24.  
  25. int readNetInterfaceConfig(char * prefix, char * device,
  26.                   struct netInterface * intf);
  27. int writeNetInterfaceConfig(char * prefix, struct netInterface * intf);
  28. int writeNetConfig(char * prefix, struct netConfig * netc, 
  29.            struct netInterface * gwdev, int verbose);
  30. int writeResolvConf(char * prefix, struct netConfig * netc);
  31. int writeHosts(char * prefix, struct netConfig * netc, 
  32.            struct netInterface * intf);
  33. int readNetConfig(char * prefix, struct netConfig * netc);
  34. int addDefaultRoute(struct netConfig netc);
  35. int bringUpNetworking(struct netInterface * intf, struct netConfig * netc,
  36.               struct driversLoaded ** dl);
  37. int checkNetConfig(struct netInterface * intf, struct netConfig * netc,
  38.            struct driversLoaded ** dl);
  39. int netDeviceAvailable(char * device);
  40.  
  41. #endif
  42.