home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / stack16 / netnb / nb.h
C/C++ Source or Header  |  1999-05-11  |  3KB  |  84 lines

  1. /********************************************************Copyright.IBM*****/
  2. /*                                                                        */
  3. /*                                                                        */
  4. /*                                                                        */
  5. /*    OCO Source Materials                                                */
  6. /*    IBM Confidential (IBM Confidential-Restricted when combined         */
  7. /*    with the aggregated OCO source modules for this program)            */
  8. /*                                                                        */
  9. /*    5622-069                                                            */
  10. /*    (C) Copyright International Business Machines Corp. 1993, 1996      */
  11. /*                                                                        */
  12. /*                                                                        */
  13. /********************************************************Copyright.IBM*****/
  14.  
  15. /*  F4334  RTW 04-08-94
  16.  
  17. $Source: u:\src\nb\rcs\NB.H $
  18. $Date:   11 Apr 1996 11:10:36  $
  19. $Revision:   1.1  $
  20. $Locker:  $
  21. $Log:   T:\tcp20vcs\pgmgkit\ship\include\nb\nb.h_v  $
  22.  *
  23.  *    F11495    11 Apr 1996 11:10:36   MERIDETH NORRIS
  24.  * Replace // comments with /* comments
  25.  *
  26.  *
  27.  *    Rev 1.1   10 Jan 1995 10:25:36   ccw
  28.  * Beautify
  29.  *
  30.  *    Rev 1.0   10 Jan 1995 10:20:40   ccw
  31.  * Initial revision.
  32.  *
  33.  *    Rev 1.1   11 Oct 1994 13:01:14   KFISHER
  34.  * added standard comments around PVCS header info so it will compile
  35.  *
  36.  *    Rev 1.0   06 Oct 1994 13:50:10   SANJAY_KHANNA
  37.  * Initial revision.
  38. Revision 1.3  91/05/20  11:40:42  unknown
  39. included headers and test program definition(s)
  40.  
  41. $Header:   T:\tcp20vcs\pgmgkit\ship\include\nb\nb.h_v   1.1   10 Jan 1995 10:25:36   ccw  $
  42. */
  43.  
  44. /*
  45.  *  Protocols
  46.  */
  47.  
  48. #ifndef NB_H
  49. #define NB_H
  50.  
  51. #define NBPROTO_NB      1     /*  NetBIOS protocol    */
  52.  
  53.  
  54. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  55. #define NB_FAMILY       18                   /* temporary */
  56. #define NB_ADDRSIZE     sizeof (struct sockaddr_nb)
  57. #define NB_UNIQUE       0
  58. #define NB_GROUP        1
  59. #define NB_BROAD        2
  60. #define NB_NAMELEN      16
  61. #define NB_NETIDLEN     8
  62. #define NB_HOSTLEN      12
  63. #define NB_PORTLEN      (NB_NAMELEN - NB_HOSTLEN)
  64. #define NB_BCAST_NAME   "*               "      /* Asterisk plus 15 spaces */
  65. #define NB_BLANK_NAME   "                "      // 16 spaces
  66. #define NB_NULL_NAME    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  67.  
  68. //  The following two lines must correspond to IPPORT_RESERVED and
  69. //  IPPORT_USERRESERVED constants defined in in.h
  70. #define NBPORT_RESERVED "1024"
  71. #define NBPORT_USERRESERVED "5000"
  72.  
  73.  
  74. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  75.  
  76.  
  77.    struct  sockaddr_nb {
  78.           short snb_family;                    /*netbios protocol family*/
  79.           short snb_type;                      /* unique or multicast */
  80.           char  snb_netid[NB_NETIDLEN];         /* netbios netid*/
  81.           char  snb_name[NB_NAMELEN];           /* netbios name */
  82.                        };
  83. #endif
  84.