/*****************************************************************************

 @(#) $Id: L3_Codec.H,v 1.3 2000/10/13 15:45:51 brian Exp $

 -----------------------------------------------------------------------------

 Copyright (C) 1997-2000  Brian Bidulock <bidulock@dallas.net>

 All Rights Reserved.

 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 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.,
 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 Last Modified $Date: 2000/10/13 15:45:51 $ by $Author: brian $

 -----------------------------------------------------------------------------

 $Log: L3_Codec.H,v $
 Revision 1.3  2000/10/13 15:45:51  brian
 First public release.

 *****************************************************************************/

#ifndef __SS7_L3_CODEC_H__
#define __SS7_L3_CODEC_H__

#include "Codec.H"
#include "SS7_Codec.H"
#include <unistd.h>

class Codec_UP : public Content {
    public:
        OctetString*    PDU;
        Codec_UP(char*,char*);
    };

class Codec_RL : public Parameter {
    public:
        Codec_PC*   OPC;
        Codec_PC*   DPC;
        Field*      SLS;
        Codec_RL(char*,char*);
    };

class Codec_SDLI : public Parameter {
    public:
        Field*  SLC;
        Field*  SDLI;
        Codec_SDLI(char*,char*);
    };

class Codec_DEST : public Parameter {
    public:
        Codec_PC*   DEST;
        Codec_DEST(char*,char*);
    };

class Codec_DS  : public Parameter {
    public:
        Codec_PC*   DEST;
        Field*      STAT;
        Codec_DS(char*,char*);
    };

class Codec_FSNL : public Parameter {
    public:
        Field* SLC;
        Field* FSNL;
        Codec_FSNL(char*,char*);
    };

class Codec_CBC : public Parameter {
    public:
        Field* SLC;
        Field* CBC;
        Codec_CBC(char*,char*);
    };

class Codec_SLC : public Parameter {
    public:
        Field* SLC;
        Codec_SLC(char*,char*);
    };

class Codec_TMSG : public Parameter {
    public:
        Field*       SLC;
        Field*       TLI;
        OctetString* TMSG;
        Codec_TMSG(char*,char*);
    };

class Codec_DUPI : public Parameter {
    public:
        Codec_PC*   DEST;
        Set*        UPI;
        Codec_DUPI(char*,char*);
    };

class Codec_UFC : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_DUPI* UPU;
        Codec_DUPI* UPA;
        Codec_DUPI* UPT;
        Codec_UFC(char*,char*);
    };

class Codec_DLM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_SDLI* DLC;
        Codec_SLC * CSS;
        Codec_SLC * CNS;
        Codec_SLC * CNP;
        Codec_DLM(char*,char*);
    };

class Codec_TRM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_NULL* TRA;
        Codec_NULL* TRW;
        Codec_TRM(char*,char*);
    };

class Codec_MIM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_SLC* LIN;
        Codec_SLC* LUN;
        Codec_SLC* LIA;
        Codec_SLC* LUA;
        Codec_SLC* LID;
        Codec_SLC* LFU;
        Codec_SLC* LLT;
        Codec_SLC* LRT;
        Codec_MIM(char*,char*);
    };

class Codec_RSM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_DEST* RST;
        Codec_DEST* RSR;
        Codec_DEST* RCP;
        Codec_DEST* RCR;
        Codec_RSM(char*,char*);
    };

class Codec_TFM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_DEST* TFP;
        Codec_DEST* TCP;
        Codec_DEST* TFR;
        Codec_DEST* TCR;
        Codec_DEST* TFA;
        Codec_DEST* TCA;
        Codec_TFM(char*,char*);
    };

class Codec_FCM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_NULL* RCT;
        Codec_DS*   TFC;
        Codec_FCM(char*,char*);
    };

class Codec_ECM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_SLC* ECO;
        Codec_SLC* ECA;
        Codec_ECM(char*,char*);
    };

class Codec_CHM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_FSNL* COO;
        Codec_FSNL* COA;
        Codec_CBC*  CBD;
        Codec_CBC*  CBA;
        Codec_CHM(char*,char*);
    };

class Codec_TM : public Content {
    public:
        Field*  H1;
        Bra*    H1_B;
        Codec_TMSG* SLTM;
        Codec_TMSG* SLTA;
        Codec_TM(char*,char*);
    };

class Codec_SNSM : public Content {
    public:
        Field*  H0;
        Bra*    H0_B;
        Codec_TM*  TM;
        Codec_SNSM(char*,char*);
    };

class Codec_SNTM : public Content {
    public:
        Field*  H0;
        Bra*    H0_B;
        Codec_TM* TM;
        Codec_SNTM(char*,char*);
    };

class Codec_SNMM : public Content {
    public:
        Field*  H0;
        Bra*    H0_B;
        Codec_CHM*  CHM;
        Codec_ECM*  ECM;
        Codec_FCM*  FCM;
        Codec_TFM*  TFM;
        Codec_RSM*  RSM;
        Codec_MIM*  MIM;
        Codec_TRM*  TRM;
        Codec_DLM*  DLM;
        Codec_UFC*  UFC;
        Codec_SNMM(char*,char*);
    };

class Codec_L3 : public Header {
    public:
        Field*      SI;
        Set*        MP;
        Set*        NI;
        Codec_RL*   RL;
        Bra*        SI_B;
        Codec_SNMM* SNMM;
        Codec_SNTM* SNTM;
        Codec_SNSM* SNSM;
        Codec_UP*   SCCP;
        Codec_UP*   TUP;
        Codec_UP*   ISUP;
        Codec_UP*   DUP1;
        Codec_UP*   DUP2;
        Codec_UP*   MTUP;
        Codec_L3();
    };

#endif __SS7_L3_CODEC_H__
