home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / PCMCIA / CLDFM / CARD_ID.C next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  2.5 KB  |  90 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /**************************************************************************
  13.  *
  14.  * SOURCE FILE NAME = CARD_ID
  15.  *
  16.  * DESCRIPTIVE NAME =
  17.  *
  18.  *
  19.  * VERSION =
  20.  *
  21.  * DATE
  22.  *
  23.  * DESCRIPTION
  24.  *
  25.  *
  26.  * FUNCTIONS
  27.  *
  28.  * ENTRY POINTS:
  29.  *
  30.  * DEPENDENCIES:
  31.  *
  32.  * NOTES
  33.  *
  34.  *
  35.  * STRUCTURES
  36.  *
  37.  * EXTERNAL REFERENCES
  38.  *
  39.  * EXTERNAL FUNCTIONS
  40.  *
  41. */
  42.  
  43. #include "types.h"
  44. #include "card_id.h"
  45.  
  46.    /*
  47.    ** private global variables
  48.    */
  49. static UCHAR modem_id[CARD_ID_LEN] = {0x49, 0x6e, 0x74, 0x65, 0x6c, 0x00,
  50.                                       0x4d, 0x4f, 0x44, 0x45, 0x4d, 0x20,
  51.                                       0x32, 0x34, 0x30, 0x30, 0x2b, 0x00,
  52.                                       0x69, 0x4e, 0x43, 0x31, 0x31, 0x30,
  53.                                       0x55, 0x53, 0x00, 0x43, 0x4f, 0x4d,
  54.                                       0x50, 0x41, 0x54, 0x49, 0x42, 0x4c,
  55.                                       0x45, 0x20, 0x49, 0x42, 0x4d, 0x20,
  56.                                       0x43, 0x6f, 0x72, 0x70, 0x2e};
  57.  
  58.  
  59. /****************************************************************************
  60.  *
  61.  * FUNCTION NAME = correct_card_id
  62.  *
  63.  * DESCRIPTION   =
  64.  *
  65.  * INPUT         =
  66.  *
  67.  * OUTPUT        =
  68.  *
  69.  * RETURN-NORMAL =
  70.  *
  71.  * RETURN-ERROR  =
  72.  *
  73.  ****************************************************************************/
  74.  
  75. BOOL correct_card_id(UCHAR far *dataP)
  76. {
  77.     USHORT i;
  78.  
  79.     for (i = 0; i <= CARD_ID_LEN - 1; i++)
  80.     {
  81.         if (*(dataP + i) != modem_id[i])
  82.             break;
  83.     }
  84.  
  85.     if (i == CARD_ID_LEN)
  86.         return(TRUE);
  87.  
  88.     return(FALSE);
  89. }
  90.