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

VxWorks

开发平台:

C/C++

  1. /* pppShow.h - ppp show routine header */
  2. /* Copyright 1995 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,16jun95,dzb  header file consolidation.
  7. 01c,09may95,dzb  added pppSecretShow() prototype.
  8. 01b,09feb95,dab  removed lcp_echo_fails_reached variable.
  9. 01a,13jan95,dab  written as pppInfo.h.
  10.    +dzb  added: path for ppp header files, WRS copyright.  WRSize.
  11. */
  12. #ifndef __INCpppShowh
  13. #define __INCpppShowh
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /* includes */
  18. #include "netinet/ppp/pppd.h"
  19. /* typedefs */
  20. typedef struct ppp_info /* PPP_INFO */
  21.     {
  22.     /* LCP variables */
  23.     lcp_options lcp_wantoptions; /* Options that we want to request */
  24.     lcp_options lcp_gotoptions; /* Options that peer ack'd */
  25.     lcp_options lcp_allowoptions; /* Options we allow peer to request */
  26.     lcp_options lcp_hisoptions; /* Options that we ack'd */
  27.     fsm lcp_fsm; /* LCP state structure */
  28.     u_long lcp_echos_pending; /* Number of outstanding echo msgs */
  29.     u_long lcp_echo_number; /* ID number of next echo frame */
  30.     u_long lcp_echo_timer_running; /* TRUE if a timer running */
  31.     u_long lcp_echo_interval; /* Seconds between intervals */
  32.     u_long lcp_echo_fails; /* Number of echo failures */
  33.     /* IPCP variables */
  34.     ipcp_options ipcp_wantoptions; /* Options that we want to request */
  35.     ipcp_options ipcp_gotoptions; /* Options that peer ack'd */
  36.     ipcp_options ipcp_allowoptions; /* Options we allow peer to request */
  37.     ipcp_options ipcp_hisoptions; /* Options that we ack'd */
  38.     fsm ipcp_fsm; /* IPCP state structure */
  39.     /* authentication variables */
  40.     chap_state chap; /* CHAP state and variable structure */
  41.     upap_state upap; /* UPAP state and variable structure */
  42.     } PPP_INFO;
  43. typedef struct ppp_stat /* PPP_STAT */
  44.     {
  45. /* RECEVIED: */
  46.     int in_bytes; /* total number of bytes */
  47.     int in_pkt; /* total number of packets */
  48.     int in_ip_pkt; /* number of IP packets */
  49.     int in_vj_compr_pkt; /* number of VJ compressed packets */
  50.     int in_vj_uncompr_pkt; /* number of VJ uncompressed packets */
  51.     int in_vj_compr_error; /* number of VJ compression errors */
  52.                                         /* SENT: */
  53.     int out_bytes; /* total number of bytes */
  54.     int out_pkt; /* total number of packets */
  55.     int out_ip_pkt; /* number of IP packets */
  56.     int out_vj_compr_pkt; /* number of VJ compressed packets */
  57.     int out_vj_uncompr_pkt; /* number of VJ uncompressed packets */
  58.     } PPP_STAT;
  59. /* function declarations */
  60. #if defined(__STDC__) || defined(__cplusplus)
  61. extern void pppShowInit (void);
  62. extern void pppInfoShow (void);
  63. extern STATUS pppInfoGet (int unit, PPP_INFO *pInfo);
  64. extern void pppstatShow (void);
  65. extern STATUS pppstatGet (int unit, PPP_STAT *pStat);
  66. extern void pppSecretGet (void);
  67. #else /* __STDC__ */
  68. extern void pppShowInit ();
  69. extern void pppInfoShow ();
  70. extern STATUS pppInfoGet ();
  71. extern void pppstatShow ();
  72. extern STATUS pppstatGet ();
  73. extern void pppSecretGet ();
  74. #endif /* __STDC__ */
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif /* __INCpppShowh */