1*10023SGordon.Ross@Sun.COM /* 2*10023SGordon.Ross@Sun.COM * CDDL HEADER START 3*10023SGordon.Ross@Sun.COM * 4*10023SGordon.Ross@Sun.COM * The contents of this file are subject to the terms of the 5*10023SGordon.Ross@Sun.COM * Common Development and Distribution License (the "License"). 6*10023SGordon.Ross@Sun.COM * You may not use this file except in compliance with the License. 7*10023SGordon.Ross@Sun.COM * 8*10023SGordon.Ross@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*10023SGordon.Ross@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*10023SGordon.Ross@Sun.COM * See the License for the specific language governing permissions 11*10023SGordon.Ross@Sun.COM * and limitations under the License. 12*10023SGordon.Ross@Sun.COM * 13*10023SGordon.Ross@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*10023SGordon.Ross@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*10023SGordon.Ross@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*10023SGordon.Ross@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*10023SGordon.Ross@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*10023SGordon.Ross@Sun.COM * 19*10023SGordon.Ross@Sun.COM * CDDL HEADER END 20*10023SGordon.Ross@Sun.COM */ 21*10023SGordon.Ross@Sun.COM 22*10023SGordon.Ross@Sun.COM /* 23*10023SGordon.Ross@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*10023SGordon.Ross@Sun.COM * Use is subject to license terms. 25*10023SGordon.Ross@Sun.COM */ 26*10023SGordon.Ross@Sun.COM 27*10023SGordon.Ross@Sun.COM #ifndef _NTLM_H 28*10023SGordon.Ross@Sun.COM #define _NTLM_H 29*10023SGordon.Ross@Sun.COM 30*10023SGordon.Ross@Sun.COM /* 31*10023SGordon.Ross@Sun.COM * NTLM support functions 32*10023SGordon.Ross@Sun.COM * See ntlm.c 33*10023SGordon.Ross@Sun.COM */ 34*10023SGordon.Ross@Sun.COM 35*10023SGordon.Ross@Sun.COM /* 36*10023SGordon.Ross@Sun.COM * Size of all LM/NTLM hashes, challenge 37*10023SGordon.Ross@Sun.COM * NTLM_HASH_SZ: 16 bytes (see smb_lib.h) 38*10023SGordon.Ross@Sun.COM * NTLM_CHAL_SZ: 8 bytes (see smb_lib.h) 39*10023SGordon.Ross@Sun.COM */ 40*10023SGordon.Ross@Sun.COM #define NTLM_V1_RESP_SZ 24 /* response size */ 41*10023SGordon.Ross@Sun.COM 42*10023SGordon.Ross@Sun.COM #define NAMETYPE_EOL 0x0000 /* end of list of names */ 43*10023SGordon.Ross@Sun.COM #define NAMETYPE_MACHINE_NB 0x0001 /* NetBIOS machine name */ 44*10023SGordon.Ross@Sun.COM #define NAMETYPE_DOMAIN_NB 0x0002 /* NetBIOS domain name */ 45*10023SGordon.Ross@Sun.COM #define NAMETYPE_MACHINE_DNS 0x0003 /* DNS machine name */ 46*10023SGordon.Ross@Sun.COM #define NAMETYPE_DOMAIN_DNS 0x0004 /* DNS (AD) domain name */ 47*10023SGordon.Ross@Sun.COM 48*10023SGordon.Ross@Sun.COM int 49*10023SGordon.Ross@Sun.COM ntlm_compute_lm_hash(uchar_t *hash, const char *pw); 50*10023SGordon.Ross@Sun.COM 51*10023SGordon.Ross@Sun.COM int 52*10023SGordon.Ross@Sun.COM ntlm_compute_nt_hash(uchar_t *hash, const char *pw); 53*10023SGordon.Ross@Sun.COM 54*10023SGordon.Ross@Sun.COM int 55*10023SGordon.Ross@Sun.COM ntlm_build_target_info(struct smb_ctx *, struct mbuf *, struct mbdata *); 56*10023SGordon.Ross@Sun.COM 57*10023SGordon.Ross@Sun.COM int 58*10023SGordon.Ross@Sun.COM ntlm_put_v1_responses(struct smb_ctx *ctx, 59*10023SGordon.Ross@Sun.COM struct mbdata *lm_mbp, struct mbdata *nt_mbp); 60*10023SGordon.Ross@Sun.COM 61*10023SGordon.Ross@Sun.COM int 62*10023SGordon.Ross@Sun.COM ntlm_put_v2_responses(struct smb_ctx *ctx, struct mbdata *ti_mbp, 63*10023SGordon.Ross@Sun.COM struct mbdata *lm_mbp, struct mbdata *nt_mbp); 64*10023SGordon.Ross@Sun.COM 65*10023SGordon.Ross@Sun.COM #endif /* _NTLM_H */ 66