diff options
Diffstat (limited to 'zaptel.h')
-rw-r--r-- | zaptel.h | 111 |
1 files changed, 71 insertions, 40 deletions
@@ -179,6 +179,7 @@ /* Extended attributes in lineconfig structure */ #define ZT_SPANINFO_HAS_LINECONFIG +#define ZT_SPANINFO_HAS_LBONAME typedef struct zt_params { @@ -208,44 +209,69 @@ int pulsemaketime; int pulseaftertime; } ZT_PARAMS; -typedef struct zt_spaninfo_compat -{ -int spanno; /* span number */ -char name[20]; /* Name of span */ -char desc[40]; /* Description of span */ -int alarms; /* alarms status */ -int txlevel; /* what TX level is set to */ -int rxlevel; /* current RX level */ -int bpvcount; /* current BPV count */ -int crc4count; /* current CRC4 error count */ -int ebitcount; /* current E-bit error count */ -int fascount; /* current FAS error count */ -int irqmisses; /* current IRQ misses */ -int syncsrc; /* span # of current sync source, or 0 for free run */ -int numchans; /* number of configured channels on this span */ -int totalchans; /* total number of channels on the span */ -int totalspans; /* total number of zaptel spans in entire system */ -} ZT_SPANINFO_COMPAT; - -typedef struct zt_spaninfo -{ -int spanno; /* span number */ -char name[20]; /* Name of span */ -char desc[40]; /* Description of span */ -int alarms; /* alarms status */ -int txlevel; /* what TX level is set to */ -int rxlevel; /* current RX level */ -int bpvcount; /* current BPV count */ -int crc4count; /* current CRC4 error count */ -int ebitcount; /* current E-bit error count */ -int fascount; /* current FAS error count */ -int irqmisses; /* current IRQ misses */ -int syncsrc; /* span # of current sync source, or 0 for free run */ -int numchans; /* number of configured channels on this span */ -int totalchans; /* total number of channels on the span */ -int totalspans; /* total number of zaptel spans in entire system */ -int lbo; /* line build out */ -int lineconfig; /* framing/coding */ +struct zt_spaninfo_v1 { + int spanno; /* span number */ + char name[20]; /* Name */ + char desc[40]; /* Description */ + int alarms; /* alarms status */ + int txlevel; /* what TX level is set to */ + int rxlevel; /* current RX level */ + int bpvcount; /* current BPV count */ + int crc4count; /* current CRC4 error count */ + int ebitcount; /* current E-bit error count */ + int fascount; /* current FAS error count */ + int irqmisses; /* current IRQ misses */ + int syncsrc; /* span # of current sync source, or 0 for free run */ + int numchans; /* number of configured channels on this span */ + int totalchans; /* total number of channels on the span */ + int totaflspans; /* total number of spans in entire system */ +}; + +struct zt_spaninfo_v2 { + int spanno; /* span number */ + char name[20]; /* Name */ + char desc[40]; /* Description */ + int alarms; /* alarms status */ + int txlevel; /* what TX level is set to */ + int rxlevel; /* current RX level */ + int bpvcount; /* current BPV count */ + int crc4count; /* current CRC4 error count */ + int ebitcount; /* current E-bit error count */ + int fascount; /* current FAS error count */ + int irqmisses; /* current IRQ misses */ + int syncsrc; /* span # of current sync source, or 0 for free run */ + int numchans; /* number of configured channels on this span */ + int totalchans; /* total number of channels on the span */ + int totalspans; /* total number of spans in entire system */ + int lbo; /* line build out */ + int lineconfig; /* framing/coding */ +}; + +typedef struct zt_spaninfo { + int spanno; /* span number */ + char name[20]; /* Name */ + char desc[40]; /* Description */ + int alarms; /* alarms status */ + int txlevel; /* what TX level is set to */ + int rxlevel; /* current RX level */ + int bpvcount; /* current BPV count */ + int crc4count; /* current CRC4 error count */ + int ebitcount; /* current E-bit error count */ + int fascount; /* current FAS error count */ + int irqmisses; /* current IRQ misses */ + int syncsrc; /* span # of current sync source, or 0 for free run */ + int numchans; /* number of configured channels on this span */ + int totalchans; /* total number of channels on the span */ + int totalspans; /* total number of spans in entire system */ + int lbo; /* line build out */ + int lineconfig; /* framing/coding */ + char lboname[40]; /* line build out in text form */ + char location[40]; /* span's device location in system */ + char manufacturer[40]; /* manufacturer of span's device */ + char devicetype[40]; /* span's device type */ + int irq; /* span's device IRQ */ + int linecompat; /* signaling modes possible on this span */ + char spantype[6]; /* type of span in text form */ } ZT_SPANINFO; typedef struct zt_maintinfo @@ -408,9 +434,10 @@ struct zt_versioninfo { #define ZT_IOMUX _IOWR (ZT_CODE, 9, int) /* - * Get Span Status (_COMPAT is deprecated) + * Get Span Status */ -#define ZT_SPANSTAT_COMPAT _IOWR (ZT_CODE, 10, struct zt_spaninfo_compat) +#define ZT_SPANSTAT_V1 _IOWR (ZT_CODE, 10, struct zt_spaninfo_v1) +#define ZT_SPANSTAT_V2 _IOWR (ZT_CODE, 10, struct zt_spaninfo_v2) #define ZT_SPANSTAT _IOWR (ZT_CODE, 10, struct zt_spaninfo) /* @@ -1391,6 +1418,10 @@ struct zt_span { void *pvt; /* Private stuff */ char name[40]; /* Span name */ char desc[80]; /* Span description */ + const char *spantype; /* span type in text form */ + const char *manufacturer; /* span's device manufacturer */ + const char *devicetype; /* span's device type */ + char location[40]; /* span device's location in system */ int deflaw; /* Default law (ZT_MULAW or ZT_ALAW) */ int alarms; /* Pending alarms on span */ int flags; |