Print this page
remove support for non-ANSI compilation


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */



  22 /*      Copyright (c) 1996 Sun Microsystems, Inc.       */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 #ifndef _XTI_H
  27 #define _XTI_H
  28 
  29 #pragma ident   "%Z%%M% %I%     %E% SMI"
  30 
  31 #include <sys/types.h>
  32 
  33 /*
  34  * The following include file has declarations needed by both the kernel
  35  * level transport providers and the user level library. This file includes
  36  * it to expose its namespaces to XTI user level interface.
  37  */
  38 #include <sys/tpicommon.h>
  39 
  40 /*
  41  * Include XTI interface level options management declarations
  42  */
  43 #include <sys/xti_xtiopt.h>
  44 
  45 #if !defined(_XPG5)
  46 
  47 /*
  48  * Include declarations related to OSI transport and management data
  49  * structures, and the Internet Protocol Suite.
  50  * Note: The older Unix95/XNS4 XTI spec required these to be


 462 
 463 #if !defined(_XPG5)
 464 /*
 465  * The macros below are meant for older applications for compatibility.
 466  * New applications should use the T_OPT_* macros, obviating the need
 467  * to explicitly use the T_ALIGN macro
 468  *
 469  * struct t_opthdr *OPT_NEXTHDR(char *pbuf, unsigned int buflen,
 470  *                               struct t_opthdr *popt):
 471  *         Skip to next option header
 472  */
 473 #define T_ALIGN(p)      (((uintptr_t)(p) + (sizeof (t_scalar_t) - 1))\
 474                                         & ~(sizeof (t_scalar_t) - 1))
 475 #define OPT_NEXTHDR(pbuf, buflen, popt) (_T_NEXTHDR((pbuf), (buflen), (popt)))
 476 #endif
 477 
 478 /*
 479  * XTI LIBRARY FUNCTIONS
 480  */
 481 
 482 #if defined(__STDC__)
 483 
 484 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
 485 extern int t_accept(int, int, struct t_call *);
 486 extern char *t_alloc(int, int, int);
 487 extern int t_bind(int, struct t_bind *, struct t_bind *);
 488 extern int t_connect(int, struct t_call *, struct t_call *);
 489 extern int t_error(char *);
 490 extern int t_free(char *, int);
 491 extern int t_open(char *, int, struct t_info *);
 492 extern int t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
 493 extern int t_rcv(int, char *, unsigned int, int *);
 494 extern int t_snd(int, char *, unsigned int, int);
 495 extern int t_snddis(int, struct t_call *);
 496 extern int t_sndudata(int, struct t_unitdata *);
 497 extern char *t_strerror(int);
 498 #else
 499 extern int t_accept(int, int, const struct t_call *);
 500 extern void *t_alloc(int, int, int);
 501 extern int t_bind(int, const struct t_bind *, struct t_bind *);
 502 extern int t_connect(int, const struct t_call *, struct t_call *);
 503 extern int t_error(const char *);


 517 extern int t_listen(int, struct t_call *);
 518 extern int t_look(int);
 519 extern int t_rcvconnect(int, struct t_call *);
 520 extern int t_rcvdis(int, struct t_discon *);
 521 extern int t_rcvrel(int);
 522 extern int t_rcvreldata(int, struct t_discon *);
 523 extern int t_rcvudata(int, struct t_unitdata *, int *);
 524 extern int t_rcvuderr(int, struct t_uderr *);
 525 extern int t_rcvv(int, struct t_iovec *, unsigned int, int *);
 526 extern int t_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
 527         unsigned int, int *);
 528 extern int t_sndrel(int);
 529 extern int t_sndreldata(int, struct t_discon *);
 530 extern int t_sndv(int, const struct t_iovec *,  unsigned int, int);
 531 extern int t_sndvudata(int, struct t_unitdata *, struct t_iovec *,
 532         unsigned int);
 533 extern int t_sync(int);
 534 extern int t_sysconf(int);
 535 extern int t_unbind(int);
 536 
 537 #endif /* __STDC__ */
 538 
 539 #ifdef  __cplusplus
 540 }
 541 #endif
 542 
 543 #endif  /* _XTI_H */


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  */
  25 /*      Copyright (c) 1996 Sun Microsystems, Inc.       */
  26 /*        All Rights Reserved   */
  27 
  28 
  29 #ifndef _XTI_H
  30 #define _XTI_H
  31 


  32 #include <sys/types.h>
  33 
  34 /*
  35  * The following include file has declarations needed by both the kernel
  36  * level transport providers and the user level library. This file includes
  37  * it to expose its namespaces to XTI user level interface.
  38  */
  39 #include <sys/tpicommon.h>
  40 
  41 /*
  42  * Include XTI interface level options management declarations
  43  */
  44 #include <sys/xti_xtiopt.h>
  45 
  46 #if !defined(_XPG5)
  47 
  48 /*
  49  * Include declarations related to OSI transport and management data
  50  * structures, and the Internet Protocol Suite.
  51  * Note: The older Unix95/XNS4 XTI spec required these to be


 463 
 464 #if !defined(_XPG5)
 465 /*
 466  * The macros below are meant for older applications for compatibility.
 467  * New applications should use the T_OPT_* macros, obviating the need
 468  * to explicitly use the T_ALIGN macro
 469  *
 470  * struct t_opthdr *OPT_NEXTHDR(char *pbuf, unsigned int buflen,
 471  *                               struct t_opthdr *popt):
 472  *         Skip to next option header
 473  */
 474 #define T_ALIGN(p)      (((uintptr_t)(p) + (sizeof (t_scalar_t) - 1))\
 475                                         & ~(sizeof (t_scalar_t) - 1))
 476 #define OPT_NEXTHDR(pbuf, buflen, popt) (_T_NEXTHDR((pbuf), (buflen), (popt)))
 477 #endif
 478 
 479 /*
 480  * XTI LIBRARY FUNCTIONS
 481  */
 482 


 483 #if defined(_XOPEN_SOURCE) && !defined(_XPG5)
 484 extern int t_accept(int, int, struct t_call *);
 485 extern char *t_alloc(int, int, int);
 486 extern int t_bind(int, struct t_bind *, struct t_bind *);
 487 extern int t_connect(int, struct t_call *, struct t_call *);
 488 extern int t_error(char *);
 489 extern int t_free(char *, int);
 490 extern int t_open(char *, int, struct t_info *);
 491 extern int t_optmgmt(int, struct t_optmgmt *, struct t_optmgmt *);
 492 extern int t_rcv(int, char *, unsigned int, int *);
 493 extern int t_snd(int, char *, unsigned int, int);
 494 extern int t_snddis(int, struct t_call *);
 495 extern int t_sndudata(int, struct t_unitdata *);
 496 extern char *t_strerror(int);
 497 #else
 498 extern int t_accept(int, int, const struct t_call *);
 499 extern void *t_alloc(int, int, int);
 500 extern int t_bind(int, const struct t_bind *, struct t_bind *);
 501 extern int t_connect(int, const struct t_call *, struct t_call *);
 502 extern int t_error(const char *);


 516 extern int t_listen(int, struct t_call *);
 517 extern int t_look(int);
 518 extern int t_rcvconnect(int, struct t_call *);
 519 extern int t_rcvdis(int, struct t_discon *);
 520 extern int t_rcvrel(int);
 521 extern int t_rcvreldata(int, struct t_discon *);
 522 extern int t_rcvudata(int, struct t_unitdata *, int *);
 523 extern int t_rcvuderr(int, struct t_uderr *);
 524 extern int t_rcvv(int, struct t_iovec *, unsigned int, int *);
 525 extern int t_rcvvudata(int, struct t_unitdata *, struct t_iovec *,
 526         unsigned int, int *);
 527 extern int t_sndrel(int);
 528 extern int t_sndreldata(int, struct t_discon *);
 529 extern int t_sndv(int, const struct t_iovec *,  unsigned int, int);
 530 extern int t_sndvudata(int, struct t_unitdata *, struct t_iovec *,
 531         unsigned int);
 532 extern int t_sync(int);
 533 extern int t_sysconf(int);
 534 extern int t_unbind(int);
 535 


 536 #ifdef  __cplusplus
 537 }
 538 #endif
 539 
 540 #endif  /* _XTI_H */