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_lsta.h


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



#ident "@(#) $Id: sls_lsta.h,v 0.8.2.1 2002/10/18 02:40:38 brian Exp $"

#ifndef __SLS_LSTA_H__
#define __SLS_LSTA_H__

/*
 *  Signalling Link Terminal Allocation (LSTA) Figure 41/Q.704
 */

static inline void lk_lsta_determine_terminal(lk_t * lk)
{
	if (lk->statem.lsta_state == LK_STATE_IDLE) {
		if (0) {	/* any terminals idle */
			/* select terminal */
			lk->statem.activation = 0;
			lk->statem.restoration = 0;
		} else if (1) {	/* any terminals available */
			if (lk->statem.activation)
				lk_lsla_no_terminal(lk);
			if (lk->statem.restoration)
				lk_lslr_no_terminal(lk);
			lk->statem.activation = 0;
			lk->statem.restoration = 0;
		} else {
			/* select terminal */
			lk->statem.lsta_state = LK_STATE_WAIT;
			lk_lsac_deactivate_link(lk);	/* selected terminal */
		}

	}
}

static inline void lk_lsta_terminal_idle(lk_t * lk)
{
	switch (lk->statem.lsta_state) {
	case LK_STATE_IDLE:
		lk->statem.terminal_idle = 1;
		break;
	case LK_STATE_WAIT:
		if (lk->statem.activation)
			lk_lsla_terminal(lk);
		if (lk->statem.restoration)
			lk_lslr_terminal(lk);
		break;
	}
}

static inline void lk_lsta_terminal_available(lk_t * lk)
{
	lk->statem.terminal_available = 1;
}

#endif				/* __SLS_LSTA_H__ */


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

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

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