00001 /* -------------------------------------------------------------------------------------- 00002 * Copyright (C) 2003 Dallas Semiconductor Corporation, All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Dallas Semiconductor 00023 * shall not be used except as stated in the Dallas Semiconductor 00024 * Branding Policy. 00025 * -------------------------------------------------------------------------------------- 00026 */ 00027 00028 /**************************************************************************************** 00029 * Module Name : NTLM authentication module 00030 * Description : NTLM authentication module function and datastructure declarations 00031 * Filename : ntlm.h 00032 * Compiler : keil C51 Compiler V7.06 00033 * Version : Version 1.0 00034 * Modifications : 00035 * Notes : 00036 ****************************************************************************************/ 00037 00053 #ifndef __rom400_ntlm_ 00054 #define __rom400_ntlm_ 00055 00059 typedef struct _sbufhdr 00060 { 00061 unsigned int len; 00062 unsigned int buflen; 00063 unsigned long start_loc; 00064 }sbufhdr; 00065 00069 typedef struct _type1msghdr 00070 { 00071 char signature[8]; 00072 unsigned long msgtype; 00073 unsigned long flags; 00074 sbufhdr usr; 00075 sbufhdr domain; 00076 }type1msghdr; 00077 00081 typedef struct _type1msg 00082 { 00083 type1msghdr t1hdr; 00084 unsigned char buf[1024]; 00085 unsigned int buf_index; 00086 }type1msg; 00087 00091 typedef struct _type2msghdr 00092 { 00093 char signature[8]; 00094 unsigned long msgtype; 00095 sbufhdr domain; 00096 unsigned long flags; 00097 unsigned char challenge[8]; 00098 unsigned char context[8]; 00099 sbufhdr targetinfo; 00100 }type2msghdr; 00101 00105 typedef struct _type2msg 00106 { 00107 type2msghdr t2hdr; 00108 unsigned char buf[1024]; 00109 unsigned int buf_index; 00110 }type2msg; 00111 00115 typedef struct _type3msghdr 00116 { 00117 char signature[8]; 00118 unsigned long msgtype; 00119 sbufhdr lmresponse; 00120 sbufhdr ntlmresponse; 00121 sbufhdr domain; 00122 sbufhdr usr; 00123 sbufhdr workstation; 00124 sbufhdr session; 00125 unsigned long flags; 00126 }type3msghdr; 00127 00131 typedef struct _type3msg 00132 { 00133 type3msghdr t3hdr; 00134 unsigned char buf[1024]; 00135 unsigned int buf_index; 00136 }type3msg; 00137 00140 #define MAX_NTLM_BUF 1024 00141 00144 #define NTLM_SIGN "NTLMSSP\0" 00145 00148 #define NTLM_TYPE1_MSG 1 00149 00152 #define NTLM_TYPE3_MSG 3 00153 00156 #define NTLM_FLAGS 0x0000b207L 00157 00158 //function prototypes 00170 void generate_type1_msg(type1msg *t1_msg, char *user); 00171 00185 void generate_type3_msg(type2msg *t2_msg, type3msg *t3_msg, char *user, char *pass); 00186 00187 #endif
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |