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/ua/ua_ctrl.c


File /code/strss7/drivers/ua/ua_ctrl.c


#ident "@(#) $RCSfile: ua_ctrl.c,v $ $Name:  $($Revision: 0.8.2.1 $) $Date: 2002/10/18 02:26:19 $"

static char const ident[] =
    "$RCSfile: ua_ctrl.c,v $ $Name:  $($Revision: 0.8.2.1 $) $Date: 2002/10/18 02:26:19 $";

#include <ss7/ua_lm.h>
#include <ss7/ua_lm_ioctl.h>

/*
 *  LM AS ADD Request
 *  -------------------------------------------------------------------------
 *  This request adds a new Application Server structure.  If the Application
 *  Server structure for the indicated protocol id or application server id
 *  already exists, the request will fail with error -EINVAL.
 */
static int lm_as_add_req(queue_t * q, mblk_t * pdu)
{
	mblk_t *rp;
	as_t *as;
	lm_as_add_req_t *p = (lm_as_req_t *) pdu->b_rptr;
	ulong asid = p->asid;
	ulong protoid = p->protoid;

	for (as = ua_as_list; as && (as->id != asid || as->proto != protoid); as = as->next);
	if (as)
		return lm_error_reply(q, pdu, LM_AS_ADD_REQ, -EINVAL);
	if (!(as = kmalloc(sizeof(*as), GFP_KERNEL)))
		return lm_error_reply(q, pdu, LM_AS_ADD_REQ, -ENOMEM);
	if (!(rp = lm_ok_ack(LM_AS_ADD_REQ))) {
		kfree(as);
		return (-ENOBUFS);
	}
	bzero(as, sizeof(*as));
	as->proto = protoid;
	as->id = asid;
	/* 
	 *  TODO: Add AS in AS list for protocol, add AS Id into RC/IID hash
	 *  for protocol.
	 */
	qreply(q, rp);
	freemsg(pdu);
	return (0);
}

/*
 *  LM AS DELete Request
 *  -------------------------------------------------------------------------
 *  This request deletes an existing Application Server structure.  If the
 *  Application Server structure is in use, this request will generate the
 *  additional messages necessary to free the application server structure
 *  from use and then delete the structure.
 */
static int lm_as_del_req(queue_t * q, mblk_t * pdu)
{
}

/*
 *  LM ASP ADD Request
 *  -------------------------------------------------------------------------
 *  This request configures an existing linked stream as an Application Server
 *  Process.  If the stream (identified by muxid) does not exist, the error
 *  -EINVAL is returned.  If the ASP (identified by protocol id and asp id)
 *  already exits, the stream is associated with that ASP with the given load
 *  selector and priority.  If the indicated ASP structure does not exist, a
 *  new ASP structure is created.  Only a transport stream can be configured
 *  in this way.  Once the ASP structure is allocated and configured
 *  (including specific queue operations for the stream), the queue is enbled
 *  and put into operation.  If no ASP identifier is provided (ASP Id==0) in
 *  the request, after the stream receives an ASPUP with an ASP Id, the ASP Id
 *  will be associated with the stream.
 */
static int lm_asp_add_req(queue_t * q, mblk_t * mp)
{
}

/*
 *  LM ASP DELete Request
 *  -------------------------------------------------------------------------
 *  This request deletes an existing Application Service Processor structure.
 *  If the ASP structure is in use, this request will generate the additional
 *  primitives necessary to free the ASP structure from use and then delete
 *  the structure.  The caller may then I_UNLINK or I_PUNLINK the stream to
 *  return the stream to the caller.  The further disposition of the stream is
 *  the responsibility of the caller.
 */
static int lm_asp_del_req(queue_t * q, mblk_t * mp)
{
}

/*
 *  LM SGP ADD Request
 *  -------------------------------------------------------------------------
 *  This request configures an existing linked stream as a Signalling Gateway
 *  Process.  If the stream (identified by the muxid) does not exist, the
 *  error -EINVAL is returned.  If the SGP (identified by protocol id and sgp
 *  id) already exists, the stream is associated with that SGP with the given
 *  load selector and priority.  If the indicated SGP structure does not
 *  exist, a new SGP structure is created.  Both SS7 provider and transport
 *  streams can be configured in this way.  Once the SGP structure is
 *  allocated and configured
 */
static int lm_sgp_add_req(queue_t * q, mblk_t * mp)
{
}

/*
 *  LM SGP DELete Request
 *  -------------------------------------------------------------------------
 */
static int lm_sgp_del_req(queue_t * q, mblk_t * mp)
{
}

/*
 *  LM SPP ADD Request
 *  -------------------------------------------------------------------------
 *  The SPP is a special kind of SGP process which converts downwards SGP
 *  primitives into upwards SGP primitive at the remote end.  This request
 *  configures and existing linked stream as a Signalling Point Process.  If
 *  the stream (identified by muxid) does not exist, the error -EINVAL is
 *  returned.  If the SGP (identified by protocol id and spp id) already
 *  
 *  exists, the stream is associated with that SPP with the given load
 *  selector and priority.  If the indicated SPP structure does not exist, a
 *  new SPP structure is created.  Only transport streams can be configured in
 *  this way.  Once the SPP structure is allocated and configured (including
 *  specific queue operations for the stream), the queue is enabled and put
 *  into operation.
 */
static int lm_spp_add_req(queue_t * q, mblk_t * mp)
{
}

/*
 *  LM SPP DELete Request
 *  -------------------------------------------------------------------------
 */
static int lm_spp_del_req(queue_t * q, mblk_t * mp)
{
}


Home Index Prev Next More Download Info FAQ Mail   Home -> Resources -> Browse Source -> strss7/drivers/ua/ua_ctrl.c

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

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