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/sigtran/ua_lm.h


File /code/strss7/drivers/sigtran/ua_lm.h



#ifndef __SS7_UA_LM_H__
#define __SS7_UA_LM_H__

#ident "@(#) $Name:  $($Revision: 0.8.2.2 $) Copyright (c) 1997-2001 OpenSS7 Corporation."

/*
 *  Includes for Layer Management Primitives: used for UA configuration.
 */

#define LM_MUX_ADD	50
#define LM_SGP_ADD	51
#define LM_ASP_ADD	52

#define LM_PROT_NONE		0
#define LM_PROT_NSP		2
#define LM_PROT_TSP		3

#define LM_LEVEL_NONE		0
#define LM_LEVEL_M2UA		1
#define LM_LEVEL_M3UA		2
#define LM_LEVEL_ISUA		3
#define LM_LEVEL_SUA		4
#define LM_LEVEL_TUA		5

/*
 *  LM_REG_IND
 *  -----------------------------------
 *  Indication given by the UA driver to the LM to indicate that a
 *  registration request message was received by an ASP proxy process and that
 *  the registration request could not be satistfied by searching the existing
 *  configured AS for the given registration key.
 *
 *  prim -
 *	the primitive type; always LM_REQ_IND
 *
 *  spid -
 *	the local SP Id.  This is the instance of an SGP that is locally
 *	represented.
 */
typedef struct {
	long prim;			/* Always LM_REG_IND */
	ulong spid;			/* SP Id */
	ulong aspid;			/* ASP Id */
};

/*
 *  LM_SG_ADD
 *  -----------------------------------
 *  Requests that the UA driver add the specified SG to the UA datastructures.
 */
typedef struct {
	long prim;			/* Always LM_SG_ADD */
	ulong id;			/* SG identifier */
	ulong level;			/* protocol level of SG */
	ulong tmode;			/* Traffic Mode Type */
	ulong min_count;		/* minimum no of active stripes */
	ulong max_count;		/* maximum no of active stripes */
} lm_sg_add_t;

/*
 *  LM_AS_ADD
 *  -----------------------------------
 *  Requests that the UA driver add the specified AS to the UA datastructures.
 *
 *  There are two times that this primitive is issued by a layer manager:
 *
 *  1)	In response to a LM_REG_IND.  The layer manager uses ths primitive to
 *	add any necessary AS before responding with an LM_REG_RES.
 *
 *  2)	To statically configure an AS.
 *
 *  The key offset and length can be used to provide a routing or link key
 *  that will be associated with the AS in support of automatic dynamic
 *  registration.  LM_REG_INDs will only be generated for REG REQ that cannot
 *  find an AS entry with a matching route (link) key.
 */
typedef struct {
	long prim;			/* Always LM_AS_ADD */
	ulong id;			/* SG identifier */
	ulong level;			/* protocol level of AS */
	ulong tmode;			/* Traffic Mode Type */
	ulong min_count;		/* minimum no of active stripes */
	ulong max_count;		/* maximum no of active stripes */
	ulong rc;			/* RC or IID for this AS */
	ulong key_length;		/* Routing (link) key length */
	ulong key_offset;		/* Routing (link) key offset */
} lm_as_add_t;

/*
 *  LM_SGP_ADD
 *  -----------------------------------
 *  Requests that the UA driver associate a linked transport stream into the
 *  UA datastructures at the given protocol level.  The NSP or TSP Transport
 *  stream has an SGP datastructure created and is associated with the SG
 *  identified in the primitve.  The UA driver will bring the ASP up for the
 *  newly available SGP and register and activate the AS associated with the
 *  specified SG with the newly available SGP.  The indicated stream must have
 *  been linked under the UA driver and the identified SG must have already
 *  been created before this primitive is issued.
 *
 *  All these datastructures can be removed by unlinking the stream.
 */
typedef struct {
	ulong prim;			/* Always LM_SGP_ADD */
	long muxid;			/* identity of linked stream */
	ulong id;			/* SGP identifier */
	ulong sg;			/* SG identifier */
	ulong cost;			/* cost metric */
} lm_sgp_req_t;

/*
 *  LM_ASP_ADD
 *  -----------------------------------
 *  Requests that the UA driver associate a linked transport stream into the
 *  UA datastructures at the given protocol level.  The NSP or TSP Transport
 *  stream has an ASP datastructure created and is given the ASP Id indicated.
 *  The UA driver will await ASPUP and ASPAC commands from the peer on this
 *  stream before allocating further datastructures.
 *
 *  If the `id' in the primitive is zero, the ASP structure will be assigned a
 *  zero ASP Id and the ASP will be expected to identify itself in an ASPUP
 *  REQ message with an ASP Identifier parameter.  If the `id' in the
 *  primitive is non-zero, the ASP will not be required to identify itself.
 *
 */
