PURPOSE

buffer type switch structure - parameters and routines needed for each buffer type

SYNOPSIS

Buffer Type Structure

/*
 * The following definitions are in $TUXDIR/tuxedo/include/tmtypes.h
 */
#define TMTYPELEN    8
#define TMSTYPELEN  16
struct tmtype_sw_t {
  char type[TMTYPELEN];    /* type of buffer */
  char subtype[TMSTYPELEN];/* sub-type of buffer */
  long dfltsize;         /* default size of buffer */
  int (*initbuf)();   /* initialization function pointer */
  int (*reinitbuf)(); /* re-initialization function pointer */
  int (*uninitbuf)(); /* un-initialization function pointer */
  long (*presend)();  /* pre-send manipulation function pointer */
  void (*postsend)(); /* post-send manipulation function pointer */
  long (*postrecv)(); /* post-receive manipulation function pointer */
  long (*encdec)();   /* encode/decode function pointer */
  int (*route)();     /* data dependent routing function pointer */
  int (*filter)();     /* buffer filtering function pointer */
  int (*format)();     /* buffer format string function pointer */
  void (*reserved[10])();     /* reserved space for new function pointers */
  };
/*
 * application types switch pointer
 * always use this pointer when accessing the table
 */
extern struct tmtype_sw_t *tm_typeswp;

DESCRIPTION

Each buffer type and sub-type must have an entry in the tm_typesw array such that when a buffer is manipulated the appropriate routines are called. For the buffer types provided by System/T see tuxtypes(5).

An application wishing to supply their own buffer type can do so by adding an instance to the tm_typesw array in $TUXDIR/lib/tmtypesw.c ( tuxtypes(5) shows how this can be done). The semantics of the routines which must be supplied when adding a new type are specified in buffer(3).

FILES


$TUXDIR/tuxedo/include/tmtypes.h - the type switch definition
$TUXDIR/lib/tmtypesw.c - the type switch instantiation

SEE ALSO

buffer(3), tuxtypes(5)