15331Samw /* 25331Samw * CDDL HEADER START 35331Samw * 45331Samw * The contents of this file are subject to the terms of the 55331Samw * Common Development and Distribution License (the "License"). 65331Samw * You may not use this file except in compliance with the License. 75331Samw * 85331Samw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 95331Samw * or http://www.opensolaris.org/os/licensing. 105331Samw * See the License for the specific language governing permissions 115331Samw * and limitations under the License. 125331Samw * 135331Samw * When distributing Covered Code, include this CDDL HEADER in each 145331Samw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 155331Samw * If applicable, add the following below this CDDL HEADER, with the 165331Samw * fields enclosed by brackets "[]" replaced with your own identifying 175331Samw * information: Portions Copyright [yyyy] [name of copyright owner] 185331Samw * 195331Samw * CDDL HEADER END 205331Samw */ 215331Samw /* 22*8334SJose.Borrego@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 235331Samw * Use is subject to license terms. 245331Samw */ 255331Samw 265331Samw #ifndef _BROWSER_H_ 275331Samw #define _BROWSER_H_ 285331Samw 295331Samw /* 305331Samw * NetBIOS name types describe the functionality of the registration. 315331Samw * A following list of NetBIOS suffixes (16th Character of the NetBIOS 325331Samw * Name) is detailed in Microsoft knowledge base article Q163409. 335331Samw * 345331Samw * Name Number(h) Type Usage 355331Samw * -------------------------------------------------------------------------- 365331Samw * <computername> 00 U Workstation Service 375331Samw * <computername> 01 U Messenger Service 385331Samw * <\\--__MSBROWSE__> 01 G Master Browser 395331Samw * <computername> 03 U Messenger Service 405331Samw * <computername> 06 U RAS Server Service 415331Samw * <computername> 1F U NetDDE Service 425331Samw * <computername> 20 U File Server Service 435331Samw * <computername> 21 U RAS Client Service 445331Samw * <computername> 22 U Microsoft Exchange Interchange(MSMail 455331Samw * Connector) 465331Samw * <computername> 23 U Microsoft Exchange Store 475331Samw * <computername> 24 U Microsoft Exchange Directory 485331Samw * <computername> 30 U Modem Sharing Server Service 495331Samw * <computername> 31 U Modem Sharing Client Service 505331Samw * <computername> 43 U SMS Clients Remote Control 515331Samw * <computername> 44 U SMS Administrators Remote Control 525331Samw * Tool 535331Samw * <computername> 45 U SMS Clients Remote Chat 545331Samw * <computername> 46 U SMS Clients Remote Transfer 555331Samw * <computername> 4C U DEC Pathworks TCPIP service on 565331Samw * Windows NT 575331Samw * <computername> 52 U DEC Pathworks TCPIP service on 585331Samw * Windows NT 595331Samw * <computername> 87 U Microsoft Exchange Message Transfer 605331Samw * Agent 615331Samw * <computername> 6A U Microsoft Exchange IMC 625331Samw * <computername> BE U Network Monitor Agent 635331Samw * <computername> BF U Network Monitor Application 645331Samw * <username> 03 U Messenger Service 655331Samw * <domain> 00 G Domain Name 665331Samw * <domain> 1B U Domain Master Browser 675331Samw * <domain> 1C G Domain Controllers 685331Samw * <domain> 1D U Master Browser 695331Samw * <domain> 1E G Browser Service Elections 705331Samw * <INet~Services> 1C G IIS 715331Samw * <IS~computer name> 00 U IIS 725331Samw * <computername> [2B] U Lotus Notes Server Service 735331Samw * IRISMULTICAST [2F] G Lotus Notes 745331Samw * IRISNAMESERVER [33] G Lotus Notes 755331Samw * Forte_$ND800ZA [20] U DCA IrmaLan Gateway Server Service 765331Samw * 775331Samw * Unique (U): The name may have only one IP address assigned to it. On 785331Samw * a network device multiple occurrences of a single name may appear to 795331Samw * be registered. The suffix may be the only unique character in the name. 805331Samw * 815331Samw * Group (G): A normal group; the single name may exist with many IP 825331Samw * addresses. WINS responds to a name query on a group name with the 835331Samw * limited broadcast address (255.255.255.255). Because routers block 845331Samw * the transmission of these addresses, the Internet Group was designed 855331Samw * to service communications between subnets. 865331Samw * 875331Samw * Multihomed (M): The name is unique, but due to multiple network 885331Samw * interfaces on the same computer this configuration is necessary to 895331Samw * permit the registration. The maximum number of addresses is 25. 905331Samw * 915331Samw * Internet Group (I): This is a special configuration of the group name 925331Samw * used to manage Windows NT Domain names. 935331Samw * 945331Samw * Domain Name (D): New in Windows NT 4.0. 955331Samw */ 965331Samw 975331Samw 985331Samw #ifdef __cplusplus 995331Samw extern "C" { 1005331Samw #endif 1015331Samw 1025331Samw 1035331Samw /* 1045331Samw * Message flags used when building the SMB transact headers. 1055331Samw */ 1065331Samw #define TWO_WAY_TRANSACTION 0x00 1075331Samw #define END_SESSION_TRANSACTION 0x01 1085331Samw #define ONE_WAY_TRANSACTION 0x02 1095331Samw 1105331Samw 1115331Samw /* 1125331Samw * Browser commands associated with the BROWSE and MSBROWSE mailslots. 1135331Samw */ 1145331Samw #define HOST_ANNOUNCEMENT 0x01 1155331Samw #define ANNOUNCEMENT_REQUEST 0x02 1165331Samw #define REQUEST_ELECTION 0x08 1175331Samw #define GET_BACKUP_LIST_REQ 0x09 1185331Samw #define GET_BACKUP_LIST_RESP 0x0A 1195331Samw #define BECOME_BACKUP 0x0B 1205331Samw #define DOMAIN_ANNOUNCEMENT 0x0C 1215331Samw #define MASTER_ANNOUNCEMENT 0x0D 1225331Samw #define LOCAL_MASTER_ANNOUNCEMENT 0x0F 1235331Samw 1245331Samw 1255331Samw /* 1265331Samw * Opcodes associated with NETLOGON or NTLOGON mailslots (KB 109626). 1275331Samw * LOGON_REQUEST LM1.0/2.0 LOGON Request from client 1285331Samw * LOGON_RESPONSE LM1.0 Response to LOGON_REQUEST 1295331Samw * LOGON_CENTRAL_QUERY LM1.0 QUERY for centralized init 1305331Samw * LOGON_DISTRIB_QUERY LM1.0 QUERY for non-centralized init 1315331Samw * LOGON_CENTRAL_RESPONSE LM1.0 response to LOGON_CENTRAL_QUERY 1325331Samw * LOGON_DISTRIB_RESPONSE LM1.0 resp to LOGON_DISTRIB_QUERY 1335331Samw * LOGON_RESPONSE2 LM2.0 Response to LOGON_REQUEST 1345331Samw * LOGON_PRIMARY_QUERY QUERY for Primary DC 1355331Samw * LOGON_START_PRIMARY announce startup of Primary DC 1365331Samw * LOGON_FAIL_PRIMARY announce failed Primary DC 1375331Samw * LOGON_UAS_CHANGE announce change to UAS or SAM 1385331Samw * LOGON_NO_USER announce no user on machine 1395331Samw * LOGON_PRIMARY_RESPONSE response to LOGON_PRIMARY_QUERY 1405331Samw * LOGON_RELOGON_RESPONSE LM1.0/2.0 resp to relogon request 1415331Samw * LOGON_WKSTINFO_RESPONSE LM1.0/2.0 resp to interrogate request 1425331Samw * LOGON_PAUSE_RESPONSE LM2.0 resp when NETLOGON is paused 1435331Samw * LOGON_USER_UNKNOWN LM2.0 response when user is unknown 1445331Samw * LOGON_UPDATE_ACCOUNT LM2.1 announce account updates 1455331Samw * LOGON_SAM_LOGON_REQUEST SAM LOGON request from client 1465331Samw * LOGON_SAM_LOGON_RESPONSE SAM Response to SAM logon request 1475331Samw * LOGON_SAM_PAUSE_RESPONSE SAM response when NETLOGON is paused 1485331Samw * LOGON_SAM_USER_UNKNOWN SAM response when user is unknown 1495331Samw * LOGON_SAM_WKSTINFO_RESPONSE SAM response to interrogate request 1505331Samw */ 1515331Samw #define LOGON_REQUEST 0 1525331Samw #define LOGON_RESPONSE 1 1535331Samw #define LOGON_CENTRAL_QUERY 2 1545331Samw #define LOGON_DISTRIB_QUERY 3 1555331Samw #define LOGON_CENTRAL_RESPONSE 4 1565331Samw #define LOGON_DISTRIB_RESPONSE 5 1575331Samw #define LOGON_RESPONSE2 6 1585331Samw #define LOGON_PRIMARY_QUERY 7 1595331Samw #define LOGON_START_PRIMARY 8 1605331Samw #define LOGON_FAIL_PRIMARY 9 1615331Samw #define LOGON_UAS_CHANGE 10 1625331Samw #define LOGON_NO_USER 11 1635331Samw #define LOGON_PRIMARY_RESPONSE 12 1645331Samw #define LOGON_RELOGON_RESPONSE 13 1655331Samw #define LOGON_WKSTINFO_RESPONSE 14 1665331Samw #define LOGON_PAUSE_RESPONSE 15 1675331Samw #define LOGON_USER_UNKNOWN 16 1685331Samw #define LOGON_UPDATE_ACCOUNT 17 1695331Samw #define LOGON_SAM_LOGON_REQUEST 18 1705331Samw #define LOGON_SAM_LOGON_RESPONSE 19 1715331Samw #define LOGON_SAM_PAUSE_RESPONSE 20 1725331Samw #define LOGON_SAM_USER_UNKNOWN 21 1735331Samw #define LOGON_SAM_WKSTINFO_RESPONSE 22 1745331Samw 1755331Samw 1765331Samw /* 1775331Samw * Local protocol flags used to indicate which version of the 1785331Samw * netlogon protocol to use when attempting to find the PDC. 1795331Samw */ 1805331Samw #define NETLOGON_PROTO_NETLOGON 0x01 1815331Samw #define NETLOGON_PROTO_SAMLOGON 0x02 1825331Samw 183*8334SJose.Borrego@Sun.COM typedef struct smb_ntdomain_t { 184*8334SJose.Borrego@Sun.COM char n_domain[SMB_PI_MAX_DOMAIN]; 185*8334SJose.Borrego@Sun.COM char n_name[SMB_PI_MAX_DOMAIN]; 186*8334SJose.Borrego@Sun.COM uint32_t n_ipaddr; 187*8334SJose.Borrego@Sun.COM } smb_ntdomain_t; 188*8334SJose.Borrego@Sun.COM 1895331Samw #ifdef __cplusplus 1905331Samw } 1915331Samw #endif 1925331Samw 1935331Samw 1945331Samw #endif /* _BROWSER_H_ */ 195