home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3349 / dialup.h next >
Encoding:
C/C++ Source or Header  |  1991-05-17  |  1.6 KB  |  61 lines

  1. /*
  2.  * Copyright 1989, 1990, John F. Haugh II
  3.  * All rights reserved.
  4.  *
  5.  * Permission is granted to copy and create derivative works for any
  6.  * non-commercial purpose, provided this copyright notice is preserved
  7.  * in all copies of source code, or included in human readable form
  8.  * and conspicuously displayed on all copies of object code or
  9.  * distribution media.
  10.  */
  11.  
  12. /*
  13.  * Structure of the /etc/d_passwd file
  14.  *
  15.  *    The d_passwd file contains the names of login shells which require
  16.  *    dialup passwords.  Each line contains the fully qualified path name
  17.  *    for the shell, followed by an optional password.  Each field is
  18.  *    separated by a ':'.
  19.  *
  20.  * Structure of the /etc/dialups file
  21.  *
  22.  *    The dialups file contains the names of ports which may be dialup
  23.  *    lines.  Each line consists of the last component of the path
  24.  *    name.  The leading "/dev/" string is removed.
  25.  *
  26.  *    @(#)dialup.h    3.1    19:44:22    12/10/90
  27.  */
  28.  
  29. #ifndef    _DIALUP_H
  30. #define    _DIALUP_H
  31.  
  32. #include <stdio.h>
  33.  
  34. struct    dialup {
  35.     char    *du_shell;
  36.     char    *du_passwd;
  37. };
  38.  
  39. #ifdef    __STDC__
  40. extern    void    setduent ();
  41. extern    void    endduent ();
  42. extern    struct    dialup    *fgetduent ();
  43. extern    struct    dialup    *getduent ();
  44. extern    struct    dialup    *getdushell ();
  45. extern    int    putduent ();
  46. extern    int    isadialup ();
  47. #else
  48. extern    void    setduent (void);
  49. extern    void    endduent (void);
  50. extern    struct    dialup    *fgetduent (FILE *);
  51. extern    struct    dialup    *getduent (void);
  52. extern    struct    dialup    *getdushell (char *);
  53. extern    int    putduent (struct dialup *, FILE *);
  54. extern    int    isadialup (char *);
  55. #endif
  56.  
  57. #define    DIALPWD    "/etc/d_passwd"
  58. #define    DIALUPS    "/etc/dialups"
  59.  
  60. #endif
  61.