home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Telnet 2.7b5 / source / parse / tnae.h < prev    next >
Encoding:
Text File  |  1994-06-21  |  4.0 KB  |  66 lines  |  [TEXT/CWIE]

  1. #define authType 'TNae'                    /* auth/encrypt module resource type */
  2. #define moduleType 'TNae'                /* auth/encrypt module file type */
  3.  
  4. #define NTMPAIRS    10                    /* max type/modifier pairs */
  5.  
  6. #define    IAC    255
  7. #define    SB    250
  8. #define    SE    240
  9.  
  10. #define BOGUS 0x50015001
  11.  
  12. /*
  13.  * Kerberos, encryption
  14.  */
  15. #define OPT_AUTHENTICATION 37
  16. #define OPT_ENCRYPT 38
  17.  
  18. #define KRB_REJECT        1        /* Rejected (reason might follow) */
  19. #define KRB_AUTH        0        /* Authentication data follows */
  20. #define KRB_ACCEPT        2        /* Accepted */
  21. #define KRB_CHALLENGE    3        /* Challenge for mutual auth */
  22. #define KRB_RESPONSE    4        /* Response for mutual auth */
  23.  
  24. #define TNQ_IS            0        /* Option is ... */
  25. #define TNQ_SEND        1        /* send option */
  26. #define TNQ_REPLY        2        /* suboption reply */
  27. #define TNQ_NAME        3        /* suboption name */
  28.  
  29. /*
  30. * AUTHENTICATION option types
  31. */
  32. #define AUTH_NULL        0      /* no authentication */
  33. #define AUTH_KERBEROS_V4 1      /* Kerberos version 4 */
  34. #define AUTH_KERBEROS_V5 2      /* Kerberos version 5 */
  35.  
  36. /*
  37. * AUTHENTICATION option modifiers
  38. */
  39. #define AUTH_WHO_MASK         1
  40. #define AUTH_CLIENT_TO_SERVER 0
  41. #define AUTH_SERVER_TO_CLIENT 1
  42. #define AUTH_HOW_MASK         2
  43. #define AUTH_HOW_ONE_WAY      0
  44. #define AUTH_HOW_MUTUAL       2
  45.  
  46. /*
  47.  * suboption buffer offsets 
  48.  */
  49. #define SB_OPTION    0            /* option byte */
  50. #define SB_SUBOPTION 1          /* is, send, reply, name */
  51. #define SB_TYPE      2          /* authentication type */
  52. #define SB_MODIFIER  3          /* type modifier */
  53. #define SB_DATATYPE  4          /* type of data */
  54. #define SB_DATA      5          /* offset to first data byte */
  55.  
  56. /*
  57.  * ENCRYPTION suboptions
  58.  */
  59. #define    ENCRYPT_IS            0    /* I pick encryption type ... */
  60. #define    ENCRYPT_SUPPORT        1    /* I support encryption types ... */
  61. #define    ENCRYPT_REPLY        2    /* Initial setup response */
  62. #define    ENCRYPT_START        3    /* Am starting to send encrypted */
  63. #define    ENCRYPT_END            4    /* Am ending encrypted */
  64. #define    ENCRYPT_REQSTART    5    /* Request you start encrypting */
  65. #define    ENCRYPT_REQEND        6    /* Request you send encrypting */
  66. #define    ENCRYPT_ENC_KEYID