2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _BROWSER_H_
2N/A#define _BROWSER_H_
2N/A
2N/A/*
2N/A * NetBIOS name types describe the functionality of the registration.
2N/A * A following list of NetBIOS suffixes (16th Character of the NetBIOS
2N/A * Name) is detailed in Microsoft knowledge base article Q163409.
2N/A *
2N/A * Name Number(h) Type Usage
2N/A * --------------------------------------------------------------------------
2N/A * <computername> 00 U Workstation Service
2N/A * <computername> 01 U Messenger Service
2N/A * <\\--__MSBROWSE__> 01 G Master Browser
2N/A * <computername> 03 U Messenger Service
2N/A * <computername> 06 U RAS Server Service
2N/A * <computername> 1F U NetDDE Service
2N/A * <computername> 20 U File Server Service
2N/A * <computername> 21 U RAS Client Service
2N/A * <computername> 22 U Microsoft Exchange Interchange(MSMail
2N/A * Connector)
2N/A * <computername> 23 U Microsoft Exchange Store
2N/A * <computername> 24 U Microsoft Exchange Directory
2N/A * <computername> 30 U Modem Sharing Server Service
2N/A * <computername> 31 U Modem Sharing Client Service
2N/A * <computername> 43 U SMS Clients Remote Control
2N/A * <computername> 44 U SMS Administrators Remote Control
2N/A * Tool
2N/A * <computername> 45 U SMS Clients Remote Chat
2N/A * <computername> 46 U SMS Clients Remote Transfer
2N/A * <computername> 4C U DEC Pathworks TCPIP service on
2N/A * Windows NT
2N/A * <computername> 52 U DEC Pathworks TCPIP service on
2N/A * Windows NT
2N/A * <computername> 87 U Microsoft Exchange Message Transfer
2N/A * Agent
2N/A * <computername> 6A U Microsoft Exchange IMC
2N/A * <computername> BE U Network Monitor Agent
2N/A * <computername> BF U Network Monitor Application
2N/A * <username> 03 U Messenger Service
2N/A * <domain> 00 G Domain Name
2N/A * <domain> 1B U Domain Master Browser
2N/A * <domain> 1C G Domain Controllers
2N/A * <domain> 1D U Master Browser
2N/A * <domain> 1E G Browser Service Elections
2N/A * <INet~Services> 1C G IIS
2N/A * <IS~computer name> 00 U IIS
2N/A * <computername> [2B] U Lotus Notes Server Service
2N/A * IRISMULTICAST [2F] G Lotus Notes
2N/A * IRISNAMESERVER [33] G Lotus Notes
2N/A * Forte_$ND800ZA [20] U DCA IrmaLan Gateway Server Service
2N/A *
2N/A * Unique (U): The name may have only one IP address assigned to it. On
2N/A * a network device multiple occurrences of a single name may appear to
2N/A * be registered. The suffix may be the only unique character in the name.
2N/A *
2N/A * Group (G): A normal group; the single name may exist with many IP
2N/A * addresses. WINS responds to a name query on a group name with the
2N/A * limited broadcast address (255.255.255.255). Because routers block
2N/A * the transmission of these addresses, the Internet Group was designed
2N/A * to service communications between subnets.
2N/A *
2N/A * Multihomed (M): The name is unique, but due to multiple network
2N/A * interfaces on the same computer this configuration is necessary to
2N/A * permit the registration. The maximum number of addresses is 25.
2N/A *
2N/A * Internet Group (I): This is a special configuration of the group name
2N/A * used to manage Windows NT Domain names.
2N/A *
2N/A * Domain Name (D): New in Windows NT 4.0.
2N/A */
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A
2N/A/*
2N/A * Message flags used when building the SMB transact headers.
2N/A */
2N/A#define TWO_WAY_TRANSACTION 0x00
2N/A#define END_SESSION_TRANSACTION 0x01
2N/A#define ONE_WAY_TRANSACTION 0x02
2N/A
2N/A
2N/A/*
2N/A * Browser commands associated with the BROWSE and MSBROWSE mailslots.
2N/A */
2N/A#define HOST_ANNOUNCEMENT 0x01
2N/A#define ANNOUNCEMENT_REQUEST 0x02
2N/A#define REQUEST_ELECTION 0x08
2N/A#define GET_BACKUP_LIST_REQ 0x09
2N/A#define GET_BACKUP_LIST_RESP 0x0A
2N/A#define BECOME_BACKUP 0x0B
2N/A#define DOMAIN_ANNOUNCEMENT 0x0C
2N/A#define MASTER_ANNOUNCEMENT 0x0D
2N/A#define LOCAL_MASTER_ANNOUNCEMENT 0x0F
2N/A
2N/A
2N/A/*
2N/A * Opcodes associated with NETLOGON or NTLOGON mailslots (KB 109626).
2N/A * LOGON_REQUEST LM1.0/2.0 LOGON Request from client
2N/A * LOGON_RESPONSE LM1.0 Response to LOGON_REQUEST
2N/A * LOGON_CENTRAL_QUERY LM1.0 QUERY for centralized init
2N/A * LOGON_DISTRIB_QUERY LM1.0 QUERY for non-centralized init
2N/A * LOGON_CENTRAL_RESPONSE LM1.0 response to LOGON_CENTRAL_QUERY
2N/A * LOGON_DISTRIB_RESPONSE LM1.0 resp to LOGON_DISTRIB_QUERY
2N/A * LOGON_RESPONSE2 LM2.0 Response to LOGON_REQUEST
2N/A * LOGON_PRIMARY_QUERY QUERY for Primary DC
2N/A * LOGON_START_PRIMARY announce startup of Primary DC
2N/A * LOGON_FAIL_PRIMARY announce failed Primary DC
2N/A * LOGON_UAS_CHANGE announce change to UAS or SAM
2N/A * LOGON_NO_USER announce no user on machine
2N/A * LOGON_PRIMARY_RESPONSE response to LOGON_PRIMARY_QUERY
2N/A * LOGON_RELOGON_RESPONSE LM1.0/2.0 resp to relogon request
2N/A * LOGON_WKSTINFO_RESPONSE LM1.0/2.0 resp to interrogate request
2N/A * LOGON_PAUSE_RESPONSE LM2.0 resp when NETLOGON is paused
2N/A * LOGON_USER_UNKNOWN LM2.0 response when user is unknown
2N/A * LOGON_UPDATE_ACCOUNT LM2.1 announce account updates
2N/A * LOGON_SAM_LOGON_REQUEST SAM LOGON request from client
2N/A * LOGON_SAM_LOGON_RESPONSE SAM Response to SAM logon request
2N/A * LOGON_SAM_PAUSE_RESPONSE SAM response when NETLOGON is paused
2N/A * LOGON_SAM_USER_UNKNOWN SAM response when user is unknown
2N/A * LOGON_SAM_WKSTINFO_RESPONSE SAM response to interrogate request
2N/A */
2N/A#define LOGON_REQUEST 0
2N/A#define LOGON_RESPONSE 1
2N/A#define LOGON_CENTRAL_QUERY 2
2N/A#define LOGON_DISTRIB_QUERY 3
2N/A#define LOGON_CENTRAL_RESPONSE 4
2N/A#define LOGON_DISTRIB_RESPONSE 5
2N/A#define LOGON_RESPONSE2 6
2N/A#define LOGON_PRIMARY_QUERY 7
2N/A#define LOGON_START_PRIMARY 8
2N/A#define LOGON_FAIL_PRIMARY 9
2N/A#define LOGON_UAS_CHANGE 10
2N/A#define LOGON_NO_USER 11
2N/A#define LOGON_PRIMARY_RESPONSE 12
2N/A#define LOGON_RELOGON_RESPONSE 13
2N/A#define LOGON_WKSTINFO_RESPONSE 14
2N/A#define LOGON_PAUSE_RESPONSE 15
2N/A#define LOGON_USER_UNKNOWN 16
2N/A#define LOGON_UPDATE_ACCOUNT 17
2N/A#define LOGON_SAM_LOGON_REQUEST 18
2N/A#define LOGON_SAM_LOGON_RESPONSE 19
2N/A#define LOGON_SAM_PAUSE_RESPONSE 20
2N/A#define LOGON_SAM_USER_UNKNOWN 21
2N/A#define LOGON_SAM_WKSTINFO_RESPONSE 22
2N/A
2N/A
2N/A/*
2N/A * Local protocol flags used to indicate which version of the
2N/A * netlogon protocol to use when attempting to find the PDC.
2N/A */
2N/A#define NETLOGON_PROTO_NETLOGON 0x01
2N/A#define NETLOGON_PROTO_SAMLOGON 0x02
2N/A
2N/Atypedef struct smb_ntdomain_t {
2N/A char n_domain[SMB_PI_MAX_DOMAIN];
2N/A char n_name[SMB_PI_MAX_DOMAIN];
2N/A uint32_t n_ipaddr;
2N/A} smb_ntdomain_t;
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A
2N/A#endif /* _BROWSER_H_ */