typedef struct {
	ulong prim;			/* Always LM_ASP_ADD */
	ulong muxid;			/* identify of linked stream */
	ulong id;			/* ASP identifier */
	ulong sg;			/* SG identifier */
	ulong cost;			/* cost metric */
} lm_asp_req_t;

/*
 *  LM_MUX_ADD
 *  -----------------------------------
 *  Requests that the UA driver characterize the linked stream.
 */
typedef struct {
	long prim;			/* Always LM_MUX_ADD */
	long muxid;			/* identity of linked stream */
	ulong prot;			/* protocol of stream */
	ulong level;			/* level of stream */
} lm_mux_add_t;

/*
 *  Includes for Layer Management Primitives: used by the UA configuration
 *  daemons and some by the user in Application Server mode.
 */

#define LM_LINK_IND		50	/* something happend on link below */

#define LM_AS_ADD_REQ		51
#define LM_AS_DEL_REQ		52
#define LM_PROC_ADD_IND		53
#define LM_PROC_DEL_IND		54
#define LM_LINK_ADD_IND		55
#define LM_LINK_DEL_IND		56
#define LM_ROUTE_ADD_IND	57
#define LM_ROUTE_DEL_IND	58
#define LM_OK_ACK		59
#define LM_ERROR_ACK		60
#define LM_REG_IND		61
#define LM_REG_RES		62
#define LM_REG_REF		63
#define LM_DEREG_IND		64
#define LM_ERROR_IND		65

/*
 *  Process types:
 */
#define LM_ASP	0x01		/* ASP - Application Server Process proxy */
#define LM_SGP	0x02		/* SGP - Signalling Gateway Process proxy */
#define LM_SPP	0x04		/* SPP - Signalling Point Process proxy */

#define LM_SS7	0x10		/* The ASP/SGP is an SS7 stream */
#define LM_IPC	0x20		/* The ASP/SGP is an IPC stream */
#define LM_UAP	0x40		/* The ASP/SGP/SPP is a UA proxy */

/*
 *  LM_AS_ADD_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver add or augment the application server for the
 *  protocol on whose user or control queue the request was issued.  The AS
 *  identifier is for further reference.  The RC or IID identifier will be
 *  added to the AS if the AS already exists with the specified AS Id.
 *
 *  The layer or local management queue normally uses this primitive to add an
 *  application server which does not yet exist at boot time or in response to
 *  an LM_REG_REQ before issuing an LM_REG_RES.
 *
 *  The optional routing (link) key is only required for statically allocated
 *  Application Servers.  This key is used to bind/connect SS7 provider
 *  streams which support the AS or to generate REG REQ to SGP/SPP IPC and
 *  UA proxies.  I don't really intend to use this function, but it is
 *  there to support all SIGTRAN UA allocation modes.
 */
typedef struct {
	ulong prim;			/* always LM_AS_ADD_REQ */
	ulong flags;			/* flags */
	ulong asid;			/* AS identifier */
	ulong rc;			/* RC or IID for the AS */
	ulong tmode;			/* Traffic Mode */
	ulong KEY_offset;		/* Routing (Link) Key offset */
	ulong KEY_length;		/* Routing (Link) Key length */
} lm_as_add_req_t;

#define LM_AS_AUTODEL	0x01	/* The AS will be removed when unused */
#define LM_AS_PERM	0x02	/* The AS will survive loss of lmq */

/*
 *  LM_AS_DEL_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver remove the application server for the protocol on
 *  whose local or layer management stream the request was issued.  The AS
 *  identifier must be the same as that provided in the LM_AS_ADD_REQ.
 */
typedef struct {
	ulong prim;			/* always LM_AS_DEL_REQ */
	ulong asid;			/* RC or IID AS identifier */
} lm_as_del_req_t;

/*
 *  LM_PROC_ADD_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver add an ASP/SGP/SPP proxy process.  This is for
 *  static configuration of proxy processes only.  Dynamic configuration will
 *  create SGP and SPP proxy processes on demand.
 */
typedef struct {
	ulong prim;			/* always LM_PROC_ADD_REQ */
	ulong type;			/* type of process */
	ulong aspid;			/* process identifier */
	ulong load;			/* load selector */
	ulong prio;			/* routing priority */
} lm_proc_add_req_t;

/*
 *  LM_PROC_DEL_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver delete the indicated ASP/SGP/SPP proxy process.
 *  This is for static configuration of proxy processes only.  Dynamic
 *  configuration will delete SGP and SPP proxy processes on demand.
 */
typedef struct {
	ulong prim;			/* always LM_PROC_DEL_REQ */
	ulong type;			/* type of process */
	ulong aspid;			/* process identifier */
} lm_proc_del_req_t;

