1 /* ntlm.h header file for libntlm -*- c -*-
3 * This file is part of libntlm.
5 * Libntlm is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * Libntlm is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with libntlm; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #if 0 /* keep Emacsens's auto-indent happy */
31 typedef unsigned short uint16;
32 typedef unsigned int uint32;
33 typedef unsigned char uint8;
35 #define NTLM_VERSION "@PACKAGE_VERSION@"
38 * These structures are byte-order dependant, and should not
39 * be manipulated except by the use of the routines provided
64 tSmbStrHeader uDomain;
66 uint8 challengeData[8];
68 tSmbStrHeader emptyString;
71 }tSmbNtlmAuthChallenge;
78 tSmbStrHeader lmResponse;
79 tSmbStrHeader ntResponse;
80 tSmbStrHeader uDomain;
83 tSmbStrHeader sessionKey;
87 }tSmbNtlmAuthResponse;
91 #define SmbLength(ptr) (((ptr)->buffer - (uint8*)(ptr)) + (ptr)->bufIndex)
93 extern void dumpSmbNtlmAuthRequest(FILE *fp, tSmbNtlmAuthRequest *request);
94 extern void dumpSmbNtlmAuthChallenge(FILE *fp, tSmbNtlmAuthChallenge *challenge);
95 extern void dumpSmbNtlmAuthResponse(FILE *fp, tSmbNtlmAuthResponse *response);
97 extern void buildSmbNtlmAuthRequest(tSmbNtlmAuthRequest *request, char *user, char *domain);
98 extern void buildSmbNtlmAuthResponse(tSmbNtlmAuthChallenge *challenge, tSmbNtlmAuthResponse *response, char *user, char *password);