home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lansystk.zip / INCLUDE / MPTN / NETNB / NB.H
C/C++ Source or Header  |  1998-05-08  |  2KB  |  59 lines

  1. /********************************************************Copyright.IBM*****/
  2. /*                                                                        */
  3. /*                                                                        */
  4. /*      Multi-Protocol Transport Services                                 */
  5. /*                                                                        */
  6. /*      Licensed Materials - Property of IBM (R)                          */
  7. /*      5622-069                                                          */
  8. /*      (C) Copyright IBM Corp. 1993, All right reserved.                 */
  9. /*      US Government Users Restricted Rights - Use, duplication,         */
  10. /*      disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */
  11. /*                                                                        */
  12. /********************************************************Copyright.IBM*****/
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. /*
  20.  *  Protocols
  21.  */
  22.  
  23. #ifndef MPTNNB
  24. #define MPTNNB
  25.  
  26. #define NBPROTO_NB      1     /*  NetBIOS protocol    */
  27.  
  28.  
  29. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  30. #define NB_FAMILY       18
  31. #define NB_ADDRSIZE     sizeof (struct sockaddr_nb)
  32. #define NB_UNIQUE       0
  33. #define NB_GROUP        1
  34. #define NB_BROAD        2
  35. #define NB_NAMELEN      16
  36. #define NB_NETIDLEN     8
  37. #define NB_HOSTLEN      12
  38. #define NB_PORTLEN      (NB_NAMELEN - NB_HOSTLEN)
  39. #define NB_BCAST_NAME   "*               "  /* Asterisk plus 15 spaces */
  40. #define NB_BLANK_NAME   "                "  // 16 spaces
  41. #define NB_NULL_NAME    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  42.  
  43. //  The following two lines must correspond to IPPORT_RESERVED and
  44. //  IPPORT_USERRESERVED constants defined in in.h
  45. #define NBPORT_RESERVED "1024"
  46. #define NBPORT_USERRESERVED "5000"
  47.  
  48.  
  49. /* DEFINITION OF NETBIOS ADDRESS FORMAT */
  50.  
  51.  
  52.    struct  sockaddr_nb {
  53.           short snb_family;                    /*netbios protocol family*/
  54.           short snb_type;                      /* unique or multicast */
  55.           char  snb_netid[NB_NETIDLEN];         /* netbios netid*/
  56.           char  snb_name[NB_NAMELEN];           /* netbios name */
  57.                        };
  58. #endif /* MPTNNB */
  59.