/*
 *  LM_LINK_ADD_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver configures and associates the indicated linked
 *  (muxid) stream as the indicated type of proxy and associate it with the
 *  indicated local or remote ASP identifier.  Transport SGP or SPP proxies
 *  must have aspids associated with them.  Transport ASP proxies have may
 *  either have fixed aspids associated with them or may have aspid set to
 *  zero, the aspid to be identified in a subsequent ASPUP message from the
 *  ASP if the ASP requires dynamic registration.
 */
typedef struct {
	ulong prim;			/* always LM_LINK_ADD_REQ */
	ulong muxid;			/* multiplexor ID */
	ulong flags;			/* link add flags */
	ulong type;			/* type of process */
	ulong aspid;			/* process Identifier */
	ulong load;			/* Load Selector */
	ulong prio;			/* routing priority */
} lm_asp_add_req_t;
/*
 *  Link add flags:
 */
#define LM_DEFAULT_PROTOID	0x00000001	/* use proto as default */

/*
 *  LM_LINK_DEL_REQ
 *  -------------------------------------------------------------------------
 *  Requests that the driver disassociate and possibly free the indicated
 *  linked (muxid) stream from the indicated protocol, process type, and
 *  process.
 */
typedef struct {
	ulong prim;			/* always LM_LINK_DEL_REQ */
	ulong muxid;			/* multiplexor ID */
	ulong type;			/* type of process */
	ulong aspid;			/* process Identifier */
} lm_asp_del_req_t;

/*
 *  LM_ROUTE_ADD_REQ
 *  -------------------------------------------------------------------------
 */
typedef struct {
	ulong prim;			/* always LM_ROUTE_ADD_REQ */
} lm_route_add_req_t;

/*
 *  LM_ROUTE_DEL_REQ
 *  -------------------------------------------------------------------------
 */
typedef struct {
	ulong prim;			/* always LM_ROUTE_DEL_REQ */
} lm_route_del_req_t;

/*
 *  LM_OK_ACK
 *  -------------------------------------------------------------------------
 *  Used by the driver to indicate success of a primitive issued by local or
 *  layer management.
 */
typedef struct {
	ulong prim;			/* always LM_OK_ACK */
	ulong correct_prim;		/* correct primitive */
} lm_ok_ack_t;

/*
 *  LM_ERROR_ACK
 *  -------------------------------------------------------------------------
 *  Used by the driver to indicate failure of a primitive issued by local or
 *  layer management.
 */
typedef struct {
	ulong prim;			/* always LM_ERROR_ACK */
	ulong error_prim;		/* primitive in error */
	ulong errno;			/* LM error number */
	ulong unix_error;		/* Unix error code */
} lm_error_ack_t;

/*
 *  LM_REG_IND
 *  -------------------------------------------------------------------------
 *  This indication indicates to management that a registration request has
 *  been received from an ASP with the specified protocol Id and ASP Id and
 *  the indicated routing keys.  If the registration request is acceptable
 *  management responds with a LM_REG_RES indicating the configured
 *  application server by routing context.  If the registration request fails,
 *  management responds with a LM_REG_REF refusing the request.
 */
typedef struct {
	ulong prim;			/* always LM_REG_IND */
	ulong muxid;			/* stream receiving request */
	ulong aspid;			/* ASP generating request */
	ulong load;			/* Load selection of request *//* XXX */
	ulong prio;			/* priority of request *//* XXX */
	ulong KEY_number;		/* routing key number */
	ulong KEY_offset;		/* routing key offset */
	ulong KEY_length;		/* routing key length */
	/* followed routing keys */
} lm_reg_ind_t;

/*
 *  LM_REG_RES
 *  -------------------------------------------------------------------------
 *  The response tells the multiplexer that layer management has accepted a
 *  registration request and provides the routing context.
 */
typedef struct {
	ulong prim;			/* always LM_REG_RES */
	ulong muxid;			/* stream receiving request */
	ulong aspid;			/* ASP generating request */
	ulong load;			/* Load selection of request *//* XXX */
	ulong prio;			/* priority of request *//* XXX */
	ulong context;			/* RC/IID of application server */
} lm_reg_res_t;

/*
 *  LM_ERROR_IND
 *  -------------------------------------------------------------------------
 *  The driver uses this primitive to indicate a fatal error with respect to a
 *  linked stream which requires that the stream be unlinked.
 */
typedef struct {
	ulong prim;			/* always LM_ERROR_IND */
	ulong muxid;			/* id of linked stream */
	ulong errno;			/* LM error number */
	ulong unix_error;		/* Unix error code */
} lm_error_ind_t;

#endif				/* __SS7_UA_LM_H__ */


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

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

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