| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Thu, 31 Jul 2008 02:16:17 GMT | ||||||||||||||||
| |||||||||||||||||
| Description: CodeFile /code/strss7/src/include/sys/xti.h
#ifndef _SYS_XTI_H
#define _SYS_XTI_H
#ident "@(#) xti.h,v openss7-0_9_2_F(0.9.2.5) Copyright (c) 2001-2006 OpenSS7 Corporation."
#ifndef t_scalar_t
typedef int32_t t_scalar_t;
#define t_scalar_t t_scalar_t
#endif
#if !defined _STROPTS_H || defined NEED_T_USCALAR_T
#ifndef t_uscalar_t
typedef u_int32_t t_uscalar_t;
#define t_uscalar_t t_uscalar_t
#endif
#endif
#include <sys/tpi.h>
#include <sys/xti_xti.h>
#define T_ALIGN(p) (((uintptr_t)(p) + sizeof(t_uscalar_t)-1) & ~(sizeof(t_uscalar_t)-1))
#if 0
#if !defined _SYS_TIHDR_H
#define _T_USCALAR_ALIGN(p) \
(((uintptr_t)(p) + (sizeof (t_scalar_t)-1)) & ~(sizeof (t_scalar_t)-1))
#define T_OPT_FIRSTHDR(nbp) \
((((char *)(nbp)->buf + sizeof (struct t_opthdr)) <= \
(char *)(nbp)->buf + (nbp)->len) ? \
(struct t_opthdr *)(nbp)->buf : (struct t_opthdr *)0)
#define T_OPT_DATA(tohp) \
((unsigned char *)(tohp) + sizeof (struct t_opthdr))
#define _T_NEXTHDR(pbuf, buflen, popt) \
(((char *) (popt) + _T_USCALAR_ALIGN((popt)->len) + sizeof(struct t_opthdr) <= \
((char *) (pbuf) + (buflen))) \
? (struct t_opthdr *) ((char *) (popt) + _T_USCALAR_ALIGN((popt)->len)) \
: (struct t_opthdr *) 0)
#define T_OPT_NEXTHDR(nbp, tohp) _T_NEXTHDR((nbp)->buf, \
(nbp)->len, (tohp))
#define OPT_NEXTHDR(pbuf, buflen, popt) (struct t_opthdr *) \
(((char *)(popt) + T_ALIGN((popt)->len) < \
(char *)(pbuf) + (buflen)) \
? ((char *)(popt) + T_ALIGN((popt)->len)) \
: 0)
#endif
#endif
#define t_errno (*(_t_errno()))
extern int *_t_errno(void);
#define T_IOV_MAX 16
struct t_iovec {
void *iov_base;
size_t iov_len;
};
struct netbuf {
unsigned int maxlen;
unsigned int len;
char *buf;
};
struct t_info {
t_scalar_t addr;
t_scalar_t options;
t_scalar_t tsdu;
t_scalar_t etsdu;
t_scalar_t connect;
t_scalar_t discon;
t_scalar_t servtype;
#if defined(_XOPEN_SOURCE)
t_scalar_t flags;
t_scalar_t tidu;
#endif
};
struct t_bind {
struct netbuf addr;
unsigned int qlen;
};
struct t_optmgmt {
struct netbuf opt;
t_scalar_t flags;
};
struct t_discon {
struct netbuf udata;
int reason;
int sequence;
};
struct t_call {
struct netbuf addr;
struct netbuf opt;
struct netbuf udata;
int sequence;
};
struct t_unitdata {
struct netbuf addr;
struct netbuf opt;
struct netbuf udata;
};
struct t_uderr {
struct netbuf addr;
struct netbuf opt;
t_scalar_t error;
};
struct t_leaf_status {
int leafid;
int status;
int reason;
};
#define t_leaf_status t_leaf_status
#define T_LEAF_NOCHANGE 0
#define T_LEAF_CONNECTED 1
#define T_LEAF_DISCONNECTED 2
#define T_LISTEN 0x0001
#define T_CONNECT 0x0002
#define T_DATA 0x0004
#define T_EXDATA 0x0008
#define T_DISCONNECT 0x0010
#define T_UDERR 0x0040
#define T_ORDREL 0x0080
#define T_GODATA 0x0100
#define T_GOEXDATA 0x0200
#define T_LEAFCHANGE 0x0400
#define T_EVENTS 0x0800
#define T_ERROR (~0)
#if defined(_XOPEN_SOURCE)
#define T_BIND 1
#define T_OPTMGMT 2
#define T_CALL 3
#define T_DIS 4
#define T_UNITDATA 5
#define T_UDERROR 6
#define T_INFO 7
#else
#define T_BIND_STR 1
#define T_OPTMGMT_STR 2
#define T_CALL_STR 3
#define T_DIS_STR 4
#define T_UNITDATA_STR 5
#define T_UDERROR_STR 6
#define T_INFO_STR 7
#endif
#define T_ADDR 0x0001
#define T_OPT 0x0002
#define T_UDATA 0x0004
#define T_ALL 0xffff
#define T_UNINIT 0
#define T_UNBND 1
#define T_IDLE 2
#define T_OUTCON 3
#define T_INCON 4
#define T_DATAXFER 5
#define T_OUTREL 6
#define T_INREL 7
#define T_YES 1
#define T_NO 0
#define T_UNUSED (-1)
#define T_NULL 0
#define T_ABSREQ 0x8000
#if defined(_XOPEN_SOURCE)
#define T_INFINITE (-1)
#define T_INVALID (-2)
#endif
#endif
| ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Thu, 31 Jul 2008 02:16:17 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |