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/sua/sua_ctrl.h


File /code/strss7/drivers/sua/sua_ctrl.h



#ifndef __SUA_CTRL_H__
#define __SUA_CTRL_H__

#ident "@(#) $Id: sua_ctrl.h,v 0.8.2.1 2002/10/18 02:33:28 brian Exp $"

/*
 *  =========================================================================
 *
 *  Module --> Module (Control messages)
 *
 *  =========================================================================
 */
static inline mblk_t *m_error(int r_error, int w_error)
{
	mblk_t *mp;
	if ((mp = allocb(2, BPRI_HI))) {
		mp->b_datap->db_type = M_ERROR;
		*(mp->b_wptr++) = r_error;
		*(mp->b_wptr++) = w_error;
	}
	return (mp);
}
static inline mblk_t *m_hangup(void)
{
	mblk_t *mp;
	if ((mp = allocb(0, BPRI_HI))) {
		mp->b_datap->db_type = M_HANGUP;
	}
	return (mp);
}
static inline mblk_t *m_flush(int flags, int band)
{
	mblk_t *mp;
	if ((mp = allocb(2, BPRI_HI))) {
		mp->b_datap->db_type = M_FLUSH;
		*(mp->b_wptr++) = flags;
		*(mp->b_wptr++) = band;
	}
	return (mp);
}
static inline int m_error_reply(queue_t * q, mblk_t * pdu, int r_error, int w_error)
{
	mblk_t *mp;
	if ((mp = m_error(r_error, w_error))) {
		qreply(q, mp);
		return (-EPROTO);
	}
	return (-ENOBUFS);
}

#endif				/* __SUA_CTRL_H__ */


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

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

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