OpenSS7
SS7 for the
Common Man

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified:

Home Overview Status News Documentation Resources About
   
 Overview
 Status
 News
 Documentation
 Resources
 About

   
Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/drivers/slsi/sls.h


File /code/strss7/drivers/slsi/sls.h



#ifndef __SLS_H__
#define __SLS_H__

#ident "@(#) $RCSfile: sls.h,v $ $Name:  $($Revision: 0.8.2.1 $) $Date: 2002/10/18 02:40:37 $"

#ifdef __KERNEL__

/* multiplexor lower stream definitions (per link) */

struct ll;
struct lk;
struct ls;

typedef struct ll {
	struct ll *next;
	ls_ulong flags;
	struct lk *link;
	struct bufq cob_buf;		/* changeover-changeback buffer */
	struct bufq rtr_buf;		/* retrieval buffer */
} ll_t;

typedef struct lp {
	ls_ulong flags;
	queue_t *rq;
	queue_t *wq;
} lp_t;

typedef struct lk_ucalls {
	void (*lk_msg_for_routing) (struct lk *, mblk_t *);
	void (*lk_msg_for_discrim) (struct lk *, mblk_t *);
	void (*lk_inhibited) (struct lk *);
	void (*lk_inhibit_denied) (struct lk *);
	void (*lk_inhibit_failed) (struct lk *);
	void (*lk_uninhibited) (struct lk *);
	void (*lk_uninhibit_failed) (struct lk *);
	void (*lk_force_uninhibit_failed) (struct lk *);
	void (*lk_available) (struct lk *);
	void (*lk_unavailable) (struct lk *);
	void (*lk_retrieved_message) (struct lk *, mblk_t *);
	void (*lk_retrieval_complete) (struct lk *);
	void (*lk_congested) (struct lk *, int, int);
	void (*lk_congestion_ceased) (struct lk *, int, int);
	void (*lk_in_service_at_l2) (struct lk *);
} lk_ucalls_t;

typedef struct lk_dcalls {
	void (*sl_signal_unit) (struct lk *, int, mblk_t *);
	void (*sl_stop) (struct lk *);
	void (*sl_start) (struct lk *);
	void (*sl_restart) (struct lk *);
	void (*sl_inhibit) (struct lk *);
	void (*sl_uninhibit) (struct lk *);
} lk_dcalls_t;

typedef struct lk_mcalls {
	void (*sl_pdu) (struct lk *, mblk_t *);
	void (*sl_emerg) (struct lk *);
	void (*sl_normal) (struct lk *);
	void (*sl_start) (struct lk *);
	void (*sl_stop) (struct lk *);
	void (*sl_bsnt) (struct lk *);
	void (*sl_fsnc) (struct lk *, int);
	void (*sl_resume) (struct lk *);
	void (*sl_clear_bufs) (struct lk *);
	void (*sl_clear_rtb) (struct lk *);
	void (*sl_lpo) (struct lk *);
	void (*sl_cg_discard) (struct lk *);
	void (*sl_cg_accept) (struct lk *);
	void (*sl_no_cong) (struct lk *);
	void (*sl_power_on) (struct lk *);
} lk_mcalls_t;

typedef struct lk_driver {
	struct lk_driver *next;
	int cmajor;
	int minor;
	struct lk *list;
	struct streamtab *info;
	struct lmi_ops ops;
	struct sl_dcalls *dcalls;
	struct sl_ucalls *ucalls;
} lk_driver_t;

typedef lmi_option_t lk_option_t;

typedef struct lk_timers {
	ls_ulong t;			/* co/cb timer */
	ls_ulong tt1;			/* t1 (SLTC ACK) timer */
	ls_ulong tt2;			/* t2 (SLTC SND) timer */
	ls_ulong t1;			/* TCOC timer */
	ls_ulong t2;			/* TCOC timer */
	ls_ulong t3;			/* TCBC timer */
	ls_ulong t4;			/* TCBC timer */
	ls_ulong t5;			/* TCBC timer */
	ls_ulong t7;
	ls_ulong t12;			/* Waiting for uninhibit acknowledge */
	ls_ulong t13;			/* Waiting for force unihibit */
	ls_ulong t14;			/* Waiting for inhibition acknowledgement */
	ls_ulong t17;			/* Delay to avoid oscillation of initial alignment failure
					   and link restart */
	ls_ulong t22;			/* Local inhibit test timer */
	ls_ulong t23;			/* Remote inhibit test timer */
	ls_ulong t24;			/* Stabilising timer after removal of local processor
					   outage, used in LPO latching to RPO (national option) */

} lk_timers_t;

#define LK_MAX_TIMERIDS 3
#define LK_MAX_BUFCALLS 8

typedef ls_ulong lk_bufcid_t[LK_MAX_BUFCALLS];

