Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/xti.h
+++ new/usr/src/head/xti.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 +/*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + */
22 25 /* Copyright (c) 1996 Sun Microsystems, Inc. */
23 26 /* All Rights Reserved */
24 27
25 28
26 29 #ifndef _XTI_H
27 30 #define _XTI_H
28 31
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 32 #include <sys/types.h>
32 33
33 34 /*
34 35 * The following include file has declarations needed by both the kernel
35 36 * level transport providers and the user level library. This file includes
36 37 * it to expose its namespaces to XTI user level interface.
37 38 */
38 39 #include <sys/tpicommon.h>
39 40
40 41 /*
41 42 * Include XTI interface level options management declarations
42 43 */
43 44 #include <sys/xti_xtiopt.h>
44 45
45 46 #if !defined(_XPG5)
46 47
47 48 /*
48 49 * Include declarations related to OSI transport and management data
49 50 * structures, and the Internet Protocol Suite.
50 51 * Note: The older Unix95/XNS4 XTI spec required these to be
51 52 * exposed through the generic interface header.
52 53 */
53 54 #include <sys/xti_osi.h>
54 55 #include <sys/xti_inet.h>
55 56
56 57 #endif /* !defined(_XPG5) */
57 58
58 59 #ifdef __cplusplus
59 60 extern "C" {
60 61 #endif
61 62
62 63 /*
63 64 * The following t_errno error codes are included in the namespace by
64 65 * inclusion of <sys/tpicommon.h> above. The english language error strings
65 66 * associated with the error values are reproduced here for easy reference.
66 67 *
67 68 * Error Value Error message string
68 69 * ---- ----- --------------------
69 70 * TBADADDR 1 Incorrect address format
70 71 * TBADOPT 2 Incorrect options format
71 72 * TACCES 3 Illegal permissions
72 73 * TBADF 4 Illegal file descriptor
73 74 * TNOADDR 5 Couldn't allocate address
74 75 * TOUTSTATE 6 Routine will place interface out of state
75 76 * TBADSEQ 7 Illegal called/calling sequence number
76 77 * TSYSERR 8 System error
77 78 * TLOOK 9 An event requires attention
78 79 * TBADDATA 10 Illegal amount of data
79 80 * TBUFOVFLW 11 Buffer not large enough
80 81 * TFLOW 12 Can't send message - (blocked)
81 82 * TNODATA 13 No message currently available
82 83 * TNODIS 14 Disconnect message not found
83 84 * TNOUDERR 15 Unitdata error message not found
84 85 * TBADFLAG 16 Incorrect flags specified
85 86 * TNOREL 17 Orderly release message not found
86 87 * TNOTSUPPORT 18 Primitive not supported by provider
87 88 * TSTATECHNG 19 State is in process of changing
88 89 * TNOSTRUCTYPE 20 Unsupported structure type requested
89 90 * TBADNAME 21 Invalid transport provider name
90 91 * TBADQLEN 22 Listener queue length limit is zero
91 92 * TADDRBUSY 23 Transport address is in use
92 93 * TINDOUT 24 Outstanding connection indications
93 94 * TPROVMISMATCH 25 Listener-acceptor transport provider mismatch
94 95 * TRESQLEN 26 Connection acceptor has listen queue length
95 96 * limit greater than zero
96 97 * TRESADDR 27 Connection acceptor-listener addresses not
97 98 * same but required by transport
98 99 * TQFULL 28 Incoming connection queue is full
99 100 * TPROTO 29 Protocol error on transport primitive
100 101 *
101 102 */
102 103
103 104 /*
104 105 * The following are the events returned by t_look
105 106 */
106 107 #define T_LISTEN 0x0001 /* connection indication received */
107 108 #define T_CONNECT 0x0002 /* connect confirmation received */
108 109 #define T_DATA 0x0004 /* normal data received */
109 110 #define T_EXDATA 0x0008 /* expedited data received */
110 111 #define T_DISCONNECT 0x0010 /* disconnect received */
111 112 #define T_UDERR 0x0040 /* data gram error indication */
112 113 #define T_ORDREL 0x0080 /* orderly release indication */
113 114 #define T_GODATA 0x0100 /* sending normal data is again possible */
114 115 #define T_GOEXDATA 0x0200 /* sending expedited data is again possible */
115 116
116 117 /*
117 118 * Flags for data primitives
118 119 */
119 120 #define T_MORE 0x001 /* more data */
120 121 #define T_EXPEDITED 0x002 /* expedited data */
121 122 #define T_PUSH 0x004 /* send data immediately */
122 123
123 124 /*
124 125 * XTI error return
125 126 */
126 127 #if defined(_REENTRANT) || defined(_TS_ERRNO)
127 128 extern int *__t_errno();
128 129 #define t_errno (*(__t_errno()))
129 130 #else
130 131 extern int t_errno;
131 132 #endif /* defined(_REENTRANT) || defined(_TS_ERRNO) */
132 133
133 134
134 135 /*
135 136 * The following are for t_sysconf()
136 137 */
137 138 #ifndef T_IOV_MAX
138 139 #define T_IOV_MAX 16 /* Maximum number of scatter/gather buffers */
139 140 #endif /* Should be <= IOV_MAX */
140 141
141 142 #ifndef _SC_T_IOV_MAX
142 143 #define _SC_T_IOV_MAX 79 /* Should be same in <unistd.h> for use by */
143 144 #endif /* sysconf() */
144 145
145 146 struct t_iovec {
146 147 void *iov_base;
147 148 size_t iov_len;
148 149 };
149 150
150 151 /*
151 152 * Translate source level interface to binary entry point names.
152 153 *
153 154 * Note: This is done to maintain co-existence of TLI and XTI
154 155 * interfaces which have identical names for most functions but
155 156 * different semantics. The XTI names are moved to the different
156 157 * prefix space in the ABI. The #ifdef is required to make use of
157 158 * of the compiler feature to allow redefinition of external names
158 159 * where available. Otherwise a simple #define is used when this
159 160 * header is used with other compilers.
160 161 * The use of #define also has the effect of renaming all names (not
161 162 * just function names) to the new name. The TLI function names
162 163 * (e.g. t_bind) can have identical names for structure names
163 164 * (e.g struct t_bind). Therefore, this redefinition of names needs
164 165 * to be before all structure and function name declarations in the header.
165 166 */
166 167
167 168 #ifdef __PRAGMA_REDEFINE_EXTNAME
168 169
169 170 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
170 171 #pragma redefine_extname t_accept _xti_accept
171 172 #else
172 173 #pragma redefine_extname t_accept _xti_xns5_accept
173 174 #endif
174 175 #pragma redefine_extname t_alloc _xti_alloc
175 176 #pragma redefine_extname t_bind _xti_bind
176 177 #pragma redefine_extname t_close _xti_close
177 178 #pragma redefine_extname t_connect _xti_connect
178 179 #pragma redefine_extname t_error _xti_error
179 180 #pragma redefine_extname t_free _xti_free
180 181 #pragma redefine_extname t_getinfo _xti_getinfo
181 182 #pragma redefine_extname t_getstate _xti_getstate
182 183 #pragma redefine_extname t_getprotaddr _xti_getprotaddr
183 184 #pragma redefine_extname t_listen _xti_listen
184 185 #pragma redefine_extname t_look _xti_look
185 186 #pragma redefine_extname t_open _xti_open
186 187 #pragma redefine_extname t_optmgmt _xti_optmgmt
187 188 #pragma redefine_extname t_rcv _xti_rcv
188 189 #pragma redefine_extname t_rcvconnect _xti_rcvconnect
189 190 #pragma redefine_extname t_rcvdis _xti_rcvdis
190 191 #pragma redefine_extname t_rcvrel _xti_rcvrel
191 192 #pragma redefine_extname t_rcvreldata _xti_rcvreldata
192 193 #pragma redefine_extname t_rcvudata _xti_rcvudata
193 194 #pragma redefine_extname t_rcvuderr _xti_rcvuderr
194 195 #pragma redefine_extname t_rcvv _xti_rcvv
195 196 #pragma redefine_extname t_rcvvudata _xti_rcvvudata
196 197 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
197 198 #pragma redefine_extname t_snd _xti_snd
198 199 #else
199 200 #pragma redefine_extname t_snd _xti_xns5_snd
200 201 #endif
201 202 #pragma redefine_extname t_snddis _xti_snddis
202 203 #pragma redefine_extname t_sndrel _xti_sndrel
203 204 #pragma redefine_extname t_sndreldata _xti_sndreldata
204 205 #pragma redefine_extname t_sndudata _xti_sndudata
205 206 #pragma redefine_extname t_sndv _xti_sndv
206 207 #pragma redefine_extname t_sndvudata _xti_sndvudata
207 208 #pragma redefine_extname t_strerror _xti_strerror
208 209 #pragma redefine_extname t_sync _xti_sync
209 210 #pragma redefine_extname t_sysconf _xti_sysconf
210 211 #pragma redefine_extname t_unbind _xti_unbind
211 212
212 213 #else /* __PRAGMA_REDEFINE_EXTNAME */
213 214
214 215 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
215 216 #define t_accept _xti_accept
216 217 #else
217 218 #define t_accept _xti_xns5_accept
218 219 #endif
219 220 #define t_alloc _xti_alloc
220 221 #define t_bind _xti_bind
221 222 #define t_close _xti_close
222 223 #define t_connect _xti_connect
223 224 #define t_error _xti_error
224 225 #define t_free _xti_free
225 226 #define t_getinfo _xti_getinfo
226 227 #define t_getstate _xti_getstate
227 228 #define t_getprotaddr _xti_getprotaddr
228 229 #define t_listen _xti_listen
229 230 #define t_look _xti_look
230 231 #define t_open _xti_open
231 232 #define t_optmgmt _xti_optmgmt
232 233 #define t_rcv _xti_rcv
233 234 #define t_rcvconnect _xti_rcvconnect
234 235 #define t_rcvdis _xti_rcvdis
235 236 #define t_rcvrel _xti_rcvrel
236 237 #define t_rcvreldata _xti_rcvreldata
237 238 #define t_rcvudata _xti_rcvudata
238 239 #define t_rcvuderr _xti_rcvuderr
239 240 #define t_rcvv _xti_rcvv
240 241 #define t_rcvvudata _xti_rcvvudata
241 242 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
242 243 #define t_snd _xti_snd
243 244 #else
244 245 #define t_snd _xti_xns5_snd
245 246 #endif
246 247 #define t_snddis _xti_snddis
247 248 #define t_sndrel _xti_sndrel
248 249 #define t_sndreldata _xti_sndreldata
249 250 #define t_sndudata _xti_sndudata
250 251 #define t_sndv _xti_sndv
251 252 #define t_sndvudata _xti_sndvudata
252 253 #define t_strerror _xti_strerror
253 254 #define t_sync _xti_sync
254 255 #define t_sysconf _xti_sysconf
255 256 #define t_unbind _xti_unbind
256 257
257 258 #endif /* __PRAGMA_REDEFINE_EXTNAME */
258 259
259 260 /*
260 261 * protocol specific service limits
261 262 */
262 263 struct t_info {
263 264 t_scalar_t addr; /* max size of protocol address */
264 265 t_scalar_t options; /* max size of protocol options */
265 266 t_scalar_t tsdu; /* max size of max transport service */
266 267 /* data unit */
267 268 t_scalar_t etsdu; /* max size of max expedited tsdu */
268 269 t_scalar_t connect; /* max data for connection primitives */
269 270 t_scalar_t discon; /* max data for disconnect primitives */
270 271 t_scalar_t servtype; /* provider service type */
271 272 t_scalar_t flags; /* other info about transport providers */
272 273 };
273 274
274 275 /*
275 276 * Flags definitions for the t_info structure
276 277 */
277 278 #define T_SENDZERO 0x001 /* supports 0-length TSDUs */
278 279 #define T_ORDRELDATA 0x002 /* supports orderly release data */
279 280
280 281 /*
281 282 * netbuf structure
282 283 */
283 284 struct netbuf {
284 285 unsigned int maxlen;
285 286 unsigned int len;
286 287 #if defined(_XPG5)
287 288 void *buf;
288 289 #else
289 290 char *buf;
290 291 #endif
291 292 };
292 293
293 294 /*
294 295 * t_opthdr structure
295 296 */
296 297 struct t_opthdr {
297 298 t_uscalar_t len; /* total length of option */
298 299 t_uscalar_t level; /* protocol level */
299 300 t_uscalar_t name; /* option name */
300 301 t_uscalar_t status; /* status value */
301 302 /* followed by option value */
302 303 };
303 304
304 305 /*
305 306 * t_bind - format of the addres and options arguments of bind
306 307 */
307 308
308 309 struct t_bind {
309 310 struct netbuf addr;
310 311 unsigned int qlen;
311 312 };
312 313
313 314 /*
314 315 * options management
315 316 */
316 317 struct t_optmgmt {
317 318 struct netbuf opt;
318 319 t_scalar_t flags;
319 320 };
320 321
321 322 /*
322 323 * disconnect structure
323 324 */
324 325 struct t_discon {
325 326 struct netbuf udata; /* user data */
326 327 int reason; /* reason code */
327 328 int sequence; /* sequence number */
328 329 };
329 330
330 331 /*
331 332 * call structure
332 333 */
333 334 struct t_call {
334 335 struct netbuf addr; /* address */
335 336 struct netbuf opt; /* options */
336 337 struct netbuf udata; /* user data */
337 338 int sequence; /* sequence number */
338 339 };
339 340
340 341 /*
341 342 * data gram structure
342 343 */
343 344 struct t_unitdata {
344 345 struct netbuf addr; /* address */
345 346 struct netbuf opt; /* options */
346 347 struct netbuf udata; /* user data */
347 348 };
348 349
349 350 /*
350 351 * unitdata error
351 352 */
352 353 struct t_uderr {
353 354 struct netbuf addr; /* address */
354 355 struct netbuf opt; /* options */
355 356 t_scalar_t error; /* error code */
356 357 };
357 358
358 359 /*
359 360 * The following are structure types used when dynamically
360 361 * allocating the above structures via t_structalloc().
361 362 */
362 363 #define T_BIND 1 /* struct t_bind */
363 364 #define T_OPTMGMT 2 /* struct t_optmgmt */
364 365 #define T_CALL 3 /* struct t_call */
365 366 #define T_DIS 4 /* struct t_discon */
366 367 #define T_UNITDATA 5 /* struct t_unitdata */
367 368 #define T_UDERROR 6 /* struct t_uderr */
368 369 #define T_INFO 7 /* struct t_info */
369 370
370 371 /*
371 372 * The following bits specify which fields of the above
372 373 * structures should be allocated by t_alloc().
373 374 */
374 375 #define T_ADDR 0x01 /* address */
375 376 #define T_OPT 0x02 /* options */
376 377 #define T_UDATA 0x04 /* user data */
377 378 #define T_ALL 0xffff /* all the above fields */
378 379
379 380
380 381 /*
381 382 * the following are the states for the user
382 383 */
383 384
384 385 #define T_UNINIT 0 /* uninitialized */
385 386 #define T_UNBND 1 /* unbound */
386 387 #define T_IDLE 2 /* idle */
387 388 #define T_OUTCON 3 /* outgoing connection pending */
388 389 #define T_INCON 4 /* incoming connection pending */
389 390 #define T_DATAXFER 5 /* data transfer */
390 391 #define T_OUTREL 6 /* outgoing release pending */
391 392 #define T_INREL 7 /* incoming release pending */
392 393
393 394
394 395 #define T_UNUSED -1
395 396 #define T_NULL 0
396 397
397 398
398 399 /*
399 400 * Allegedly general purpose constant. Used with (and needs to be bitwise
400 401 * distinct from) T_NOPROTECT, T_PASSIVEPROTECT and T_ACTIVEPROTECT
401 402 * which are OSI specific constants but part of this header (defined
402 403 * in <xti_osi.h> which is included in this header for historical
403 404 * XTI specification reasons)
404 405 */
405 406 #define T_ABSREQ 0x8000
406 407
407 408 /*
408 409 * General definitions for option management
409 410 *
410 411 * Multiple variable length options may be packed into a single option buffer.
411 412 * Each option consists of a fixed length header followed by variable length
412 413 * data. The header and data will have to be aligned at appropriate
413 414 * boundaries. The following macros are used to manipulate the options.
414 415 *
415 416 * Helper Macros: Macros beginning with a "_T" prefix are helper macros.
416 417 * They are private, not meant for public use and may
417 418 * change without notice. Users should use the standard
418 419 * XTI macros beginning with "T_" prefix
419 420 */
420 421
421 422 #define _T_OPT_HALIGN_SZ (sizeof (t_scalar_t)) /* Hdr Alignment size */
422 423 #define _T_OPT_DALIGN_SZ (sizeof (int32_t)) /* Data Alignment size */
423 424 #define _T_OPTHDR_SZ (sizeof (struct t_opthdr))
424 425
425 426 /* Align 'x' to the next 'asize' alignment boundary */
426 427 #define _T_OPT_ALIGN(x, asize) \
427 428 (((uintptr_t)(x) + ((asize) - 1L)) & ~((asize) - 1L))
428 429
429 430 /* Align 'x' to the next header alignment boundary */
430 431 #define _T_OPTHDR_ALIGN(x) \
431 432 (_T_OPT_ALIGN((x), _T_OPT_HALIGN_SZ))
432 433
433 434 /* Align 'x' to the next data alignment boundary */
434 435 #define _T_OPTDATA_ALIGN(x) \
435 436 (_T_OPT_ALIGN((x), _T_OPT_DALIGN_SZ))
436 437
437 438 /*
438 439 * struct t_opthdr *T_OPT_FIRSTHDR(struct netbuf *nbp):
439 440 * Get aligned start of first option header
440 441 *
441 442 * unsigned char *T_OPT_DATA(struct t_opthdr *tohp):
442 443 * Get aligned start of data part after option header
443 444 *
444 445 * struct t_opthdr *T_OPT_NEXTHDR(struct netbuf *nbp, struct t_opthdr *tohp):
445 446 * Skip to next option header
446 447 */
447 448
448 449 #define T_OPT_FIRSTHDR(nbp) \
449 450 ((nbp)->len >= _T_OPTHDR_SZ ? (struct t_opthdr *)(nbp)->buf : \
450 451 (struct t_opthdr *)0)
451 452
452 453 #define T_OPT_DATA(tohp) \
453 454 ((unsigned char *)_T_OPTDATA_ALIGN((char *)(tohp) + _T_OPTHDR_SZ))
454 455
455 456 #define _T_NEXTHDR(pbuf, buflen, popt) \
456 457 (((char *)_T_OPTHDR_ALIGN((char *)(popt) + (popt)->len) + \
457 458 _T_OPTHDR_SZ <= ((char *)(pbuf) + (buflen))) ? \
458 459 (struct t_opthdr *)((char *)_T_OPTHDR_ALIGN((char *)(popt) + \
459 460 (popt)->len)) : (struct t_opthdr *)0)
460 461
461 462 #define T_OPT_NEXTHDR(nbp, tohp) (_T_NEXTHDR((nbp)->buf, (nbp)->len, (tohp)))
462 463
463 464 #if !defined(_XPG5)
464 465 /*
465 466 * The macros below are meant for older applications for compatibility.
466 467 * New applications should use the T_OPT_* macros, obviating the need
467 468 * to explicitly use the T_ALIGN macro
468 469 *
469 470 * struct t_opthdr *OPT_NEXTHDR(char *pbuf, unsigned int buflen,
470 471 * struct t_opthdr *popt):
471 472 * Skip to next option header
↓ open down ↓ |
431 lines elided |
↑ open up ↑ |
472 473 */
473 474 #define T_ALIGN(p) (((uintptr_t)(p) + (sizeof (t_scalar_t) - 1))\
474 475 & ~(sizeof (t_scalar_t) - 1))
475 476 #define OPT_NEXTHDR(pbuf, buflen, popt) (_T_NEXTHDR((pbuf), (buflen), (popt)))
476 477 #endif
477 478
478 479 /*
479 480 * XTI LIBRARY FUNCTIONS
480 481 */
481 482
482 -#if defined(__STDC__)
483 -
484 483 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
485 484 extern int t_accept(int, int, struct t_call *);
486 485 extern char *t_alloc(int, int, int);
487 486 extern int t_bind(int, struct t_bind *, struct t_bind *);
488 487 extern int t_connect(int, struct t_call *, struct t_call *);
489 488 extern int t_error(char *);
490 489 extern int t_free(char *, int);
491 490 extern int t_open(char *, int, struct t_info *);
492 491 extern int t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
493 492 extern int t_rcv(int, char *, unsigned int, int *);
494 493 extern int t_snd(int, char *, unsigned int, int);
495 494 extern int t_snddis(int, struct t_call *);
496 495 extern int t_sndudata(int, struct t_unitdata *);
497 496 extern char *t_strerror(int);
498 497 #else
499 498 extern int t_accept(int, int, const struct t_call *);
500 499 extern void *t_alloc(int, int, int);
501 500 extern int t_bind(int, const struct t_bind *, struct t_bind *);
502 501 extern int t_connect(int, const struct t_call *, struct t_call *);
503 502 extern int t_error(const char *);
504 503 extern int t_free(void *, int);
505 504 extern int t_open(const char *, int, struct t_info *);
506 505 extern int t_optmgmt(int, const struct t_optmgmt *, struct t_optmgmt *);
507 506 extern int t_rcv(int, void *, unsigned int, int *);
508 507 extern int t_snd(int, void *, unsigned int, int);
509 508 extern int t_snddis(int, const struct t_call *);
510 509 extern int t_sndudata(int, const struct t_unitdata *);
511 510 extern const char *t_strerror(int);
512 511 #endif
513 512 extern int t_close(int);
514 513 extern int t_getinfo(int, struct t_info *);
515 514 extern int t_getstate(int);
516 515 extern int t_getprotaddr(int, struct t_bind *, struct t_bind *);
517 516 extern int t_listen(int, struct t_call *);
518 517 extern int t_look(int);
519 518 extern int t_rcvconnect(int, struct t_call *);
520 519 extern int t_rcvdis(int, struct t_discon *);
521 520 extern int t_rcvrel(int);
522 521 extern int t_rcvreldata(int, struct t_discon *);
523 522 extern int t_rcvudata(int, struct t_unitdata *, int *);
524 523 extern int t_rcvuderr(int, struct t_uderr *);
525 524 extern int t_rcvv(int, struct t_iovec *, unsigned int, int *);
526 525 extern int t_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
527 526 unsigned int, int *);
528 527 extern int t_sndrel(int);
529 528 extern int t_sndreldata(int, struct t_discon *);
530 529 extern int t_sndv(int, const struct t_iovec *, unsigned int, int);
531 530 extern int t_sndvudata(int, struct t_unitdata *, struct t_iovec *,
532 531 unsigned int);
533 532 extern int t_sync(int);
534 533 extern int t_sysconf(int);
535 534 extern int t_unbind(int);
536 535
537 -#endif /* __STDC__ */
538 -
539 536 #ifdef __cplusplus
540 537 }
541 538 #endif
542 539
543 540 #endif /* _XTI_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX