suppserv.h doesnt include asn1.h anymore

This commit is contained in:
nadi 2006-08-16 14:15:52 +00:00
parent f68f64e503
commit 96fff64a25
10 changed files with 61 additions and 67 deletions

View File

@ -1,6 +1,7 @@
#ifndef __ASN1_H__
#define __ASN1_H__
#include "suppserv.h"
#include <asm/types.h>
#include <sys/types.h>
#include <stdio.h>
@ -60,24 +61,6 @@ struct ReqCallDeflection {
int pres;
};
struct AOCDChargingUnit {
short chargeNotAvailable;
short freeOfCharge;
int recordedUnits;
int typeOfChargingInfo;
int billingId;
};
struct AOCDCurrency {
short chargeNotAvailable;
short freeOfCharge;
char currency[11];
int currencyAmount;
int multiplier;
int typeOfChargingInfo;
int billingId;
};
struct ServedUserNumberList {
struct PartyNumber partyNumber[10];
};
@ -100,8 +83,8 @@ struct asn1Invoke {
struct ActDivNotification actNot;
struct DeactDivNotification deactNot;
struct ReqCallDeflection reqCD;
struct AOCDChargingUnit AOCDchu;
struct AOCDCurrency AOCDcur;
struct FacAOCDChargingUnit AOCDchu;
struct FacAOCDCurrency AOCDcur;
} o;
};
@ -337,11 +320,11 @@ int ParseComponent(struct asn1_parm *parm, u_char *p, u_char *end);
int XParseComponent(struct asn1_parm *parm, u_char *p, u_char *end);
int ParseAOCECurrency(struct asn1_parm *pc, u_char *p, u_char *end, int dummy);
int ParseAOCDChargingUnit(struct asn1_parm *pc,u_char *p, u_char *end, struct AOCDChargingUnit *chu);
int ParseAOCDCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur);
int ParseAOCDCurrencyInfo(struct asn1_parm *pc,u_char *p, u_char *end, struct AOCDCurrency *cur);
int ParseAOCDChargingUnitInfo(struct asn1_parm *pc,u_char *p, u_char *end, struct AOCDChargingUnit *chu);
int ParseRecordedCurrency(struct asn1_parm *pc,u_char *p, u_char *end, struct AOCDCurrency *cur);
int ParseAOCDChargingUnit(struct asn1_parm *pc,u_char *p, u_char *end, struct FacAOCDChargingUnit *chu);
int ParseAOCDCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur);
int ParseAOCDCurrencyInfo(struct asn1_parm *pc,u_char *p, u_char *end, struct FacAOCDCurrency *cur);
int ParseAOCDChargingUnitInfo(struct asn1_parm *pc,u_char *p, u_char *end, struct FacAOCDChargingUnit *chu);
int ParseRecordedCurrency(struct asn1_parm *pc,u_char *p, u_char *end, struct FacAOCDCurrency *cur);
int ParseRecordedUnitsList(struct asn1_parm *pc,u_char *p, u_char *end, int *recordedUnits);
int ParseTypeOfChargingInfo(struct asn1_parm *pc,u_char *p, u_char *end, int *typeOfChargingInfo);
int ParseRecordedUnits(struct asn1_parm *pc,u_char *p, u_char *end, int *recordedUnits);
@ -350,7 +333,7 @@ int ParseAOCECurrencyInfo(struct asn1_parm *pc, u_char *p, u_char *end, int dumm
int ParseAOCEChargingUnitInfo(struct asn1_parm *pc,u_char *p, u_char *end, int dummy);
int ParseAOCEBillingId(struct asn1_parm *pc,u_char *p, u_char *end, int *billingId);
int ParseCurrency(struct asn1_parm *pc,u_char *p, u_char *end, char *currency);
int ParseAmount(struct asn1_parm *pc,u_char *p, u_char *end, struct AOCDCurrency *cur);
int ParseAmount(struct asn1_parm *pc,u_char *p, u_char *end, struct FacAOCDCurrency *cur);
int ParseCurrencyAmount(struct asn1_parm *pc,u_char *p, u_char *end, int *currencyAmount);
int ParseMultiplier(struct asn1_parm *pc,u_char *p, u_char *end, int *multiplier);
int ParseTypeOfUnit(struct asn1_parm *pc,u_char *p, u_char *end, int *typeOfUnit);

View File

@ -1,10 +1,10 @@
/* $Id: asn1_address.c,v 1.1 2006/08/15 16:29:13 nadi Exp $
/* $Id: asn1_address.c,v 1.2 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "asn1.h"
#include <stdio.h>
#include <string.h>
#include "suppserv.h"
void buildnumber(char *num, int oc3, int oc3a, char *result, int version,
int *provider, int *sondernummer, int *intern, int *local,

View File

@ -1,15 +1,15 @@
/* $Id: asn1_aoc.c,v 1.2 2006/08/16 13:14:54 nadi Exp $
/* $Id: asn1_aoc.c,v 1.3 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "suppserv.h"
#include "asn1.h"
#include <string.h>
// ======================================================================
// AOC EN 300 182-1 V1.3.3
int
ParseAOCDCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur)
ParseAOCDCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur)
{
INIT;
@ -27,7 +27,7 @@ ParseAOCDCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurre
}
int
ParseAOCDChargingUnit(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDChargingUnit *chu)
ParseAOCDChargingUnit(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDChargingUnit *chu)
{
INIT;
@ -71,7 +71,7 @@ ParseAOCEChargingUnit(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
// AOCDCurrencyInfo
int
ParseAOCDSpecificCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur)
ParseAOCDSpecificCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur)
{
INIT;
@ -83,7 +83,7 @@ ParseAOCDSpecificCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct A
}
int
ParseAOCDCurrencyInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur)
ParseAOCDCurrencyInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur)
{
INIT;
@ -98,7 +98,7 @@ ParseAOCDCurrencyInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDC
// AOCDChargingUnitInfo
int
ParseAOCDSpecificChargingUnits(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDChargingUnit *chu)
ParseAOCDSpecificChargingUnits(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDChargingUnit *chu)
{
INIT;
@ -112,7 +112,7 @@ ParseAOCDSpecificChargingUnits(struct asn1_parm *pc, u_char *p, u_char *end, str
}
int
ParseAOCDChargingUnitInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDChargingUnit *chu)
ParseAOCDChargingUnitInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDChargingUnit *chu)
{
INIT;
@ -128,11 +128,11 @@ ParseAOCDChargingUnitInfo(struct asn1_parm *pc, u_char *p, u_char *end, struct A
// RecordedCurrency
int
ParseRecordedCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur)
ParseRecordedCurrency(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur)
{
INIT;
XSEQUENCE_1(ParseCurrency, ASN1_TAG_IA5_STRING, 1, cur->currency);
XSEQUENCE_1(ParseCurrency, ASN1_TAG_IA5_STRING, 1, (char *)cur->currency);
XSEQUENCE_1(ParseAmount, ASN1_TAG_SEQUENCE, 2, cur);
return p - beg;
@ -291,7 +291,7 @@ ParseCurrency(struct asn1_parm *pc, u_char *p, u_char *end, char *currency)
// Amount
int
ParseAmount(struct asn1_parm *pc, u_char *p, u_char *end, struct AOCDCurrency *cur)
ParseAmount(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAOCDCurrency *cur)
{
INIT;

View File

@ -1,8 +1,8 @@
/* $Id: asn1_basic_service.c,v 1.1 2006/08/15 16:29:13 nadi Exp $
/* $Id: asn1_basic_service.c,v 1.2 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "suppserv.h"
#include "asn1.h"
// ======================================================================
// Basic Service Elements EN 300 196-1 D.6

View File

@ -1,9 +1,9 @@
/* $Id: asn1_comp.c,v 1.2 2006/08/16 13:14:54 nadi Exp $
/* $Id: asn1_comp.c,v 1.3 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "asn1.h"
#include <stdio.h>
#include "suppserv.h"
// ======================================================================
// Component EN 300 196-1 D.1

View File

@ -1,9 +1,9 @@
/* $Id: asn1_diversion.c,v 1.2 2006/08/16 13:14:54 nadi Exp $
/* $Id: asn1_diversion.c,v 1.3 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "asn1.h"
#include <stdio.h>
#include "suppserv.h"
// ======================================================================
// Diversion Supplementary Services ETS 300 207-1 Table 3

View File

@ -1,8 +1,8 @@
/* $Id: asn1_enc.c,v 1.1 2006/08/15 16:29:13 nadi Exp $
/* $Id: asn1_enc.c,v 1.2 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "suppserv.h"
#include "asn1.h"
#include <string.h>
int encodeNull(__u8 *dest)

View File

@ -1,8 +1,8 @@
/* $Id: asn1_generic.c,v 1.2 2006/08/16 13:14:54 nadi Exp $
/* $Id: asn1_generic.c,v 1.3 2006/08/16 14:15:52 nadi Exp $
*
*/
#include "suppserv.h"
#include "asn1.h"
// ======================================================================
// general ASN.1

View File

@ -7,12 +7,23 @@
* Portions of this file are based on the mISDN sources
* by Karsten Keil.
*
* This program is free software, distributed under the terms of
* the GNU General Public License, Version 2.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "suppserv.h"
#include "asn1.h"
#include "asn1_diversion.h"
#include "l3dss1.h"
#include <string.h>
@ -122,21 +133,11 @@ int decodeFac (__u8 *src, struct FacParm *fac)
return 0;
case Fac_AOCDCurrency:
fac->Function = Fac_AOCDCurrency;
fac->u.AOCDcur.chargeNotAvailable = pc.u.inv.o.AOCDcur.chargeNotAvailable;
fac->u.AOCDcur.freeOfCharge = pc.u.inv.o.AOCDcur.freeOfCharge;
strncpy((char *)fac->u.AOCDcur.currency, pc.u.inv.o.AOCDcur.currency, 11);
fac->u.AOCDcur.currencyAmount = pc.u.inv.o.AOCDcur.currencyAmount;
fac->u.AOCDcur.multiplier = pc.u.inv.o.AOCDcur.multiplier;
fac->u.AOCDcur.typeOfChargingInfo = pc.u.inv.o.AOCDcur.typeOfChargingInfo;
fac->u.AOCDcur.billingId = pc.u.inv.o.AOCDcur.billingId;
memcpy(&(fac->u.AOCDcur), &(pc.u.inv.o.AOCDcur), sizeof(struct FacAOCDCurrency));
return 0;
case Fac_AOCDChargingUnit:
fac->Function = Fac_AOCDChargingUnit;
fac->u.AOCDchu.chargeNotAvailable = pc.u.inv.o.AOCDchu.chargeNotAvailable;
fac->u.AOCDchu.freeOfCharge = pc.u.inv.o.AOCDchu.freeOfCharge;
fac->u.AOCDchu.recordedUnits = pc.u.inv.o.AOCDchu.recordedUnits;
fac->u.AOCDchu.typeOfChargingInfo = pc.u.inv.o.AOCDchu.typeOfChargingInfo;
fac->u.AOCDchu.billingId = pc.u.inv.o.AOCDchu.billingId;
memcpy(&(fac->u.AOCDchu), &(pc.u.inv.o.AOCDchu), sizeof(struct FacAOCDChargingUnit));
return 0;
default:
goto _dec_err;

View File

@ -7,15 +7,25 @@
* Portions of this file are based on the mISDN sources
* by Karsten Keil.
*
* This program is free software, distributed under the terms of
* the GNU General Public License, Version 2.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __SUPPSERV_H__
#define __SUPPSERV_H__
#include "asn1.h"
#include <asm/types.h>
/*