typedef struct lk {
	struct lk *next;
	struct ls *module;
	struct lk_ucalls *ucalls;
	struct lk_mcalls *dcalls;
	struct sl *device;
	lk_driver_t *driver;
	int muxid;
	queue_t *rq;
	queue_t *wq;
	ls_ulong state;
	ls_ulong flags;
	ls_ulong ids[0];
	lk_timers_t timers;
	lk_bufcid_t bufids;
	lk_option_t option;
	lk_config_t config;
	lk_statem_t statem;
	lk_stats_t stats;
	lk_notify_t notify;
} lk_t;

/* multiplexor upper stream definitions (per link set) */

struct mtpl;

typedef struct ls_ucalls {
	void (*ls_msg_for_routing) (struct ls *, mblk_t *);
	void (*ls_msg_for_discrim) (struct ls *, mblk_t *);
	void (*ls_inhibited) (struct ls *, int);
	void (*ls_inhibit_denied) (struct ls *, int);
	void (*ls_inhibit_failed) (struct ls *, int);
	void (*ls_uninhibited) (struct ls *, int);
	void (*ls_uninhibit_failed) (struct ls *, int);
	void (*ls_force_uninhibit_failed) (struct ls *);
	void (*ls_available) (struct ls *);
	void (*ls_unavailable) (struct ls *);
	void (*ls_retrieved_message) (struct ls *, mblk_t *);
	void (*ls_retrieval_complete) (struct ls *);
	void (*ls_congested) (struct ls *, int, int);
	void (*ls_congestion_ceased) (struct ls *, int, int);
	void (*ls_in_service_at_l2) (struct ls *);
} ls_ucalls_t;

typedef struct ls_dcalls {
	void (*ls_signal_unit) (struct ls *, int, mblk_t *);
	void (*ls_stop) (struct ls *);
	void (*ls_start) (struct ls *);
	void (*ls_restart) (struct ls *);
	void (*ls_inhibit) (struct ls *);
	void (*ls_uninhibit) (struct ls *);
	void (*ls_emergency) (struct ls *);
	void (*ls_normal) (struct ls *);
} ls_dcalls_t;

typedef struct ls_mcalls {
	void (*ls_msg_from_routing) (struct ls *, mblk_t *);
	void (*ls_msg_for_dist) (struct ls *, mblk_t *);
	void (*ls_msg_for_reroute) (struct ls *, mblk_t *);
	void (*ls_lk_activate) (struct ls *, int);
	void (*ls_lk_deactivate) (struct ls *, int);
	void (*ls_lk_inhibit) (struct ls *, int);
	void (*ls_lk_uninhibit) (struct ls *, int);
	void (*ls_activate) (struct ls *);
	void (*ls_deactivate) (struct ls *);
	void (*ls_inhibit) (struct ls *);
	void (*ls_uninhibit) (struct ls *);
	void (*ls_force_uninhibit) (struct ls *);
	void (*ls_routing_outage) (struct ls *);
	void (*ls_routing_recovered) (struct ls *);
	void (*ls_critical) (struct ls *);
	void (*ls_noncritical) (struct ls *);
	void (*ls_emerg) (struct ls *);
	void (*ls_emerg_ceases) (struct ls *);
	void (*ls_traffic) (struct ls *);
	void (*ls_no_traffic) (struct ls *);
	void (*ls_adj_inaccessible) (struct ls *);
	void (*ls_adj_accessible) (struct ls *);
} ls_mcalls_t;

struct ls;

typedef struct ls_driver {
	struct ls_driver *next;
	int cmajor;
	int nminor;
	struct ls *list;
	struct streamtab *info;
	struct lmi_ops ops;
	struct lk_dcalls *dcalls;
	struct lk_ucalls *ucalls;
} ls_driver_t;

typedef lmi_option_t ls_option_t;

typedef struct ls_timers {
} ls_timers_t;

#define LS_MAX_TIMERIDS 0
#define LS_MAX_BUFCALLS 8

typedef ls_ulong ls_bufcid_t[LS_MAX_BUFCALLS];

#define LS_MAX_LINKS 16

typedef struct ls {
	struct ls *next;		/* next device in device list */
	struct mtpl *module;
	struct ls_ucalls *ucalls;
	struct ls_mcalls *dcalls;
	struct lk *device;		/* lower mux list */
	ls_driver_t *driver;
	dev_t devnum;
	queue_t *rq;
	queue_t *wq;
	ls_ulong state;
	ls_ulong flags;
	ls_ulong ids[0];
	ls_timers_t timers;
	ls_bufcid_t bufids;
	ls_option_t option;
	ls_config_t config;
	ls_statem_t statem;
	ls_stats_t stats;
	ls_notify_t notify;
	struct ll llinks[LS_MAX_LINKS];	/* logical link structures */
	struct lk *plinks[LS_MAX_LINKS];	/* physical link structures */
} ls_t;

#endif				/* __KERNEL__ */

#endif				/* __SLS_H__ */


Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/drivers/slsi/sls.h

OpenSS7
SS7 for the
Common Man
Home Overview Status News Documentation Resources About

© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved.
Last modified: