OpenSS7 SS7 for the Common Man |
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |
||||||||||||||||||||||||||
Home | Overview | Status | News | Documentation | Resources | About | |||||||||||||||||||||
File /code/strss7/drivers/ua/ua_data.hh#ifndef __UA_DATA_HH__ #define __UA_DATA_HH__ #ident "@(#) $Id: ua_data.hh,v 0.8 2002/04/02 08:21:15 brian Exp $" #pragma interface class pp; class dp : public pp; class lp : public pp; class ipsp; class asp : public ipsp; class sgp : public ipsp; class spp : public ipsp; class sp; class as : public sp; class sg : public sp; class gp; class np; class gp { public: gp(void); /* constructor */ ~gp(void); /* destructor */ sp *sp; /* this SP assoc this SPP */ gp *sp_next; /* prev SP assoc this SPP */ gp **sp_prev; /* prev SP assoc this SPP */ spp *spp; /* this SPP assoc this SP */ gp *spp_next; /* next SPP assoc this SP */ gp **spp_prev; /* prev SPP assoc this SP */ uint state; /* state of this SPP in this SP */ uint loadshare; /* loadshare selector (stripe) */ uint broadcast; /* broadcast selector (mirror) */ uint priority; /* priority of this SPP this SP */ uint cost; /* cost of use this SPP this SP */ }; class np { public: sp *as; /* this AS assoc this SG */ np *as_next; /* next AS assoc this SG */ np **as_prev; /* prev AS assoc this SG */ sp *sg; /* this SG assoc this AS */ np *sg_next; /* next SG assoc this AS */ np **sg_prev; /* prev SG assoc this AS */ uint id; /* id this AS in this SG (RC) */ uint state; /* state SG serv this AS */ uint loadshare; /* loadshare selector (stripe) */ uint broadcast; /* broadcast selector (mirror) */ uint priority; /* priority SG for this AS */ uint cost; /* cost of use SG for this AS */ rt *rt; /* routing SG in this AS */ rt **rt_hash; /* routing SG in this AS */ }; class pp { private: static pp *list; /* class list */ pp *next; /* next object in class list */ pp **prev; /* prev object in class list */ protected: int rd(mblk_t *); /* read queue processing */ int wr(mblk_t *); /* write queue processing */ static INT rput(queue_t *, mblk_t *); /* read (msg from below) */ static INT rsrv(mblk_t *); /* read queue service */ static INT wput(queue_t *, mblk_t *); /* write (msg from below) */ static INT wsrv(mblk_t *); /* write queue service */ public: pp(void); /* constructor */ ~pp(void); /* destructor */ queue_t *q; /* associated read queue */ queue_t *lmq; /* associated layer mgmt queue */ virtual int m_r_data (mblk_t *); virtual int m_r_proto (mblk_t *); virtual int m_r_error (mblk_t *); virtual int m_r_flush (mblk_t *); virtual int m_r_hangup(mblk_t *); virtual int m_w_data (mblk_t *); virtual int m_w_proto (mblk_t *); virtual int m_w_error (mblk_t *); virtual int m_w_flush (mblk_t *); virtual int m_w_hangup(mblk_t *); }; class dp : public pp { private: static dp *list; /* class list */ dp *next; /* next object in class list */ dp **prev; /* prev object in class list */ public: dp(void); /* constructor */ ~dp(void); /* destructor */ sp *sp; /* AS/SG for user/provider */ }; class lp : public pp { private: static lp *list; /* class list */ lp *next; /* next object in class list */ lp **prev; /* prev object in class list */ public: lp(void); /* constructor */ ~lp(void); /* destructor */ ipsp *spp; /* default sig process proxy */ }; class ipsp { private: static ipsp *list; /* class list */ ipsp *next; /* next object in class list */ ipsp **prev; /* prev object in class list */ public: ipsp(void); /* constructor */ ~ipsp(void); /* destructor */ pp *pp; /* dev/mux class pointer */ gp *gp; /* graph of AS for this IPSP */ uint id; /* IPSP Id */ enum { DOWN=0, INACTIVE, ACTIVE, WACK_BEAT, WACK_ASPUP, WACK_ASPDN, WACK_ASPAC, WACK_ASPIA }; uint state; /* state */ uint use_count; /* use count for auto dealloc */ uint t_beat; /* timer for heartbeats */ uint t_ack; /* timer for ack of messages */ bufq buf; /* buffer for failovers */ virtual int recv(mblk_t *); /* recv method */ virtual int send(mblk_t *); /* send method */ }; class asp : public ipsp { private: static asp *list; /* class list */ asp *next; /* next object in class list */ asp **prev; /* prev object in class list */ public: asp(void); /* constructor */ ~asp(void); /* destructor */ virtual int recv(mblk_t *); /* recv method */ virtual int send(mblk_t *); /* send method */ }; class sgp : public ipsp { private: static sgp *list; /* class list */ sgp *next; /* next object in class list */ sgp **prev; /* prev object in class list */ public: sgp(void); /* constructor */ ~sgp(void); /* destructor */ sg *sg; /* SG for this SGP */ virtual int recv(mblk_t *); /* recv method */ virtual int send(mblk_t *); /* send method */ }; class spp : public ipsp { private: static spp *list; /* class list */ spp *next; /* next object in class list */ spp **prev; /* prev object in class list */ public: spp(void); /* constructor */ ~spp(void); /* destructor */ virtual int recv(mblk_t *); /* recv method */ virtual int send(mblk_t *); /* send method */ }; class sp { private: static sp *list; /* class list */ sp *next; /* next object in class list */ sp **prev; /* prev object in class list */ public: sp(void); /* constructor */ ~sp(void); /* destructor */ np *np; /* graph of peer nodes this SP */ np **np_hash; /* cache of peer nodes this SP */ gp *gp; /* graph of SPPs for this node */ pp *pp; /* SS7 U/P for this SP */ enum { DOWN=0, INACTIVE, ACTIVE, PENDING, BLOCKED }; uint state; /* state of this node */ uint use_count; /* use count for auto dealloc */ enum { }; uint tmode; /* traffic mode for this SP */ uint min_count; /* min number active stripes */ uint max_count; /* max number active stripes */ uint sppdn_count; /* SPPs in down state */ uint sppia_count; /* SPPs in inactive state */ uint sppac_count; /* SPPs in active state */ lsa lsa[UA_LSA_MASK+1]; /* load selection control array */ virtual void sppdn(spp *); /* notify spp down */ virtual void sppac(spp *); /* notify spp active */ virtual void sppia(spp *); /* notify spp inactive */ }; class sg : public sp { private: static sg *list; /* class list */ sg *next; /* next object in class list */ sg **prev; /* prev object in class list */ public: sg(void); /* constructor */ ~sg(void); /* destructor */ virtual void sppdn(spp *); /* notify spp down */ virtual void sppac(spp *); /* notify spp active */ virtual void sppia(spp *); /* notify spp inactive */ }; class as : public sp { private: static as *list; /* class list */ as *next; /* next object in class list */ as **prev; /* prev object in class list */ public: as(void); /* constructor */ ~as(void); /* destructor */ virtual void sppdn(spp *); /* notify spp down */ virtual void sppac(spp *); /* notify spp active */ virtual void sppia(spp *); /* notify spp inactive */ }; #endif __UA_DATA_HH__
|
|||||||||||||||||||||||||||
OpenSS7 SS7 for the Common Man |
Home | Overview | Status | News | Documentation | Resources | About | ||||||||||||||||||||
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |