FreeTDS API

Loading...
Searching...
No Matches
proto.h
1/* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2 * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Brian Bruns
3 * Copyright (C) 2010, 2011 Frediano Ziglio
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/*
22 * This file contains defines and structures strictly related to TDS protocol
23 */
24
25 typedef struct tdsnumeric
26{
27 unsigned char precision;
28 unsigned char scale;
29 unsigned char array[33];
30} TDS_NUMERIC;
31
32 typedef struct tdsoldmoney
33{
34 TDS_INT mnyhigh;
35 TDS_UINT mnylow;
36} TDS_OLD_MONEY;
37
38 typedef union tdsmoney
39{
40 TDS_OLD_MONEY tdsoldmoney;
41 TDS_INT8 mny;
42} TDS_MONEY;
43
44 typedef struct tdsmoney4
45{
46 TDS_INT mny4;
47} TDS_MONEY4;
48
49 typedef struct tdsdatetime
50{
51 TDS_INT dtdays;
52 TDS_INT dttime;
53} TDS_DATETIME;
54
55 typedef struct tdsdatetime4
56{
57 TDS_USMALLINT days;
58 TDS_USMALLINT minutes;
59} TDS_DATETIME4;
60
61 typedef struct tdsunique
62{
63 TDS_UINT Data1;
64 TDS_USMALLINT Data2;
65 TDS_USMALLINT Data3;
66 TDS_UCHAR Data4[8];
67} TDS_UNIQUE;
68
69 typedef TDS_INT TDS_DATE;
70 typedef TDS_INT TDS_TIME;
71
72 typedef TDS_UINT8 TDS_BIGTIME;
73 typedef TDS_UINT8 TDS_BIGDATETIME;
74
75#define TDS5_PARAMFMT2_TOKEN 32 /* 0x20 */
76#define TDS_LANGUAGE_TOKEN 33 /* 0x21 TDS 5.0 only */
77#define TDS_ORDERBY2_TOKEN 34 /* 0x22 */
78#define TDS_ROWFMT2_TOKEN 97 /* 0x61 TDS 5.0 only */
79#define TDS_MSG_TOKEN 101 /* 0x65 TDS 5.0 only */
80#define TDS_LOGOUT_TOKEN 113 /* 0x71 TDS 5.0 only? ct_close() */
81#define TDS_RETURNSTATUS_TOKEN 121 /* 0x79 */
82#define TDS_PROCID_TOKEN 124 /* 0x7C TDS 4.2 only - TDS_PROCID */
83#define TDS7_RESULT_TOKEN 129 /* 0x81 TDS 7.0 only */
84#define TDS7_COMPUTE_RESULT_TOKEN 136 /* 0x88 TDS 7.0 only */
85#define TDS_COLNAME_TOKEN 160 /* 0xA0 TDS 4.2 only */
86#define TDS_COLFMT_TOKEN 161 /* 0xA1 TDS 4.2 only - TDS_COLFMT */
87#define TDS_DYNAMIC2_TOKEN 163 /* 0xA3 */
88#define TDS_TABNAME_TOKEN 164 /* 0xA4 */
89#define TDS_COLINFO_TOKEN 165 /* 0xA5 */
90#define TDS_OPTIONCMD_TOKEN 166 /* 0xA6 */
91#define TDS_COMPUTE_NAMES_TOKEN 167 /* 0xA7 */
92#define TDS_COMPUTE_RESULT_TOKEN 168 /* 0xA8 */
93#define TDS_ORDERBY_TOKEN 169 /* 0xA9 TDS_ORDER */
94#define TDS_ERROR_TOKEN 170 /* 0xAA */
95#define TDS_INFO_TOKEN 171 /* 0xAB */
96#define TDS_PARAM_TOKEN 172 /* 0xAC RETURNVALUE? */
97#define TDS_LOGINACK_TOKEN 173 /* 0xAD */
98#define TDS_CONTROL_FEATUREEXTACK_TOKEN \
99 174 /* 0xAE TDS_CONTROL/TDS_FEATUREEXTACK */
100#define TDS_ROW_TOKEN 209 /* 0xD1 */
101#define TDS_NBC_ROW_TOKEN 210 /* 0xD2 as of TDS 7.3.B */
102#define TDS_CMP_ROW_TOKEN 211 /* 0xD3 */
103#define TDS5_PARAMS_TOKEN 215 /* 0xD7 TDS 5.0 only */
104#define TDS_CAPABILITY_TOKEN 226 /* 0xE2 */
105#define TDS_ENVCHANGE_TOKEN 227 /* 0xE3 */
106#define TDS_SESSIONSTATE_TOKEN 228 /* 0xE4 TDS 7.4 */
107#define TDS_EED_TOKEN 229 /* 0xE5 */
108#define TDS_DBRPC_TOKEN 230 /* 0xE6 TDS 5.0 only */
109#define TDS5_DYNAMIC_TOKEN 231 /* 0xE7 TDS 5.0 only */
110#define TDS5_PARAMFMT_TOKEN 236 /* 0xEC TDS 5.0 only */
111#define TDS_AUTH_TOKEN 237 /* 0xED TDS 7.0 only */
112#define TDS_RESULT_TOKEN 238 /* 0xEE */
113#define TDS_DONE_TOKEN 253 /* 0xFD TDS_DONE */
114#define TDS_DONEPROC_TOKEN 254 /* 0xFE TDS_DONEPROC */
115#define TDS_DONEINPROC_TOKEN 255 /* 0xFF TDS_DONEINPROC */
116
117/* CURSOR support: TDS 5.0 only*/
118#define TDS_CURCLOSE_TOKEN 128 /* 0x80 TDS 5.0 only */
119#define TDS_CURDELETE_TOKEN 129 /* 0x81 TDS 5.0 only */
120#define TDS_CURFETCH_TOKEN 130 /* 0x82 TDS 5.0 only */
121#define TDS_CURINFO_TOKEN 131 /* 0x83 TDS 5.0 only */
122#define TDS_CUROPEN_TOKEN 132 /* 0x84 TDS 5.0 only */
123#define TDS_CURDECLARE_TOKEN 134 /* 0x86 TDS 5.0 only */
124
125
126/* environment type field */
127#define TDS_ENV_DATABASE 1
128#define TDS_ENV_LANG 2
129#define TDS_ENV_CHARSET 3
130#define TDS_ENV_PACKSIZE 4
131#define TDS_ENV_LCID 5
132#define TDS_ENV_SQLCOLLATION 7
133#define TDS_ENV_BEGINTRANS 8
134#define TDS_ENV_COMMITTRANS 9
135#define TDS_ENV_ROLLBACKTRANS 10
136#define TDS_ENV_ROUTING 20
137
138/* Microsoft internal stored procedure id's */
139#define TDS_SP_CURSOR 1
140#define TDS_SP_CURSOROPEN 2
141#define TDS_SP_CURSORPREPARE 3
142#define TDS_SP_CURSOREXECUTE 4
143#define TDS_SP_CURSORPREPEXEC 5
144#define TDS_SP_CURSORUNPREPARE 6
145#define TDS_SP_CURSORFETCH 7
146#define TDS_SP_CURSOROPTION 8
147#define TDS_SP_CURSORCLOSE 9
148#define TDS_SP_EXECUTESQL 10
149#define TDS_SP_PREPARE 11
150#define TDS_SP_EXECUTE 12
151#define TDS_SP_PREPEXEC 13
152#define TDS_SP_PREPEXECRPC 14
153#define TDS_SP_UNPREPARE 15
154
155/*
156 * <rant> Sybase does an awful job of this stuff, non null ints of size 1 2
157 * and 4 have there own codes but nullable ints are lumped into INTN
158 * sheesh! </rant>
159 */
160 typedef enum
161{
162 SYBCHAR = 47, /* 0x2F */
163 SYBVARCHAR = 39, /* 0x27 */
164 SYBINTN = 38, /* 0x26 */
165 SYBINT1 = 48, /* 0x30 */
166 SYBINT2 = 52, /* 0x34 */
167 SYBINT4 = 56, /* 0x38 */
168 SYBFLT8 = 62, /* 0x3E */
169 SYBDATETIME = 61, /* 0x3D */
170 SYBBIT = 50, /* 0x32 */
171 SYBTEXT = 35, /* 0x23 */
172 SYBNTEXT = 99, /* 0x63 */
173 SYBIMAGE = 34, /* 0x22 */
174 SYBMONEY4 = 122, /* 0x7A */
175 SYBMONEY = 60, /* 0x3C */
176 SYBDATETIME4 = 58, /* 0x3A */
177 SYBREAL = 59, /* 0x3B */
178 SYBBINARY = 45, /* 0x2D */
179 SYBVOID = 31, /* 0x1F */
180 SYBVARBINARY = 37, /* 0x25 */
181 SYBBITN = 104, /* 0x68 */
182 SYBNUMERIC = 108, /* 0x6C */
183 SYBDECIMAL = 106, /* 0x6A */
184 SYBFLTN = 109, /* 0x6D */
185 SYBMONEYN = 110, /* 0x6E */
186 SYBDATETIMN = 111, /* 0x6F */
187
188/*
189 * MS only types
190 */
191 SYBNVARCHAR = 103, /* 0x67 */
192 SYBINT8 = 127, /* 0x7F */
193 XSYBCHAR = 175, /* 0xAF */
194 XSYBVARCHAR = 167, /* 0xA7 */
195 XSYBNVARCHAR = 231, /* 0xE7 */
196 XSYBNCHAR = 239, /* 0xEF */
197 XSYBVARBINARY = 165, /* 0xA5 */
198 XSYBBINARY = 173, /* 0xAD */
199 SYBUNIQUE = 36, /* 0x24 */
200 SYBVARIANT = 98, /* 0x62 */
201 SYBMSUDT = 240, /* 0xF0 */
202 SYBMSXML = 241, /* 0xF1 */
203 SYBMSDATE = 40, /* 0x28 */
204 SYBMSTIME = 41, /* 0x29 */
205 SYBMSDATETIME2 = 42, /* 0x2a */
206 SYBMSDATETIMEOFFSET = 43,/* 0x2b */
207 SYBMSTABLE = 243, /* 0xF3 */
208
209/*
210 * Sybase only types
211 */
212 SYBLONGBINARY = 225, /* 0xE1 */
213 SYBUINT1 = 64, /* 0x40 */
214 SYBUINT2 = 65, /* 0x41 */
215 SYBUINT4 = 66, /* 0x42 */
216 SYBUINT8 = 67, /* 0x43 */
217 SYBBLOB = 36, /* 0x24 */
218 SYBBOUNDARY = 104, /* 0x68 */
219 SYBDATE = 49, /* 0x31 */
220 SYBDATEN = 123, /* 0x7B */
221 SYB5INT8 = 191, /* 0xBF */
222 SYBINTERVAL = 46, /* 0x2E */
223 SYBLONGCHAR = 175, /* 0xAF */
224 SYBSENSITIVITY = 103, /* 0x67 */
225 SYBSINT1 = 176, /* 0xB0 */
226 SYBTIME = 51, /* 0x33 */
227 SYBTIMEN = 147, /* 0x93 */
228 SYBUINTN = 68, /* 0x44 */
229 SYBUNITEXT = 174, /* 0xAE */
230 SYBXML = 163, /* 0xA3 */
231 SYB5BIGDATETIME = 187, /* 0xBB */
232 SYB5BIGTIME = 188, /* 0xBC */
233
234} TDS_SERVER_TYPE;
235
236 typedef enum
237{
238 USER_CHAR_TYPE = 1, /* 0x01 */
239 USER_VARCHAR_TYPE = 2, /* 0x02 */
240 USER_SYSNAME_TYPE = 18, /* 0x12 */
241 USER_NCHAR_TYPE = 24, /* 0x18 */
242 USER_NVARCHAR_TYPE = 25, /* 0x19 */
243 USER_UNICHAR_TYPE = 34, /* 0x22 */
244 USER_UNIVARCHAR_TYPE = 35, /* 0x23 */
245 USER_UNITEXT_TYPE = 36, /* 0x24 */
246} TDS_USER_TYPE;
247
248/* compute operator */
249#define SYBAOPCNT 75 /* 0x4B */
250#define SYBAOPCNTU 76 /* 0x4C, obsolete */
251#define SYBAOPSUM 77 /* 0x4D */
252#define SYBAOPSUMU 78 /* 0x4E, obsolete */
253#define SYBAOPAVG 79 /* 0x4F */
254#define SYBAOPAVGU 80 /* 0x50, obsolete */
255#define SYBAOPMIN 81 /* 0x51 */
256#define SYBAOPMAX 82 /* 0x52 */
257
258/* mssql2k compute operator */
259#define SYBAOPCNT_BIG 9 /* 0x09 */
260#define SYBAOPSTDEV 48 /* 0x30 */
261#define SYBAOPSTDEVP 49 /* 0x31 */
262#define SYBAOPVAR 50 /* 0x32 */
263#define SYBAOPVARP 51 /* 0x33 */
264#define SYBAOPCHECKSUM_AGG 114 /* 0x72 */
265
269 typedef enum
270{
271 TDS_OPT_SET = 1
272 , TDS_OPT_DEFAULT = 2
273 , TDS_OPT_LIST = 3
274 , TDS_OPT_INFO = 4
275} TDS_OPTION_CMD;
276
277 typedef enum
278{
279 TDS_OPT_DATEFIRST = 1 /* 0x01 */
280 , TDS_OPT_TEXTSIZE = 2 /* 0x02 */
281 , TDS_OPT_STAT_TIME = 3 /* 0x03 */
282 , TDS_OPT_STAT_IO = 4 /* 0x04 */
283 , TDS_OPT_ROWCOUNT = 5 /* 0x05 */
284 , TDS_OPT_NATLANG = 6 /* 0x06 */
285 , TDS_OPT_DATEFORMAT = 7 /* 0x07 */
286 , TDS_OPT_ISOLATION = 8 /* 0x08 */
287 , TDS_OPT_AUTHON = 9 /* 0x09 */
288 , TDS_OPT_CHARSET = 10 /* 0x0a */
289 , TDS_OPT_SHOWPLAN = 13 /* 0x0d */
290 , TDS_OPT_NOEXEC = 14 /* 0x0e */
291 , TDS_OPT_ARITHIGNOREON = 15 /* 0x0f */
292 , TDS_OPT_ARITHABORTON = 17 /* 0x11 */
293 , TDS_OPT_PARSEONLY = 18 /* 0x12 */
294 , TDS_OPT_GETDATA = 20 /* 0x14 */
295 , TDS_OPT_NOCOUNT = 21 /* 0x15 */
296 , TDS_OPT_FORCEPLAN = 23 /* 0x17 */
297 , TDS_OPT_FORMATONLY = 24 /* 0x18 */
298 , TDS_OPT_CHAINXACTS = 25 /* 0x19 */
299 , TDS_OPT_CURCLOSEONXACT = 26 /* 0x1a */
300 , TDS_OPT_FIPSFLAG = 27 /* 0x1b */
301 , TDS_OPT_RESTREES = 28 /* 0x1c */
302 , TDS_OPT_IDENTITYON = 29 /* 0x1d */
303 , TDS_OPT_CURREAD = 30 /* 0x1e */
304 , TDS_OPT_CURWRITE = 31 /* 0x1f */
305 , TDS_OPT_IDENTITYOFF = 32 /* 0x20 */
306 , TDS_OPT_AUTHOFF = 33 /* 0x21 */
307 , TDS_OPT_ANSINULL = 34 /* 0x22 */
308 , TDS_OPT_QUOTED_IDENT = 35 /* 0x23 */
309 , TDS_OPT_ARITHIGNOREOFF = 36 /* 0x24 */
310 , TDS_OPT_ARITHABORTOFF = 37 /* 0x25 */
311 , TDS_OPT_TRUNCABORT = 38 /* 0x26 */
312} TDS_OPTION;
313
314 enum {
315 TDS_OPT_ARITHOVERFLOW = 0x01,
316 TDS_OPT_NUMERICTRUNC = 0x02
317};
318
319 enum TDS_OPT_DATEFIRST_CHOICE
320{
321 TDS_OPT_MONDAY = 1, TDS_OPT_TUESDAY = 2, TDS_OPT_WEDNESDAY = 3, TDS_OPT_THURSDAY = 4, TDS_OPT_FRIDAY = 5, TDS_OPT_SATURDAY =
322 6, TDS_OPT_SUNDAY = 7
323};
324
325 enum TDS_OPT_DATEFORMAT_CHOICE
326{
327 TDS_OPT_FMTMDY = 1, TDS_OPT_FMTDMY = 2, TDS_OPT_FMTYMD = 3, TDS_OPT_FMTYDM = 4, TDS_OPT_FMTMYD = 5, TDS_OPT_FMTDYM = 6
328};
329 enum TDS_OPT_ISOLATION_CHOICE
330{
331 TDS_OPT_LEVEL0 = 0,
332 TDS_OPT_LEVEL1 = 1,
333 TDS_OPT_LEVEL2 = 2,
334 TDS_OPT_LEVEL3 = 3
335};
336
337
338 typedef enum tds_packet_type
339{
340 TDS_QUERY = 1,
341 TDS_LOGIN = 2,
342 TDS_RPC = 3,
343 TDS_REPLY = 4,
344 TDS_CANCEL = 6,
345 TDS_BULK = 7,
346 TDS7_TRANS = 14, /* transaction management */
347 TDS_NORMAL = 15,
348 TDS7_LOGIN = 16,
349 TDS7_AUTH = 17,
350 TDS71_PRELOGIN = 18,
351 TDS72_SMP = 0x53
352} TDS_PACKET_TYPE;
353
357 typedef struct
358{
359 TDS_USMALLINT locale_id; /* master..syslanguages.lcid */
360 TDS_USMALLINT flags;
361 TDS_UCHAR charset_id; /* or zero */
362} TDS71_COLLATION;
363
367 typedef struct
368{
369 TDS_UCHAR signature; /* TDS72_SMP */
370 TDS_UCHAR type;
371 TDS_USMALLINT sid;
372 TDS_UINT size;
373 TDS_UINT seq;
374 TDS_UINT wnd;
375} TDS72_SMP_HEADER;
376
377 enum {
378 TDS_SMP_SYN = 1,
379 TDS_SMP_ACK = 2,
380 TDS_SMP_FIN = 4,
381 TDS_SMP_DATA = 8,
382};
383
384/* SF stands for "sort flag" */
385#define TDS_SF_BIN (TDS_USMALLINT) 0x100
386#define TDS_SF_WIDTH_INSENSITIVE (TDS_USMALLINT) 0x080
387#define TDS_SF_KATATYPE_INSENSITIVE (TDS_USMALLINT) 0x040
388#define TDS_SF_ACCENT_SENSITIVE (TDS_USMALLINT) 0x020
389#define TDS_SF_CASE_INSENSITIVE (TDS_USMALLINT) 0x010
390
391/* UT stands for user type */
392#define TDS_UT_TIMESTAMP 80
393
394
395/* mssql login options flags */
396 enum option_flag1_values {
397 TDS_BYTE_ORDER_X86 = 0,
398 TDS_CHARSET_ASCII = 0,
399 TDS_DUMPLOAD_ON = 0,
400 TDS_FLOAT_IEEE_754 = 0,
401 TDS_INIT_DB_WARN = 0,
402 TDS_SET_LANG_OFF = 0,
403 TDS_USE_DB_SILENT = 0,
404 TDS_BYTE_ORDER_68000 = 0x01,
405 TDS_CHARSET_EBDDIC = 0x02,
406 TDS_FLOAT_VAX = 0x04,
407 TDS_FLOAT_ND5000 = 0x08,
408 TDS_DUMPLOAD_OFF = 0x10, /* prevent BCP */
409 TDS_USE_DB_NOTIFY = 0x20,
410 TDS_INIT_DB_FATAL = 0x40,
411 TDS_SET_LANG_ON = 0x80
412};
413
414 enum option_flag2_values {
415 TDS_INIT_LANG_WARN = 0,
416 TDS_INTEGRATED_SECURTY_OFF = 0,
417 TDS_ODBC_OFF = 0,
418 TDS_USER_NORMAL = 0, /* SQL Server login */
419 TDS_INIT_LANG_REQUIRED = 0x01,
420 TDS_ODBC_ON = 0x02,
421 TDS_TRANSACTION_BOUNDARY71 = 0x04, /* removed in TDS 7.2 */
422 TDS_CACHE_CONNECT71 = 0x08, /* removed in TDS 7.2 */
423 TDS_USER_SERVER = 0x10, /* reserved */
424 TDS_USER_REMUSER = 0x20, /* DQ login */
425 TDS_USER_SQLREPL = 0x40, /* replication login */
426 TDS_INTEGRATED_SECURITY_ON = 0x80
427};
428
429 enum option_flag3_values {
430 TDS_RESTRICTED_COLLATION = 0,
431 TDS_CHANGE_PASSWORD = 0x01, /* TDS 7.2 */
432 TDS_SEND_YUKON_BINARY_XML = 0x02, /* TDS 7.2 */
433 TDS_REQUEST_USER_INSTANCE = 0x04, /* TDS 7.2 */
434 TDS_UNKNOWN_COLLATION_HANDLING = 0x08, /* TDS 7.3 */
435 TDS_EXTENSION = 0x10, /* TDS 7.4 */
436};
437
438 enum type_flags {
439 TDS_OLEDB_ON = 0x10,
440 TDS_READONLY_INTENT = 0x20,
441};
442
443/* Sybase dynamic types */
444 enum dynamic_types {
445 TDS_DYN_PREPARE = 0x01,
446 TDS_DYN_EXEC = 0x02,
447 TDS_DYN_DEALLOC = 0x04,
448 TDS_DYN_EXEC_IMMED = 0x08,
449 TDS_DYN_PROCNAME = 0x10,
450 TDS_DYN_ACK = 0x20,
451 TDS_DYN_DESCIN = 0x40,
452 TDS_DYN_DESCOUT = 0x80,
453};
454
455/* http://jtds.sourceforge.net/apiCursors.html */
456/* Cursor scroll option, must be one of 0x01 - 0x10, OR'd with other bits */
457 enum {
458 TDS_CUR_TYPE_KEYSET = 0x0001, /* default */
459 TDS_CUR_TYPE_DYNAMIC = 0x0002,
460 TDS_CUR_TYPE_FORWARD = 0x0004,
461 TDS_CUR_TYPE_STATIC = 0x0008,
462 TDS_CUR_TYPE_FASTFORWARDONLY = 0x0010,
463 TDS_CUR_TYPE_PARAMETERIZED = 0x1000,
464 TDS_CUR_TYPE_AUTO_FETCH = 0x2000
465};
466
467 enum {
468 TDS_CUR_CONCUR_READ_ONLY = 1,
469 TDS_CUR_CONCUR_SCROLL_LOCKS = 2,
470 TDS_CUR_CONCUR_OPTIMISTIC = 4, /* default */
471 TDS_CUR_CONCUR_OPTIMISTIC_VALUES = 8
472};
473
474/* TDS 4/5 login*/
475#define TDS_MAXNAME 30 /* maximum login name lenghts */
476#define TDS_PROGNLEN 10 /* maximum program lenght */
477#define TDS_PKTLEN 6 /* maximum packet lenght in login */
478
479/* TDS 5 login security flags */
480 enum {
481 TDS5_SEC_LOG_ENCRYPT = 1,
482 TDS5_SEC_LOG_CHALLENGE = 2,
483 TDS5_SEC_LOG_LABELS = 4,
484 TDS5_SEC_LOG_APPDEFINED = 8,
485 TDS5_SEC_LOG_SECSESS = 16,
486 TDS5_SEC_LOG_ENCRYPT2 = 32,
487 TDS5_SEC_LOG_ENCRYPT3 = 128,
488};
489
491 enum {
492 TDS5_MSG_SEC_ENCRYPT = 1,
493 TDS5_MSG_SEC_LOGPWD = 2,
494 TDS5_MSG_SEC_REMPWD = 3,
495 TDS5_MSG_SEC_CHALLENGE = 4,
496 TDS5_MSG_SEC_RESPONSE = 5,
497 TDS5_MSG_SEC_GETLABEL = 6,
498 TDS5_MSG_SEC_LABEL = 7,
499 TDS5_MSG_SQL_TBLNAME = 8,
500 TDS5_MSG_GW_RESERVED = 9,
501 TDS5_MSG_OMNI_CAPABILITIES = 10,
502 TDS5_MSG_SEC_OPAQUE = 11,
503 TDS5_MSG_HAFAILOVER = 12,
504 TDS5_MSG_EMPTY = 13,
507 TDS5_MSG_SEC_ENCRYPT2 = 14,
508 TDS5_MSG_SEC_LOGPWD2 = 15,
509 TDS5_MSG_SEC_SUP_CIPHER = 16,
510 TDS5_MSG_MIG_REQ = 17,
512 TDS5_MSG_MIG_SYNC = 18,
513 TDS5_MSG_MIG_CONT = 19,
514 TDS5_MSG_MIG_IGN = 20,
515 TDS5_MSG_MIG_FAIL = 21,
517 TDS5_MSG_SEC_REMPWD2 = 22,
518 TDS5_MSG_MIG_RESUME = 23,
519 TDS5_MSG_SEC_ENCRYPT3 = 30,
520 TDS5_MSG_SEC_LOGPWD3 = 31,
521 TDS5_MSG_SEC_REMPWD3 = 32,
522 TDS5_MSG_DR_MAP = 33,
523};
524
535 enum {
536 TDS5_SEC_SECSESS = 1,
537 TDS5_SEC_FORWARD = 2,
538 TDS5_SEC_SIGN = 3,
539 TDS5_SEC_OTHER = 4,
540};
541
545 enum {
546 TDS5_SEC_NETWORK_AUTHENTICATION = 0x1,
547 TDS5_SEC_MUTUAL_AUTHENTICATION = 0x2,
548 TDS5_SEC_DELEGATION = 0x4,
549 TDS5_SEC_INTEGRITY = 0x8,
550 TDS5_SEC_CONFIDENTIALITY = 0x10,
551 TDS5_SEC_DETECT_REPLAY = 0x20,
552 TDS5_SEC_DETECT_SEQUENCE = 0x40,
553 TDS5_SEC_DATA_ORIGIN = 0x80,
554 TDS5_SEC_CHANNEL_BINDING = 0x100,
555};
556
557 enum {
558 TDS5_SEC_VERSION = 50,
559};
560
561/* MS encryption byte (pre login) */
562 enum {
563 TDS7_ENCRYPT_OFF,
564 TDS7_ENCRYPT_ON,
565 TDS7_ENCRYPT_NOT_SUP,
566 TDS7_ENCRYPT_REQ,
567};
tdsnumeric
Definition proto.h:26
tdsoldmoney
Definition proto.h:33
tdsmoney
Definition proto.h:39
tdsmoney4
Definition proto.h:45
tdsdatetime
Definition proto.h:50
tdsdatetime4
Definition proto.h:56
tdsunique
Definition proto.h:62
TDS71_COLLATION
TDS 7.1 collation informations.
Definition proto.h:358
TDS72_SMP_HEADER
TDS 7.2 SMP packet header.
Definition proto.h:368