ppp_auth.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* ppp_auth.h - PPP Authentication header */
  2. /* Copyright 1995 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,21jun95,dzb  added externs for unbundling of crypt().
  7. 01c,16jun95,dzb  renamed to ppp_auth.h.  added header file inclusion.
  8. 01b,11may95,dzb  moved in defines from auth.c.  added NONWILD macro.
  9. 01a,19jan95,dzb  written.
  10. */
  11. #ifndef __INCppp_authh
  12. #define __INCppp_authh
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /* includes */
  17. #include "stdio.h"
  18. /* defines */
  19. /* Bits in scan_authfile return value */
  20. #define NONWILD_SERVER  1
  21. #define NONWILD_CLIENT  2
  22. #define NONWILD (NONWILD_SERVER | NONWILD_CLIENT)
  23.  
  24. #define ISWILD(word)    (word[0] == '*' && word[1] == 0)
  25. extern FUNCPTR pppCryptRtn;
  26. /* function declarations */
  27.  
  28. #if defined(__STDC__) || defined(__cplusplus)
  29.   
  30. extern void link_required (int unit);
  31. extern void link_terminated (int unit);
  32. extern void link_down (int unit);
  33. extern void link_established (int unit);
  34. extern void auth_peer_fail (int unit, int protocol);
  35. extern void auth_peer_success (int unit, int protocol);
  36. extern void auth_withpeer_fail (int unit, int protocol);
  37. extern void auth_withpeer_success (int unit, int protocol);
  38. extern void check_auth_options (void);
  39. extern int check_passwd (int unit, char *auser, int userlen, char *apasswd,
  40.                     int passwdlen, char **msg, int *msglen);
  41. extern int get_secret (int unit, char *client, char *server, char *secret,
  42.                     int *secret_len, int save_addrs);
  43. extern int auth_ip_addr (int unit, u_long addr);
  44. extern int bad_ip_adrs (u_long addr);
  45. extern void check_access (FILE *f, char *fileName);
  46. extern void cryptRtnInit (FUNCPTR *cryptRtnHook);
  47. #else /* __STDC__ */
  48. extern void link_required ();
  49. extern void link_terminated ();
  50. extern void link_down ();
  51. extern void link_established ();
  52. extern void auth_peer_fail ();
  53. extern void auth_peer_success ();
  54. extern void auth_withpeer_fail ();
  55. extern void auth_withpeer_success ();
  56. extern void check_auth_options ();
  57. extern int check_passwd ();
  58. extern int get_secret ();
  59. extern int auth_ip_addr ();
  60. extern int bad_ip_adrs ();
  61. extern void check_access ();
  62. extern void cryptRtnInit ();
  63. #endif /* __STDC__ */
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* __INCppp_authh */