home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcp30tkt.zip / PGMG1.ZIP / INCLUDE / NETNB / NB.H
C/C++ Source or Header  |  1995-12-04  |  3KB  |  82 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            */
  11. /*                                                                        */
  12. /*                                                                        */
  13. /********************************************************Copyright.IBM*****/
  14.  
  15. //  F4334  RTW 04-08-94
  16.  
  17. /*
  18. //$Source: u:\src\nb\rcs\NB.H $
  19. //$Date:   10 Jan 1995 10:25:36  $
  20. //$Revision:   1.1  $
  21. //$Locker:  $
  22. //$Log:   T:\tcp20vcs\pgmgkit\ship\include\nb\nb.h_v  $
  23.  *
  24.  *    Rev 1.1   10 Jan 1995 10:25:36   ccw
  25.  * Beautify
  26.  *
  27.  *    Rev 1.0   10 Jan 1995 10:20:40   ccw
  28.  * Initial revision.
  29.  *
  30.  *    Rev 1.1   11 Oct 1994 13:01:14   KFISHER
  31.  * added standard comments around PVCS header info so it will compile
  32.  *
  33.  *    Rev 1.0   06 Oct 1994 13:50:10   SANJAY_KHANNA
  34.  * Initial revision.
  35. //Revision 1.3  91/05/20  11:40:42  unknown
  36. //included headers and test program definition(s)
  37. //
  38. //$Header:   T:\tcp20vcs\pgmgkit\ship\include\nb\nb.h_v   1.1   10 Jan 1995 10:25:36   ccw  $
  39. //
  40. */
  41.  
  42. /*
  43.  *  Protocols
  44.  */
  45.  
  46. #ifndef NB_H
  47. #define NB_H
  48.  
  49. #define NBPROTO_NB      1     /*  NetBIOS protocol    */
  50.  
  51.  
  52. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  53. #define NB_FAMILY       18                   /* temporary */
  54. #define NB_ADDRSIZE     sizeof (struct sockaddr_nb)
  55. #define NB_UNIQUE       0
  56. #define NB_GROUP        1
  57. #define NB_BROAD        2
  58. #define NB_NAMELEN      16
  59. #define NB_NETIDLEN     8
  60. #define NB_HOSTLEN      12
  61. #define NB_PORTLEN      (NB_NAMELEN - NB_HOSTLEN)
  62. #define NB_BCAST_NAME   "*               "      /* Asterisk plus 15 spaces */
  63. #define NB_BLANK_NAME   "                "      // 16 spaces
  64. #define NB_NULL_NAME    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  65.  
  66. //  The following two lines must correspond to IPPORT_RESERVED and
  67. //  IPPORT_USERRESERVED constants defined in in.h
  68. #define NBPORT_RESERVED "1024"
  69. #define NBPORT_USERRESERVED "5000"
  70.  
  71.  
  72. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  73.  
  74.  
  75.    struct  sockaddr_nb {
  76.           short snb_family;                    /*netbios protocol family*/
  77.           short snb_type;                      /* unique or multicast */
  78.           char  snb_netid[NB_NETIDLEN];         /* netbios netid*/
  79.           char  snb_name[NB_NAMELEN];           /* netbios name */
  80.                        };
  81. #endif
  82.