MME2 changes - Propped commits from openmme/paging branch. Added scripts
for code gen

Change-Id: Ie55032217232214ac8544ca76ea34335205329e4
diff --git a/include/cmn/basicTypes.h b/include/cmn/basicTypes.h
new file mode 100644
index 0000000..7ea0e44
--- /dev/null
+++ b/include/cmn/basicTypes.h
@@ -0,0 +1,7 @@
+#include <stdint.h>
+
+typedef uint8_t Uint8;
+typedef uint16_t Uint16;
+typedef uint32_t Uint32;
+typedef uint64_t Uint64;
+
diff --git a/include/cmn/blockingCircularFifo.h b/include/cmn/blockingCircularFifo.h
new file mode 100644
index 0000000..41069d7
--- /dev/null
+++ b/include/cmn/blockingCircularFifo.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_CMN_BLOCKINGCIRCULARFIFO_H_
+#define INCLUDE_CMN_BLOCKINGCIRCULARFIFO_H_
+
+#include <cstddef>
+#include <semaphore.h>
+#include "circularFifo.h"
+
+namespace cmn {
+	namespace utils {
+
+		template<typename Element, size_t size>
+		class BlockingCircularFifo
+		{
+		public:
+			BlockingCircularFifo():circularQueue()
+			{
+				sem_init(&pop_semaphore, 0, 0);
+				sem_init(&push_semaphore, 0, size);
+			}
+
+			~BlockingCircularFifo()
+			{
+				sem_destroy(&pop_semaphore);
+				sem_destroy(&push_semaphore);
+			}
+
+			bool push(Element* item)
+			{
+				sem_wait(&push_semaphore);
+				bool ret = circularQueue.push(item);
+				if (ret)
+					sem_post(&pop_semaphore);
+				else
+					sem_post(&push_semaphore);
+				return ret;
+			}
+
+			bool pop(Element*& item)
+			{
+				sem_wait(&pop_semaphore);
+				bool ret = circularQueue.pop(item);
+				if (ret)
+					sem_post(&push_semaphore);
+				else
+					sem_post(&pop_semaphore);
+				return ret;
+			}
+
+		private:
+			CircularFifo<Element, size> circularQueue;
+			sem_t pop_semaphore;
+			sem_t push_semaphore;
+		};
+	}
+}
+#endif /* INCLUDE_CMN_BLOCKINGCIRCULARFIFO_H_ */
diff --git a/include/cmn/circularFifo.h b/include/cmn/circularFifo.h
new file mode 100644
index 0000000..30e629b
--- /dev/null
+++ b/include/cmn/circularFifo.h
@@ -0,0 +1,94 @@
+/*
+ * This code is in public domain.
+ * Implementation and its platform dependent issues discussed in
+ * https://kjellkod.wordpress.com/2012/11/28/c-debt-paid-in-full-wait-free-lock-free-queue/
+ */
+
+#ifndef INCLUDE_CMN_CIRCULARFIFO_H_
+#define INCLUDE_CMN_CIRCULARFIFO_H_
+
+#include <atomic>
+#include <cstddef>
+
+namespace cmn {
+	namespace utils {
+		template<typename Element, size_t Size>
+		class CircularFifo
+		{
+			public:
+				enum { Capacity = Size + 1 };
+
+				CircularFifo() : _tail(0), _head(0){}
+				virtual ~CircularFifo() {}
+
+				bool push(Element* item);
+				bool pop(Element*& item);
+
+				bool wasEmpty() const;
+				bool wasFull() const;
+				bool isLockFree() const;
+
+			private:
+				size_t increment(size_t idx) const;
+
+				std::atomic <size_t>  _tail;
+				Element*    _array[Capacity];
+				std::atomic<size_t>   _head;
+		};
+
+		template<typename Element, size_t Size>
+		bool CircularFifo<Element, Size>::push(Element* item)
+		{
+			const auto current_tail = _tail.load(std::memory_order_relaxed);
+			const auto next_tail = increment(current_tail);
+			if(next_tail != _head.load(std::memory_order_acquire))
+			{
+				_array[current_tail] = item;
+				_tail.store(next_tail, std::memory_order_release);
+				return true;
+			}
+
+			return false;
+		}
+
+		template<typename Element, size_t Size>
+		bool CircularFifo<Element, Size>::pop(Element*& item)
+		{
+			const auto current_head = _head.load(std::memory_order_relaxed);
+			if(current_head == _tail.load(std::memory_order_acquire))
+				return false;
+
+			item = _array[current_head];
+			_head.store(increment(current_head), std::memory_order_release);
+			return true;
+		}
+
+		template<typename Element, size_t Size>
+		bool CircularFifo<Element, Size>::wasEmpty() const
+		{
+			return (_head.load() == _tail.load());
+		}
+
+		template<typename Element, size_t Size>
+		bool CircularFifo<Element, Size>::wasFull() const
+		{
+			const auto next_tail = increment(_tail.load());
+			return (next_tail == _head.load());
+		}
+
+		template<typename Element, size_t Size>
+		bool CircularFifo<Element, Size>::isLockFree() const
+		{
+			return (_tail.is_lock_free() && _head.is_lock_free());
+		}
+
+		template<typename Element, size_t Size>
+		size_t CircularFifo<Element, Size>::increment(size_t idx) const
+		{
+			return (idx + 1) % Capacity;
+		}
+	}
+}
+
+
+#endif /* INCLUDE_CMN_CIRCULARFIFO_H_ */
diff --git a/include/cmn/dataGroupManager.h b/include/cmn/dataGroupManager.h
new file mode 100644
index 0000000..b1dc16e
--- /dev/null
+++ b/include/cmn/dataGroupManager.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DATA_GROUP_MANAGER_H
+#define DATA_GROUP_MANAGER_H
+
+#include <deque>
+#include "controlBlock.h"
+#include <mutex>
+
+using namespace SM;
+
+namespace cmn {
+namespace DGM
+{
+	class DataGroupManager
+	{
+		public:
+		
+			DataGroupManager();
+			virtual ~DataGroupManager();
+			
+			void initializeCBStore( int DataCount );
+			virtual ControlBlock* allocateCB();
+			virtual void deAllocateCB( uint32_t cbIndex );
+			SM::ControlBlock* findControlBlock( uint32_t index );
+
+		protected:
+			ControlBlock* cbstore_m;		// Indexed Store
+
+		private:
+			std::deque<ControlBlock*> freeQ_m;	// free Q
+			std::mutex mutex_m;
+
+	};
+};
+};
+#endif
diff --git a/include/cmn/debug.h b/include/cmn/debug.h
new file mode 100644
index 0000000..8a7a393
--- /dev/null
+++ b/include/cmn/debug.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DEBUG_H_
+#define DEBUG_H_
+
+#include <iostream>
+#include <sstream>
+#include <stdint.h>
+
+using namespace std;
+
+namespace cmn
+{
+namespace utils
+{
+typedef enum{
+              LEVEL_1,
+              LEVEL_2,
+              LEVEL_3,
+              LEVEL_4
+            }DebugLevel;
+
+
+class Debug{
+public:
+  Debug();
+  ~Debug();
+
+  void printDebugStream();
+  void printDebugStreamToFile();
+
+  void add(char* data);
+  void add(uint8_t data);
+  void add(uint16_t data);
+  void add(uint32_t data);
+  void add(uint64_t data);
+  
+  void endOfLine();
+  void startNewLine();
+  void incrIndent();
+  void decrIndent();
+
+  void clearStream();
+ 
+  void setHexOutput();
+  void unsetHexOutput();
+
+private:
+
+  ostringstream stream;
+  uint8_t indent;
+  bool newLine;
+};
+};
+};
+
+#endif /* DEBUGUTILS_H_ */
+
diff --git a/include/cmn/ipcChannel.h b/include/cmn/ipcChannel.h
new file mode 100644
index 0000000..eb0dd31
--- /dev/null
+++ b/include/cmn/ipcChannel.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_CMN_IPCCHANNEL_H_
+#define INCLUDE_CMN_IPCCHANNEL_H_
+
+#include "ipcTypes.h"
+
+namespace cmn {
+namespace ipc {
+
+class IpcChannel {
+public:
+	IpcChannel(IpcChannelType ipcType);
+	virtual ~IpcChannel();
+
+	IpcChannelType getIpcChannelType() const;
+	void setIpcChannelType(const IpcChannelType ipcType);
+
+	IpcChannelHdl getIpcChannelHdl() const;
+	void setIpcChannelHdl(const IpcChannelHdl ipcHdl, const IpcChannelType ipcType);
+
+	virtual void sendMsgTo(void * buffer, uint32_t len, IpcAddress destAddress) = 0;
+	virtual uint32_t recvMsgFrom(void * buffer, uint32_t bufLen, IpcAddress& srcAddress) = 0;
+
+protected:
+	IpcChannelType ipcType_m;
+	IpcChannelHdl ipcHdl_m;
+};
+
+} /* namespace ipc */
+} /* namespace cmn */
+
+#endif /* INCLUDE_CMN_IPCCHANNEL_H_ */
diff --git a/include/cmn/ipcTypes.h b/include/cmn/ipcTypes.h
new file mode 100644
index 0000000..d8855ed
--- /dev/null
+++ b/include/cmn/ipcTypes.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_CMN_IPCTYPES_H_
+#define INCLUDE_CMN_IPCTYPES_H_
+
+#include <stdint.h>
+
+namespace cmn {
+namespace ipc {
+
+enum class IpcChannelType
+{
+	tipc_c,
+	maxIpcType_c
+};
+
+union IpcChannelHdl
+{
+	uint32_t u32;
+};
+
+union IpcAddress
+{
+	uint32_t u32;
+};
+
+typedef struct IpcMsgHeader
+{
+	IpcAddress destAddr;
+	IpcAddress srcAddr;
+
+} IpcMsgHeader;
+
+} /* namespace ipc */
+} /* namespace cmn */
+
+
+
+
+#endif /* INCLUDE_CMN_IPCTYPES_H_ */
diff --git a/include/cmn/memPoolManager.h b/include/cmn/memPoolManager.h
new file mode 100644
index 0000000..61d614a
--- /dev/null
+++ b/include/cmn/memPoolManager.h
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_CMN_MEMPOOLMANAGER_H_
+#define INCLUDE_CMN_MEMPOOLMANAGER_H_
+
+#include <cstdint>
+#include <memory>
+#include <cstring>
+
+namespace cmn {
+	namespace memPool {
+		template <typename T>
+		class MemBlock
+		{
+		public:
+                        union Data {
+                                MemBlock<T>* next_mp;
+                                alignas(alignof(T)) uint8_t dataBlock_m[sizeof(T)];
+                        };
+
+			MemBlock() { memset(data_m.dataBlock_m, 0, sizeof(T)); }
+
+			void reset() { memset(data_m.dataBlock_m, 0, sizeof(T)); }
+
+			MemBlock<T>* getNextMemBlock() { return data_m.next_mp; }
+			void setNextMemBlock(MemBlock<T>* nxtBlk_p) { data_m.next_mp = nxtBlk_p; }
+
+			T* getDataBlock() { return (reinterpret_cast<T*> (data_m.dataBlock_m)); }
+
+		private:
+			Data data_m;
+		};
+
+		template <typename T>
+		class MemChunk
+		{
+		public:
+
+			MemChunk(uint32_t numOfBlocks)
+			{
+				std::unique_ptr<MemBlock<T>[]> blkArray_p(new MemBlock<T>[numOfBlocks]);
+				blockArray_mpa.reset(blkArray_p.release());
+
+				uint32_t  i = 1;
+				for (; i < numOfBlocks; i++)
+				{
+					blockArray_mpa[i-1].setNextMemBlock(&blockArray_mpa[i]);
+				}
+				blockArray_mpa[i].setNextMemBlock(NULL);
+			}
+
+			MemBlock<T>* getMemBlockArray() { return blockArray_mpa.get(); }
+
+			void setNextMemChunk(std::unique_ptr<MemChunk> &&nxtChunk_p) { nextMemChunk_mp.reset(nxtChunk_p.release()); }
+
+		private:
+			std::unique_ptr<MemChunk<T>> nextMemChunk_mp;
+			std::unique_ptr<MemBlock<T>[]> blockArray_mpa;
+		};
+
+		template <typename T>
+		class MemPoolManager
+		{
+		public:
+			MemPoolManager(size_t chunkSize):chunkSize_m(chunkSize),
+					currentChunk_mp(new MemChunk<T>(chunkSize)),
+					freeList_mp(currentChunk_mp->getMemBlockArray())
+			{
+
+			}
+
+			template <typename... Args> T* allocate(Args &&... args)
+			{
+				if (freeList_mp == NULL)
+				{
+					std::unique_ptr<MemChunk<T>> newChunk_p (new MemChunk<T>(chunkSize_m));
+					newChunk_p->setNextMemChunk(std::move(currentChunk_mp));
+					currentChunk_mp.reset(newChunk_p.release());
+
+					freeList_mp = currentChunk_mp->getMemBlockArray();
+				}
+				MemBlock<T>* currentBlock_p = freeList_mp;
+				freeList_mp = freeList_mp->getNextMemBlock();
+
+				T* dataBlock_p = currentBlock_p->getDataBlock();
+
+				new (dataBlock_p) T(std::forward<Args>(args)...);
+				return dataBlock_p;
+			}
+
+			void free(T* data_p)
+			{
+			    data_p->T::~T();
+			    MemBlock<T>* currentBlock_p = reinterpret_cast<MemBlock<T>*>(data_p);
+			    
+			    currentBlock_p->reset();
+
+			    currentBlock_p->setNextMemBlock(freeList_mp);
+			    freeList_mp = currentBlock_p;
+			}
+		private:
+			size_t chunkSize_m;
+			std::unique_ptr<MemChunk<T>> currentChunk_mp;
+			MemBlock<T>* freeList_mp;
+		};
+	}
+}
+
+
+#endif /* INCLUDE_CMN_MEMPOOLMANAGER_H_ */
diff --git a/include/cmn/msgBuffer.h b/include/cmn/msgBuffer.h
new file mode 100644
index 0000000..fcf799b
--- /dev/null
+++ b/include/cmn/msgBuffer.h
@@ -0,0 +1,88 @@
+/*
+ * MsgBuffer.h
+ *
+ *  Created on: Feb 13, 2011
+ *      Author: hariharanb
+ */
+
+#ifndef MSGBUFFER_H_
+#define MSGBUFFER_H_
+
+#include <sstream>
+#include <debug.h>
+
+#include <stdint.h>
+
+#define DEFAULT_BUFF_SIZE 1024
+
+using namespace std;
+extern cmn::utils::Debug errorStream;
+namespace cmn
+{
+namespace utils
+{
+class MsgBuffer
+{
+public:
+
+	MsgBuffer();
+	MsgBuffer(uint16_t size);
+
+	~MsgBuffer();
+
+
+	bool writeBits(uint8_t data, uint8_t size, bool append = true);
+	bool writeBytes(uint8_t* data, uint16_t size, bool append = true);
+	bool writeUint8(uint8_t data,  bool append = true);
+	bool writeUint16(uint16_t data, bool append = true);
+	bool writeUint32(uint32_t data, bool append = true);
+	bool writeUint64(uint64_t data, bool append = true);
+
+	void display (Debug &stream);
+
+	uint8_t readBits(uint16_t size);
+	bool readBytes(uint8_t* data, uint16_t size);
+
+	bool readBit();
+	void readUint8(uint8_t &data);
+	bool readUint16(uint16_t &data);
+	bool readUint32(uint32_t &data);
+	bool readUint64(uint64_t &data);
+	void reset();
+	void rewind();
+	void goToEnd();
+	void skipBits(uint8_t size);
+	void skipBytes(uint16_t size);
+    	uint16_t getLength();
+	uint16_t getBufferSize();
+    	uint16_t getCurrentIndex();
+    	void goToIndex(uint16_t idx);
+
+    	uint8_t charToHex(uint8_t x);
+    	uint16_t lengthLeft();
+    	uint16_t sizeLeft();
+
+    	void* getDataPointer();
+    	void setLength(uint16_t bufLen);
+
+private:
+
+	uint8_t* data_mp;
+	uint16_t bufSize;
+	uint16_t length;
+	uint16_t bitLength;
+	uint16_t byteIndex;
+	uint16_t bitIndex;
+
+	void initialize(uint16_t size);
+	bool incrBitIndex(uint8_t size);
+	bool incrByteIndex(uint16_t size);
+	void nextByte();
+};
+};
+};
+
+using namespace cmn::utils;
+
+#endif /* MSGBUFFER_H_ */
+
diff --git a/include/cmn/tipcSocket.h b/include/cmn/tipcSocket.h
new file mode 100644
index 0000000..da069db
--- /dev/null
+++ b/include/cmn/tipcSocket.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_CMN_TIPCSOCKET_H_
+#define INCLUDE_CMN_TIPCSOCKET_H_
+
+#include "ipcChannel.h"
+
+namespace cmn {
+namespace ipc {
+
+class TipcSocket: public IpcChannel {
+public:
+	TipcSocket();
+	virtual ~TipcSocket();
+
+	bool bindTipcSocket(IpcAddress myAddress);
+
+    virtual void sendMsgTo(void * buffer, uint32_t len, IpcAddress destAddr);
+    virtual uint32_t recvMsgFrom(void * buffer, uint32_t len, IpcAddress& srcAddr);
+
+private:
+    void initialize();
+
+};
+
+} /* namespace ipc */
+} /* namespace cmn */
+
+#endif /* INCLUDE_CMN_TIPCSOCKET_H_ */
diff --git a/include/cmn/tipcTypes.h b/include/cmn/tipcTypes.h
new file mode 100644
index 0000000..6083170
--- /dev/null
+++ b/include/cmn/tipcTypes.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_COMMONFWK_TIPCTYPES_H_
+#define INCLUDE_COMMONFWK_TIPCTYPES_H_
+
+#include <stdint.h>
+
+static const uint32_t tipcServiceAddressType_c = 18888;
+static const uint32_t tipcDomain_c = 0x0;
+
+typedef enum TipcServiceInstance
+{
+	mmeAppInstanceNum_c = 1,
+	s1apAppInstanceNum_c,
+	s6AppInstanceNum_c,
+	s11AppInstanceNum_c,
+
+	maxInstanceNum_c
+
+} TipcInstanceTypes;
+
+#endif /* INCLUDE_COMMONFWK_TIPCTYPES_H_ */
diff --git a/include/common/3gpp_24008.h b/include/common/3gpp_24008.h
new file mode 100644
index 0000000..37c55bc
--- /dev/null
+++ b/include/common/3gpp_24008.h
@@ -0,0 +1,11 @@
+#ifndef __3gpp_24008_h__
+#define __3gpp_24008_h__
+
+/* UE Types */
+
+#define ID_IMSI  1
+#define ID_IMEI  2
+#define ID_IMEISV  3
+#define ID_TMSI  4
+
+#endif
diff --git a/include/common/common_proc_info.h b/include/common/common_proc_info.h
new file mode 100644
index 0000000..d390878
--- /dev/null
+++ b/include/common/common_proc_info.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S11_COMMON_PROC_INFO_H_
+#define __S11_COMMON_PROC_INFO_H_
+
+#include "err_codes.h"
+#include "s1ap_structs.h"
+#include "s1ap_ie.h"
+#include "s11_structs.h"
+
+struct s1ap_common_req_Q_msg {
+    int             IE_type; 
+	int ue_idx;
+	int enb_fd;
+	int enb_s1ap_ue_id;
+	int mme_s1ap_ue_id;
+    enum s1ap_cn_domain cn_domain;
+    unsigned char imsi[BINARY_IMSI_LEN];
+	struct TAI      tai;//TODO: will be list of 16 TAI's for UE.
+	s1apCause_t cause;
+
+	unsigned long ueag_max_ul_bitrate;
+	unsigned long ueag_max_dl_bitrate;
+	struct fteid gtp_teid;
+	unsigned char sec_key[32];
+	unsigned char bearer_id;
+};
+
+struct s11_req_Q_msg {
+    int         IE_type; 
+	struct fteid s11_sgw_c_fteid;
+};
+
+struct s11_resp_Q_msg {
+    int         IE_type; 
+	int 		ue_idx;
+};
+
+enum s1ap_common_req_type
+{
+    S1AP_CTX_REL_REQ,
+    S1AP_CTX_REL_CMD,
+    S1AP_INIT_CTXT_SETUP_REQ,
+    S1AP_PAGING_REQ,
+    S1AP_REQ_UNKNOWN
+};
+
+enum s11_common_req_type
+{
+    S11_RABR_REQ,
+    S11_REQ_UNKNOWN
+};
+
+enum s11_common_resp_type
+{
+    S11_RABR_RESP,
+    S11_RESP_UNKNOWN
+};
+
+#define S1AP_COMMON_REQ_BUF_SIZE sizeof(struct s1ap_common_req_Q_msg)
+
+#define S11_COMM_REQ_STAGE_BUF_SIZE sizeof(struct s11_req_Q_msg)
+#define S11_COMM_RES_STAGE_BUF_SIZE sizeof(struct s11_resp_Q_msg)
+
+#endif /*__S11_COMMON_PROC_INFO_H_*/
+
diff --git a/include/common/err_codes.h b/include/common/err_codes.h
new file mode 100644
index 0000000..9ef2fd8
--- /dev/null
+++ b/include/common/err_codes.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ERROR_CODES_H_
+#define ERROR_CODES_H_
+
+/***
+Common error codes across MME
+*/
+
+enum ERROR_CODES{
+	SUCCESS = 0,
+	/*Generic error codes 0-100*/
+	E_FAIL,
+	E_FAIL_INIT, /*Failed in initialization*/
+	E_ALLOC_FAILED,
+	E_PARSING_FAILED,
+
+	/*S1AP error codes 200-300 */
+	S1AP_AUTH_FAILED = 201,
+	S1AP_SECMODE_FAILED,
+	S1AP_IDENTITY_FAILED,
+
+	/*S6a error codes 300-500*/
+	S6A_AIA_FAILED = 301,
+	S6A_FD_ERROR,
+	S6A_FD_CORE_INIT_FAILED,
+	S6A_FD_CORE_PARSECONF_FAILED,
+	S6A_FD_CORE_START_FAILED,
+	S6A_FD_GET_DICTVAL_FAILED,
+	S6A_FD_DICTSRCH_FAILED,
+};
+
+#endif /* ERROR_CODES_H__*/
diff --git a/include/common/f8.h b/include/common/f8.h
new file mode 100644
index 0000000..df3ef81
--- /dev/null
+++ b/include/common/f8.h
@@ -0,0 +1,37 @@
+/*-----------------------------------------------
+ * * f8.h
+ * *---------------------------------------------
+ */
+
+/* The code has been referred from
+ * 1. https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf
+ * 2. https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf
+ */
+
+
+#ifndef F8_H_
+#define F8_H_
+#include "snow_3g.h"
+
+
+/* f8.
+ * Input key: 128 bit Confidentiality Key.
+ * Input count:32-bit Count, Frame dependent input.
+ * Input bearer: 5-bit Bearer identity (in the LSB side).
+ * Input dir:1 bit, direction of transmission.
+ * Input data: length number of bits, input bit stream.
+ * Input length: 32 bit Length, i.e., the number of bits to be encrypted or
+ * decrypted.
+ * Output data: Output bit stream. Assumes data is suitably memory
+ * allocated.
+ * Encrypts/decrypts blocks of data between 1 and 2^32 bits in length as
+ * defined in Section 3 of
+ * https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf
+ * specs document
+*/
+
+
+void f8( u8 *key, u32 count, u32 bearer, u32 dir, u8 *data, u32 length );
+
+
+#endif
diff --git a/include/common/f9.h b/include/common/f9.h
new file mode 100644
index 0000000..e7e9ff1
--- /dev/null
+++ b/include/common/f9.h
@@ -0,0 +1,33 @@
+/*--------------------------------------------------------
+ * f9.h
+ *--------------------------------------------------------
+*/
+
+
+/* The code has been referred from
+ * 1.https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf
+ * 2.https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf
+*/
+
+#ifndef F9_H_
+#define F9_H_
+#include "snow_3g.h"
+
+/* f9.
+ * Input key: 128 bit Integrity Key.
+ * Input count:32-bit Count, Frame dependent input.
+ * Input fresh: 32-bit Random number.
+ * Input dir:1 bit, direction of transmission (in the LSB).
+ * Input data: length number of bits, input bit stream.
+ * Input length: 64 bit Length, i.e., the number of bits to be MAC'd.
+ * Output : 32 bit block used as MAC
+ * Generates 32-bit MAC using UIA2 algorithm as defined in Section 4
+ * of https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf
+ * specs document.
+ */
+
+
+u8* f9( u8* key, u32 count, u32 fresh, u32 dir, u8 *data, u64 length);
+
+#endif
+
diff --git a/include/common/hss_message.h b/include/common/hss_message.h
new file mode 100644
index 0000000..2835fcb
--- /dev/null
+++ b/include/common/hss_message.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __HSS_MSG_H_
+#define __HSS_MSG_H_
+
+#include "sec.h"
+
+/*Information needed for AIR*/
+enum e_BUF_HDR {
+	HSS_AIR_MSG,
+	HSS_AIA_MSG,
+	HSS_ULR_MSG,
+	HSS_ULA_MSG,
+	//NI Detach
+	HSS_CLR_MSG,
+	HSS_CLA_MSG,
+	//NI Detach
+	HSS_PURGE_MSG,
+	HSS_PURGE_RESP_MSG,
+};
+
+
+#define IMSI_STR_LEN 16
+/*AIR  - request. Struct is same for ULR*/
+struct hss_air_msg {
+	char imsi[IMSI_STR_LEN];
+	unsigned char  plmn_id[3];
+};
+
+/*AIA  - response*/
+struct hss_aia_msg {
+	struct RAND rand;
+	struct XRES xres;
+	struct AUTN autn;
+	struct KASME kasme;
+};
+
+#define HSS_MSISDN_LEN 10
+#define SPARE_LEN 52
+
+/*ULA  - response*/
+struct hss_ula_msg {
+	int subscription_state;
+	unsigned char msisdn[HSS_MSISDN_LEN];
+	unsigned char a_msisdn[HSS_MSISDN_LEN];
+	unsigned char spare[SPARE_LEN];
+};
+
+struct hss_clr_msg {
+	char origin_host;
+	char origin_realm;
+	char user_name;
+	unsigned char cancellation_type;
+};
+
+
+struct hss_pur_msg {
+	int ue_idx;
+	char imsi[IMSI_STR_LEN];
+};
+
+struct hss_req_msg {
+	enum e_BUF_HDR hdr;
+	int ue_idx;
+	union req_data {
+		struct hss_air_msg air;
+	}data;
+};
+
+struct hss_resp_msg {
+	enum e_BUF_HDR hdr;
+	int ue_idx;
+	int result;
+	union resp_data {
+		struct hss_aia_msg aia;
+		struct hss_ula_msg ula;
+		struct hss_clr_msg clr;
+	}data;
+};
+
+#define HSS_RCV_BUF_SIZE 128
+#define HSS_REQ_MSG_SIZE sizeof(struct hss_req_msg)
+#define HSS_RESP_MSG_SIZE sizeof(struct hss_resp_msg)
+
+#endif /*__STAGE6_S6A_MSG_H_*/
+
diff --git a/include/common/ipc_api.h b/include/common/ipc_api.h
new file mode 100644
index 0000000..92ae5ce
--- /dev/null
+++ b/include/common/ipc_api.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef IPC_API_H_
+#define IPC_API_H_
+
+#include <tipcTypes.h>
+
+#define		IPC_MAX_BUFFER_SIZE		1024
+
+#define IPC_MODE 0664
+
+enum ipc_access_mode {
+	IPC_READ = 01,
+	IPC_WRITE = 02,
+};
+
+typedef int ipc_handle;
+
+int
+create_ipc_channel(char *name);
+
+int
+open_ipc_channel(char *name, enum ipc_access_mode access_mode);
+
+int
+create_open_ipc_channel(char *name,
+		enum ipc_access_mode access_mode);
+
+int
+read_ipc_channel(ipc_handle fd, char *buffer, size_t size);
+
+int
+write_ipc_channel(ipc_handle fd, char *buffer, size_t size);
+
+int
+close_ipc_channel(ipc_handle fd);
+
+int
+create_tipc_socket();
+
+int
+bind_tipc_socket(int sockFd, uint32_t instanceNum);
+
+int
+send_tipc_message(int sd, uint32_t destAddr, void * buf, int len);
+
+int
+read_tipc_msg(int sockFd, void * buf, int len);
+
+void
+close_tipc_socket(int sockFd);
+
+
+#endif /* IPC_API_H_ */
diff --git a/include/common/json_data.h b/include/common/json_data.h
new file mode 100644
index 0000000..0d4357b
--- /dev/null
+++ b/include/common/json_data.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __JSON_DATA_H_
+#define __JSON_DATA_H_
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+char *
+get_string_scalar(char *path);
+
+int
+get_ip_scalar(char *path);
+
+int
+get_int_scalar(char *path);
+
+int
+load_json(char *filename);
+
+#endif /**/
diff --git a/include/common/log.h b/include/common/log.h
new file mode 100644
index 0000000..d2d3953
--- /dev/null
+++ b/include/common/log.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LOG_1_H_
+#define __LOG_1_H_
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+enum log_levels{
+	LOG_INFO,
+	LOG_DEBUG,
+	LOG_WARNING,
+	LOG_ERROR,
+};
+
+void log_message(int l, const char *file, int line, const char *fmt, ...);
+//#define log_msg(LOG_LEVEL, ARGS) set_log(#LOG_LEVEL, __FILE__, __LINE__, __VA_ARGS__)
+#define log_msg(LOG_LEVEL, ...) log_message( LOG_LEVEL, __FILE__, __LINE__,  __VA_ARGS__)
+//#define log_msg(LOG_LEVEL, ...) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LOG_1_H_ */
diff --git a/include/common/message_queues.h b/include/common/message_queues.h
new file mode 100644
index 0000000..faf719a
--- /dev/null
+++ b/include/common/message_queues.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MESSAGE_QUEUES_H_
+#define __MESSAGE_QUEUES_H_
+
+#define S1AP_Q_DIR "/tmp/s1ap"
+#define MME_APP_Q_DIR "/tmp/mme-app"
+#define S6A_Q_DIR "/tmp/s6a"
+#define S11_Q_DIR "/tmp/s11"
+
+#define MME_TOTAL_HANDLERS 7
+
+/**
+Message queues used across MME, S1ap, S11, S6a
+**/
+
+
+/********** S1AP READ/WRITE QUEUE *************/
+#define S1AP_READ_QUEUE "/tmp/s1ap/s1ap_read_Q"
+#define S1AP_WRITE_QUEUE "/tmp/s1ap/s1ap_write_Q"
+
+/********** GTP READ/WRITE QUEUE *************/
+#define GTP_READ_QUEUE "/tmp/s11/gtp_read_Q"
+#define GTP_WRITE_QUEUE "/tmp/s11/gtp_write_Q"
+
+/********** S6 READ/WRITE QUEUE *************/
+#define S6_READ_QUEUE "/tmp/s6a/s6_read_Q"
+#define S6_WRITE_QUEUE "/tmp/s6a/s6_write_Q"
+
+#define S6A_REQ_STAGE1_QUEUE "/tmp/s6a/req_Q"
+#define S1AP_AUTHREQ_STAGE2_QUEUE "/tmp/s1ap/authq_stage2_Q"
+#define S1AP_SECREQ_STAGE3_QUEUE "/tmp/s1ap/secreq_stage3_Q"
+#define S1AP_ESMREQ_STAGE4_QUEUE "/tmp/s1ap/esmreq_stage4_Q"
+#define S11_CSREQ_STAGE5_QUEUE "/tmp/s11/CSreq_stage5_Q"
+#define S1AP_ICSREQ_STAGE6_QUEUE "/tmp/s1ap/icsreq_stage6_Q"
+#define S11_MBREQ_STAGE7_QUEUE "/tmp/s11/MBreq_stage7_Q"
+#define S11_DTCHREQ_STAGE1_QUEUE   "/tmp/mme-app/s11_dtchreq_stage1_Q"
+#define S6A_DTCHREQ_STAGE1_QUEUE  "/tmp/mme-app/s6a_dtchreq_stage1_Q"
+#define S1AP_DTCHACCEPT_STAGE2_QUEUE "/tmp/mme-app/s1ap_dtchaccept_stage2_Q"
+#define S6A_PURGE_STAGE2_QUEUE "/tmp/s6a/PURGE_Q"
+
+#endif /*__MESSAGE_QUEUES_H*/
diff --git a/include/common/msgType.h b/include/common/msgType.h
new file mode 100644
index 0000000..f4a13b5
--- /dev/null
+++ b/include/common/msgType.h
@@ -0,0 +1,519 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_COMMON_MSGTYPE_H_
+#define INCLUDE_COMMON_MSGTYPE_H_
+
+#include "err_codes.h"
+#include "s11_structs.h"
+#include "s1ap_structs.h"
+#include "s1ap_ie.h"
+
+
+#define NAS_RAND_SIZE 16
+#define NAS_AUTN_SIZE 16
+
+typedef enum msg_data_t
+{
+    ue_data = 0,
+    session_data
+}msg_data_t;
+
+typedef enum msg_type_t {
+    attach_request = 0,
+    auth_info_request,
+    auth_info_answer,
+    update_loc_request,
+    update_loc_answer,
+    auth_request,
+    auth_response,
+    id_request,
+    id_response,
+    sec_mode_command,
+    sec_mode_complete,
+    esm_info_request,
+    esm_info_response,
+    create_session_request,
+    create_session_response,
+    init_ctxt_request,
+    init_ctxt_response,
+    modify_bearer_request,
+    modify_bearer_response,
+    attach_complete,
+    detach_request,
+    detach_accept,
+    purge_request,
+    purge_answser,
+    delete_session_request,
+    delete_session_response,
+    s1_release_request,
+    s1_release_command,
+    s1_release_complete,
+    release_bearer_request,
+    release_bearer_response,
+    ni_detach_request,
+    detach_accept_from_ue,
+    cancel_location_request,
+    cancel_location_answer,
+    downlink_data_notification,
+    ddn_acknowledgement,
+    paging_request,
+    service_request,
+    ics_req_paging,
+    tau_request,
+    tau_response,
+    max_msg_type
+} msg_type_t;
+
+
+/*************************
+ * Incoming S1AP Messages
+ *************************/
+struct ue_attach_info {
+    int s1ap_enb_ue_id;
+    int criticality;
+    unsigned char IMSI[BINARY_IMSI_LEN];
+    struct TAI tai;
+    struct CGI utran_cgi;
+    struct MS_net_capab ms_net_capab;
+    struct UE_net_capab ue_net_capab;
+    enum ie_RRC_est_cause rrc_cause;
+    int enb_fd;
+    char esm_info_tx_required;
+    unsigned char pti;
+    unsigned int  flags; /* imsi - 0x00000001, GUTI - 0x00000002 */
+    guti mi_guti;
+    unsigned char seq_no;
+    unsigned char dns_present;
+    unsigned short int pco_options[10];
+	
+};
+
+struct authresp_Q_msg {
+    int status;
+    struct XRES res;
+	struct AUTS auts;
+};
+
+struct secmode_resp_Q_msg {
+    int ue_idx;
+    int status;
+};
+
+struct esm_resp_Q_msg {
+    int status;
+    struct apn_name apn;
+};
+
+struct initctx_resp_Q_msg{
+    unsigned short 	eRAB_id;
+    unsigned int 	transp_layer_addr;
+    unsigned int 	gtp_teid;
+};
+
+struct attach_complete_Q_msg {
+    unsigned short	status;
+};
+
+struct service_req_Q_msg {
+        int enb_fd;
+        unsigned int ksi;
+        unsigned int seq_no;
+        unsigned short mac;
+        struct TAI tai;
+        struct CGI utran_cgi;
+        struct STMSI s_tmsi;
+};
+
+struct tauReq_Q_msg {
+    int seq_num;
+    int enb_fd;
+};
+
+struct identityResp_Q_msg {
+	int status;
+	unsigned char IMSI[BINARY_IMSI_LEN];
+};
+
+struct detach_req_Q_msg {
+	int ue_m_tmsi;
+};
+
+typedef union s1_incoming_msgs_t {
+    struct ue_attach_info ue_attach_info_m;
+    struct authresp_Q_msg authresp_Q_msg_m;
+    struct secmode_resp_Q_msg secmode_resp_Q_msg_m;
+    struct esm_resp_Q_msg esm_resp_Q_msg_m;
+    struct initctx_resp_Q_msg initctx_resp_Q_msg_m;
+    struct attach_complete_Q_msg attach_complete_Q_msg_m;
+    struct service_req_Q_msg service_req_Q_msg_m;
+    struct identityResp_Q_msg identityResp_Q_msg_m;
+    struct tauReq_Q_msg tauReq_Q_msg_m;
+    struct detach_req_Q_msg detachReq_Q_msg_m;
+}s1_incoming_msgs_t;
+
+typedef struct s1_incoming_msg_data_t {
+    uint32_t destInstAddr;
+    uint32_t srcInstAddr;
+    msg_type_t msg_type;
+    int ue_idx;
+    int s1ap_enb_ue_id;
+    s1_incoming_msgs_t msg_data;
+}s1_incoming_msg_data_t;
+
+#define S1_READ_MSG_BUF_SIZE sizeof(s1_incoming_msg_data_t)
+
+/*************************
+ * Outgoing S1AP Messages
+ *************************/
+struct authreq_info {
+		msg_type_t msg_type;
+    	int ue_idx;
+    	int enb_s1ap_ue_id;
+    	unsigned char rand[NAS_RAND_SIZE];
+    	unsigned char autn[NAS_AUTN_SIZE];
+     	//struct TAI tai;
+    	int enb_fd;
+};
+
+#define S1AP_AUTHREQ_STAGE2_BUF_SIZE sizeof(struct authreq_info)
+
+struct sec_mode_Q_msg {
+		msg_type_t msg_type;
+    	int ue_idx;
+    	int enb_s1ap_ue_id;
+    	struct UE_net_capab ue_network;
+		struct MS_net_capab  ms_net_capab;
+    	struct KASME key;
+    	uint8_t int_key[NAS_INT_KEY_SIZE];
+    	uint32_t dl_seq_no;
+    	int enb_fd;
+};
+
+#define S1AP_SECREQ_STAGE3_BUF_SIZE sizeof(struct sec_mode_Q_msg)
+
+
+struct esm_req_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	int enb_s1ap_ue_id;
+	uint8_t pti;
+	uint8_t int_key[NAS_INT_KEY_SIZE];
+	unsigned short dl_seq_no;
+	int enb_fd;
+};
+
+#define S1AP_ESMREQ_STAGE4_BUF_SIZE sizeof(struct esm_req_Q_msg)
+
+struct init_ctx_req_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	int enb_s1ap_ue_id;
+	unsigned long exg_max_ul_bitrate;
+	unsigned long exg_max_dl_bitrate;
+	struct fteid gtp_teid;
+	struct TAI tai;
+	struct apn_name apn;
+	struct PAA pdn_addr;
+	unsigned char sec_key[32];
+	unsigned char bearer_id;
+	uint8_t int_key[NAS_INT_KEY_SIZE];
+	uint16_t dl_seq_no;
+	int enb_fd;
+	unsigned char pti;
+	unsigned int m_tmsi;
+};
+
+#define S1AP_ICSREQ_STAGE6_BUF_SIZE sizeof(struct init_ctx_req_Q_msg)
+
+struct detach_accept_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	int enb_s1ap_ue_id;
+	uint8_t int_key[NAS_INT_KEY_SIZE];
+	uint16_t dl_seq_no;
+	int enb_fd;
+};
+
+#define S1AP_DTCHACCEPT_STAGE2_BUF_SIZE sizeof(struct detach_accept_Q_msg)
+
+
+struct s1relcmd_info{
+	msg_type_t msg_type;
+	int ue_idx;
+	int enb_s1ap_ue_id;
+	int enb_fd;
+	s1apCause_t cause;
+};
+#define S1AP_RELCMD_STAGE2_BUF_SIZE sizeof(struct s1relcmd_info)
+
+
+struct ni_detach_request_Q_msg {
+    msg_type_t msg_type;
+    int ue_idx;
+    int enb_s1ap_ue_id;
+    uint8_t int_key[NAS_INT_KEY_SIZE];
+    uint16_t dl_seq_no;
+    int enb_fd;
+    unsigned char detach_type;
+};
+#define S1AP_NI_DTCHREQUEST_BUF_SIZE sizeof(struct ni_detach_request_Q_msg)
+
+struct paging_req_Q_msg {
+	msg_type_t msg_type;
+        int ue_idx;
+        int enb_s1ap_ue_id;
+        int enb_fd;
+	enum s1ap_cn_domain cn_domain;
+	unsigned char IMSI[BINARY_IMSI_LEN];
+	struct TAI tai;
+};
+#define PAGING_REQUEST_BUF_SIZE sizeof(struct paging_req_Q_msg)
+
+struct ics_req_paging_Q_msg {
+	msg_type_t msg_type;
+    int ue_idx;
+    int enb_s1ap_ue_id;
+    int enb_fd;
+	unsigned long ueag_max_ul_bitrate;
+	unsigned long ueag_max_dl_bitrate;
+	unsigned char bearer_id;
+	struct fteid gtp_teid;
+	unsigned char sec_key[32];
+};
+#define ICS_REQ_PAGING_BUF_SIZE sizeof(struct ics_req_paging_Q_msg)
+
+struct attachReqRej_info
+{
+  msg_type_t msg_type;
+  int ue_idx; /*mme s1ap UE id*/
+  int s1ap_enb_ue_id;
+  int enb_fd;
+  unsigned char cause;
+};
+#define S1AP_REQ_REJECT_BUF_SIZE sizeof(struct attachReqRej_info)
+
+struct attachIdReq_info
+{
+	msg_type_t msg_type;
+	int ue_idx; /*mme s1ap UE id*/
+	int s1ap_enb_ue_id;
+ 	int enb_fd;
+    unsigned char ue_type;
+};
+#define S1AP_ID_REQ_BUF_SIZE sizeof(struct attachIdReq_info)
+
+struct tauResp_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	int enb_fd;
+	int s1ap_enb_ue_id;
+	int status;
+	int dl_seq_no;
+	uint8_t int_key[NAS_INT_KEY_SIZE];
+	struct TAI tai;
+	unsigned int m_tmsi;
+};
+#define S1AP_TAURESP_BUF_SIZE sizeof(struct tauResp_Q_msg)
+
+/*************************
+ * Outgoing GTP Messages
+ *************************/
+struct CS_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	unsigned char IMSI[BINARY_IMSI_LEN];
+	struct apn_name apn;
+	struct TAI tai;
+	struct CGI utran_cgi;
+	unsigned char MSISDN[MSISDN_STR_LEN];
+	unsigned int max_requested_bw_dl;
+	unsigned int max_requested_bw_ul;
+	unsigned short int pco_options[10];
+};
+#define S11_CSREQ_STAGE5_BUF_SIZE sizeof(struct CS_Q_msg)
+
+#define S11_MB_INDICATION_FLAG_SIZE 3
+struct MB_Q_msg {
+	msg_type_t msg_type;
+	int ue_idx;
+	unsigned short indication[S11_MB_INDICATION_FLAG_SIZE];/*Provision*/
+	unsigned char bearer_id;
+	struct fteid s11_sgw_c_fteid;
+	struct fteid s1u_enb_fteid;
+};
+#define S11_MBREQ_STAGE7_BUF_SIZE sizeof(struct MB_Q_msg)
+
+#define S11_DS_INDICATION_FLAG_SIZE 3
+struct DS_Q_msg {
+	msg_type_t msg_type;
+	unsigned char indication[S11_DS_INDICATION_FLAG_SIZE];/*Provision*/
+	unsigned char bearer_id;
+	struct fteid s11_sgw_c_fteid;
+};
+#define S11_DTCHREQ_STAGE1_BUF_SIZE sizeof(struct DS_Q_msg)
+
+
+#define S11_RB_INDICATION_FLAG_SIZE 3
+struct RB_Q_msg{
+	msg_type_t msg_type;
+	int ue_idx;
+	unsigned short indication[S11_RB_INDICATION_FLAG_SIZE];
+	unsigned char bearer_id;
+	struct fteid s11_sgw_c_fteid;
+	struct fteid s1u_enb_fteid;
+};
+#define S11_RBREQ_STAGE1_BUF_SIZE sizeof(struct RB_Q_msg)
+
+struct DDN_ACK_Q_msg{
+        msg_type_t msg_type;
+        int ue_idx;
+        uint32_t seq_no;
+        uint8_t cause;
+};
+#define S11_DDN_ACK_BUF_SIZE sizeof(struct DDN_ACK_Q_msg)
+/*************************
+ * Incoming GTP Messages
+ *************************/
+struct csr_Q_msg {
+    int status;
+    struct fteid s11_sgw_fteid;
+    struct fteid s5s8_pgwc_fteid;
+    struct fteid s1u_sgw_fteid;
+    struct fteid s5s8_pgwu_fteid;
+    struct PAA pdn_addr;
+};
+
+struct MB_resp_Q_msg {
+    struct fteid s1u_sgw_fteid;
+};
+
+
+struct RB_resp_Q_msg {
+    struct fteid s1u_sgw_fteid;
+};
+
+struct ddn_Q_msg {
+    struct ARP arp;
+    uint8_t cause;
+    uint8_t eps_bearer_id;
+    uint32_t seq_no;
+};
+
+typedef union gtp_incoming_msgs_t {
+    struct csr_Q_msg csr_Q_msg_m;
+    struct MB_resp_Q_msg MB_resp_Q_msg_m;
+    struct RB_resp_Q_msg RB_resp_Q_msg_m;
+    struct ddn_Q_msg ddn_Q_msg_m;    
+}gtp_incoming_msgs_t;
+
+typedef struct gtp_incoming_msg_data_t {
+    uint32_t destInstAddr;
+    uint32_t srcInstAddr;
+    msg_type_t msg_type;
+    int ue_idx;
+    gtp_incoming_msgs_t msg_data;
+}gtp_incoming_msg_data_t;
+
+#define GTP_READ_MSG_BUF_SIZE sizeof(gtp_incoming_msg_data_t)
+
+/*************************
+ * Outgoing S6 Messages
+ *************************/
+struct s6a_Q_msg {
+	msg_type_t msg_type;
+	unsigned char imsi[16];
+	struct TAI tai;
+	struct AUTS auts;
+	unsigned int ue_idx;
+};
+#define S6A_REQ_Q_MSG_SIZE sizeof(struct s6a_Q_msg)
+
+struct s6a_purge_Q_msg {
+	int ue_idx;
+	unsigned char IMSI[BINARY_IMSI_LEN];
+};
+#define S6A_PURGEREQ_STAGE1_BUF_SIZE sizeof(struct s6a_purge_Q_msg)
+
+
+/*************************
+ * Incoming S6 Messages
+ *************************/
+typedef struct E_UTRAN_sec_vector {
+    struct RAND rand;
+    struct XRES xres;
+    struct AUTN autn;
+    struct KASME kasme;
+} E_UTRAN_sec_vector;
+
+struct aia_Q_msg {
+    int res;
+    E_UTRAN_sec_vector sec;
+};
+
+struct ula_Q_msg {
+    unsigned int access_restriction_data;
+    int subscription_status;
+    int net_access_mode;
+    unsigned int RAU_TAU_timer;
+    int res;
+    unsigned int max_requested_bw_dl;
+    unsigned int max_requested_bw_ul;
+    unsigned int apn_config_profile_ctx_id;
+    int all_APN_cfg_included_ind;
+    char MSISDN[MSISDN_STR_LEN];
+};
+
+struct purge_resp_Q_msg {
+    int status;
+};
+
+
+enum CancellationType {
+    MME_UPDATE_PROCEDURE = 0,
+    SGSN_UPDATE_PROCEDURE = 1,
+    SUBSCRIPTION_WITHDRAWAL = 2,
+    INVALID_TYPE
+};
+
+struct clr_Q_msg {
+    msg_type_t msg_type;
+    char origin_host[18];
+    char origin_realm[15];
+    uint8_t imsi[15];   
+    enum CancellationType c_type;
+};
+
+
+typedef union s6_incoming_msgs_t {
+    struct aia_Q_msg aia_Q_msg_m;
+    struct ula_Q_msg ula_Q_msg_m;
+    struct clr_Q_msg clr_Q_msg_m;	//NI Detach
+    struct purge_resp_Q_msg purge_resp_Q_msg_m;
+}s6_incoming_msgs_t;
+
+typedef struct s6_incoming_msg_data_t {
+	uint32_t destInstAddr;
+	uint32_t srcInstAddr;
+    	msg_type_t msg_type;
+    	int ue_idx;
+    	unsigned char IMSI[16];
+	s6_incoming_msgs_t msg_data;
+}s6_incoming_msg_data_t;
+
+#define S6_READ_MSG_BUF_SIZE sizeof(s6_incoming_msg_data_t)
+
+#endif /* INCLUDE_COMMON_MSGTYPE_H_ */
diff --git a/include/common/s11_structs.h b/include/common/s11_structs.h
new file mode 100644
index 0000000..c4ad8f9
--- /dev/null
+++ b/include/common/s11_structs.h
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S11_STRUCTS_H_
+#define __S11_STRUCTS_H_
+
+#include <stdlib.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+
+#pragma pack(1)
+typedef struct gtpv2c_header {
+	struct gtpc{
+		unsigned char spare :3;
+		unsigned char teidFlg :1;
+		unsigned char piggyback :1;
+		unsigned char version :3;
+		unsigned char message_type;
+		unsigned short len;
+	}gtp;
+	union teid {
+		struct has_teid_t {
+			unsigned int teid;
+			unsigned int seq :24;
+			unsigned int spare :8;
+		} has_teid;
+		struct no_teid_t {
+			unsigned int seq :24;
+			unsigned int spare :8;
+		} no_teid;
+	} teid;
+} gtpv2c_header;
+
+typedef struct fteid {
+        struct fteid_header {
+                unsigned char iface_type :6;
+                unsigned char v6 :1;
+                unsigned char v4 :1;
+                unsigned int teid_gre;
+        } header;
+        union ftied_ip {
+                struct in_addr ipv4;
+                struct in6_addr ipv6;
+                struct ipv4v6_t {
+                        struct in_addr ipv4;
+                        struct in6_addr ipv6;
+                } ipv4v6;
+        } ip;
+} fteid_t;
+
+struct PAA {
+	uint8_t pdn_type;
+        union ip_type {
+                struct in_addr ipv4;
+                struct ipv6_t {
+                        uint8_t prefix_length;
+                        struct in6_addr ipv6;
+                } ipv6;
+                struct paa_ipv4v6_t {
+                        uint8_t prefix_length;
+                        struct in6_addr ipv6;
+                        struct in_addr ipv4;
+                } paa_ipv4v6;
+        } ip_type;
+};
+
+struct gtp_cause {
+	unsigned char cause;
+	unsigned char data;
+};
+
+struct bearer_ctx {
+	unsigned char eps_bearer_id;
+	struct gtp_cause cause;
+	struct fteid s1u_sgw_teid;
+	struct fteid s5s8_pgw_u_teid;
+};
+
+struct ARP {
+        uint8_t prioLevel :4;
+        uint8_t preEmptionCapab :1;
+        uint8_t preEmptionVulnebility :1;
+        uint8_t spare :2;
+};
+
+
+struct s11_IE_header {
+	unsigned char ie_type;
+	unsigned short ie_len;
+	unsigned char cr_flag:4;
+	unsigned char instance:4;
+};
+
+union s11_IE_data {
+	struct gtp_cause cause;
+	struct fteid s11_sgw_fteid;
+	struct fteid s5s8_pgw_c_fteid;
+	struct PAA pdn_addr;
+	struct bearer_ctx bearer;
+};
+
+struct s11_IE {
+	struct s11_IE_header header;
+	union s11_IE_data data;
+};
+
+struct s11_proto_IE {
+	unsigned short message_type;
+	unsigned short no_of_ies;
+	struct s11_IE *s11_ies;
+};
+
+#pragma pack()
+
+#endif /* S11_STRUCTS_H */
diff --git a/include/common/s1ap_structs.h b/include/common/s1ap_structs.h
new file mode 100644
index 0000000..d61e13f
--- /dev/null
+++ b/include/common/s1ap_structs.h
@@ -0,0 +1,761 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_STRUCTS_H_
+#define __S1AP_STRUCTS_H_
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "sec.h"
+#include "ProcedureCode.h"
+#include "Criticality.h"
+#include "S1AP-PDU.h"
+#include "InitiatingMessage.h"
+
+#define NAS_RAND_SIZE 16
+#define NAS_AUTN_SIZE 16
+
+#define AUTH_REQ_NO_OF_IES 3
+#define SEC_MODE_NO_OF_IES 3
+#define ESM_REQ_NO_OF_IES 3
+#define ICS_REQ_NO_OF_IES 6
+#define DTCH_ACCEPT_NO_OF_IES 3
+#define UE_CTX_RELEASE_NO_OF_IES 3
+#define ATTACH_REJECT_NO_OF_IES 3
+
+#define ATTACH_ID_REQUEST_NO_OF_IES 3
+#define TAU_RSP_NO_OF_IES 3
+
+#define NI_UE_CTX_RELEASE_NO_OF_IES 3
+#define NI_DTCH_REQUEST_NO_OF_IES 3
+
+
+#define AUTH_REQ_NO_OF_NAS_IES 2
+#define SEC_MODE_NO_OF_NAS_IES 1
+#define ICS_REQ_NO_OF_NAS_IES 5
+#define TAU_RSP_NO_OF_NAS_IES 2
+
+#define SERVICE_REQ_SECURITY_HEADER 12
+#define SHORT_MAC_SIZE 2
+
+#define AUTHREQ_NAS_SECURITY_PARAM 0x01
+
+#define MSISDN_STR_LEN 10
+
+#define EMM_MAX_TAI_LIST 16
+
+#define SECURITY_KEY_SIZE 32
+
+#define MAC_SIZE 4
+#define AUTH_SYNC_FAILURE 21
+#define AUTH_RESPONSE 53
+/* ESM messages */
+ #define ESM_MSG_ACTV_DEF_BEAR__CTX_REQ 0xc1
+
+/*24.008 - 10.5.6.1
+APN name can be in range of min 3 octets to max 102 octets
+*/
+#define MAX_APN_LEN 102
+
+
+struct apn_name {
+	unsigned char len;
+	unsigned char val[MAX_APN_LEN];/*TODO: Make dynamic as range is big 3-102*/
+};
+
+/*TODO: Needed fro paging. Ignoring for now*/
+struct proto_conf {
+	int placeholder;
+};
+
+struct esm_sec_info {
+	struct proto_conf proto_config;
+};
+
+/*NAS MSG IE CODES */
+/* Message content : 
+   3gpp 24.301
+   Table 8.2.4.1: IEI Column.*/
+typedef enum
+{
+    NAS_IE_TYPE_EPS_MOBILE_ID_IMSI=0x1,
+    NAS_IE_TYPE_UE_NETWORK_CAPABILITY=0x2,
+    NAS_IE_TYPE_ESM_MSG=0x3,
+    NAS_IE_TYPE_TMSI_STATUS=0x09,
+    NAS_IE_TYPE_MS_NETWORK_FEATURE_SUPPORT=0x0C,
+    NAS_IE_TYPE_GUTI_TYPE=0x0E,
+    NAS_IE_TYPE_ADDITIONAL_UPDATE_TYPE=0xF,
+    NAS_IE_TYPE_MS_CLASSMARK_2=0x11,
+    NAS_IE_TYPE_LAI=0x13,
+    NAS_IE_TYPE_PTMSI_SIGNATURE=0x19,
+    NAS_IE_TYPE_MS_CLASSMARK_3=0x20,
+    NAS_IE_TYPE_APN=0x28,
+    NAS_IE_TYPE_AUTH_FAIL_PARAM=0x30,
+    NAS_IE_TYPE_MS_NETWORK_CAPABILITY=0x31,
+    NAS_IE_TYPE_DRX_PARAM=0x5C,
+    NAS_IE_TYPE_TAI=0x52,
+    NAS_IE_TYPE_VOICE_DOMAIN_PREF_UE_USAGE_SETTING=0x5D,
+    NAS_IE_TYPE_TX_FLAG=0xAA,
+    NAS_IE_TYPE_PCO=0xAB,
+    NAS_IE_TYPE_PTI=0xAC,
+}nas_ie_type;
+typedef struct MS_net_capab {
+    bool          pres;
+	unsigned char element_id;
+	unsigned char len;
+	unsigned char capab[6];
+}MS_net_capab;
+
+#if 0
+/* MS Network capability */
+typedef struct MS_net_capab {
+   unsigned char pres;
+   unsigned char len;
+   unsigned char gea1;
+   unsigned char smCapViaDdctdChan;
+   unsigned char smCapViaGprsChan;
+   unsigned char ucs2Supp;
+   unsigned char ssScrInd;
+   unsigned char soLsaCap;
+   unsigned char revLvlInd;
+   unsigned char pfcFeatMode;
+   unsigned char gea2;
+   unsigned char gea3;
+   unsigned char gea4;
+   unsigned char gea5;
+   unsigned char gea6;
+   unsigned char gea7;
+   unsigned char lcsVaCap;
+   unsigned char psInterRATho2UtranIuModeCap;
+   unsigned char psInterRATho2EutranS1ModeCap;
+   unsigned char csfbCap;
+   unsigned char isrSupp;
+   unsigned char srvcc2UtranCap;
+   unsigned char epcCap;
+}MS_net_capab;
+#endif
+
+struct UE_net_capab {
+	unsigned char len;
+	unsigned char capab[6];
+};
+#if 0
+/* UE Network capability */
+typedef struct UE_net_capab {
+   unsigned char pres;
+   unsigned char len;
+
+   unsigned char eea7;
+   unsigned char eea6;
+   unsigned char eea5;
+   unsigned char eea4;
+   unsigned char eea3;
+   unsigned char eea2_128;
+   unsigned char eea1_128;
+   unsigned char eea0;
+
+   unsigned char eia7;
+   unsigned char eia6;
+   unsigned char eia5;
+   unsigned char eia4;
+   unsigned char eia3;
+   unsigned char eia2_128;
+   unsigned char eia1_128;
+   unsigned char eia0;
+
+   unsigned char uea7;
+   unsigned char uea6;
+   unsigned char uea5;
+   unsigned char uea4;
+   unsigned char uea3;
+   unsigned char uea2;
+   unsigned char uea1;
+   unsigned char uea0;
+
+   unsigned char uia7;
+   unsigned char uia6;
+   unsigned char uia5;
+   unsigned char uia4;
+   unsigned char uia3;
+   unsigned char uia2;
+   unsigned char uia1;
+   unsigned char ucs2;
+
+   unsigned char vcc_1xsr;
+
+} UE_net_capab;
+#endif
+
+enum drx_params {
+	PAGINX_DRX32,
+	PAGINX_DRX64,
+	PAGINX_DRX128,
+	PAGINX_DRX256,
+	PAGINX_DRX512,
+};
+
+enum s1ap_cn_domain
+{
+    CN_DOMAIN_PS,
+    CN_DOMAIN_CS,
+    CN_DOMAIN_NONE
+};
+
+struct s1ap_header{
+	unsigned short procedure_code;
+	unsigned char criticality;
+};
+
+#pragma pack(1)
+
+/*36.413: 9.2.3.8 - MCC, MCN : Only 3 bytes are used*/
+struct PLMN {
+	unsigned char  idx[3];
+};
+
+struct TAI {
+	struct PLMN plmn_id;
+	short tac; /*2 bytes. 36.413: 9.2.3.7*/
+};
+
+struct STMSI {
+	uint8_t mme_code;
+    uint32_t m_TMSI;
+};
+
+
+typedef struct tai_list {
+	uint8_t spare :1;
+	uint8_t type :2;
+	uint8_t num_of_elements :4;
+	struct TAI partial_list[EMM_MAX_TAI_LIST];
+} tai_list;
+
+typedef struct pdn_address {
+	uint8_t spare :5;
+	uint8_t type :3;
+	uint32_t ipv4; /* TODO: Revisit 24.301 - 9.9.4.9.1 */
+} pdn_address;
+
+typedef struct linked_transcation_id {
+	uint8_t flag :1;
+	uint8_t val :7;
+} linked_transcation_id;
+
+typedef struct esm_qos
+{
+	uint8_t reliability_class :3;
+	uint8_t delay_class :3;
+	uint8_t spare1 :2;
+	uint8_t precedence_class :3;
+	uint8_t spare2 :1;
+	uint8_t peak_throughput :4;
+	uint8_t mean_throughput :5;
+	uint8_t spare3 :3;
+	uint8_t delivery_err_sdu :3;
+	uint8_t delivery_order :2;
+	uint8_t traffic_class :3;
+	uint8_t max_sdu_size;
+	uint8_t mbr_ul;
+	uint8_t mbr_dl;
+	uint8_t sdu_err_ratio :4;
+	uint8_t residual_ber :4;
+	uint8_t trffic_prio :2;
+	uint8_t transfer_delay :6;
+	uint8_t gbr_ul;
+	uint8_t gbr_dl;
+	uint8_t src_stat_desc :4;
+	uint8_t sig_ind :1;
+	uint8_t spare4 :3;
+	uint8_t mbr_dl_ext;
+	uint8_t gbr_dl_ext;
+	uint8_t mbr_ul_ext;
+	uint8_t gbr_ul_ext;
+
+} esm_qos;
+
+/* TODO : Revisit 24.301 - 9.9.4.2.1 */
+typedef struct ESM_APN_AMBR {
+	uint8_t dl;
+	uint8_t reserved;
+	uint8_t dlext;
+	uint8_t ulext;
+	uint8_t dlext2;
+	/* uint8_t dl_total; */
+	uint8_t ulext2;
+	/* uint8_t ul_total; */
+} ESM_APN_AMBR;
+
+typedef struct guti {
+	uint8_t spare :4;
+	uint8_t odd_even_indication :1;
+	uint8_t id_type :3;
+	struct PLMN plmn_id;
+	uint16_t mme_grp_id;
+	uint8_t mme_code;
+	uint32_t m_TMSI;
+} guti;
+
+typedef struct esm_msg_container {
+	uint8_t eps_bearer_id :4;
+	uint8_t proto_discriminator :4;
+	uint8_t procedure_trans_identity;
+	uint8_t session_management_msgs;
+	uint8_t eps_qos;  /* TODO: Revisit 24.301 - 9.9.4.3.1 */
+	struct apn_name apn;
+	pdn_address pdn_addr;
+	linked_transcation_id linked_ti;
+	esm_qos negotiated_qos;
+	ESM_APN_AMBR apn_ambr;
+} esm_msg_container;
+
+typedef struct ue_sec_capabilities {
+	uint8_t eea1 :1;
+	uint8_t eea2 :1;
+	uint8_t eea3 :1;
+	uint8_t eea4 :1;
+	uint8_t eea5 :1;
+	uint8_t eea6_128 :1;
+	uint8_t eea7_128 :1;
+	uint8_t eea8 :1;
+
+	uint8_t eia1 :1;
+	uint8_t eia2 :1;
+	uint8_t eia3 :1;
+	uint8_t eia4 :1;
+	uint8_t eia5 :1;
+	uint8_t eia6_128 :1;
+	uint8_t eia8_128 :1;
+	uint8_t eia8 :1;
+
+	uint8_t uea1 :1;
+	uint8_t uea2 :1;
+	uint8_t uea3 :1;
+	uint8_t uea4 :1;
+	uint8_t uea5 :1;
+	uint8_t uea6 :1;
+	uint8_t uea7 :1;
+	uint8_t uea8 :1;
+
+	uint8_t uia1 :1;
+	uint8_t uia2 :1;
+	uint8_t uia3 :1;
+	uint8_t uia4 :1;
+	uint8_t uia5 :1;
+	uint8_t uia6 :1;
+	uint8_t uia7 :1;
+	uint8_t spare1 :1;
+
+	uint8_t gea1 :1;
+	uint8_t gea2 :1;
+	uint8_t gea3 :1;
+	uint8_t gea4 :1;
+	uint8_t gea5 :1;
+	uint8_t gea6 :1;
+	uint8_t gea7 :1;
+	uint8_t spare2 :1;
+} ue_sec_capabilities;
+
+typedef struct nas_pdu_header {
+	unsigned char security_header_type:4;
+	unsigned char proto_discriminator:4;
+	unsigned char message_type;
+	unsigned char security_encryption_algo:4;
+	unsigned char security_integrity_algo:4;
+	unsigned char nas_security_param;
+	unsigned char mac[MAC_SIZE];
+	unsigned char short_mac[SHORT_MAC_SIZE];
+	unsigned char ksi;
+	unsigned char seq_no;
+	unsigned char eps_bearer_identity;
+	unsigned char procedure_trans_identity;
+	unsigned char detach_type;
+} nas_pdu_header;
+
+#pragma pack()
+
+/****Information elements presentations **/
+#define BINARY_IMSI_LEN 8 /*same as packet capture. TODO: Write macros*/
+#define BCD_IMSI_STR_LEN 15
+
+/*36.413 - 9.2.1.38*/
+struct CGI {
+	struct PLMN plmn_id;
+	int cell_id;
+};
+/*36.413: 9.2.1.37*/
+#define MACRO_ENB_ID_SIZE 20
+struct ie_global_enb_id {
+	int plmn;
+	char macro_enb_id[MACRO_ENB_ID_SIZE];
+	/*TODO: make union of enb IDs*/
+};
+
+/*36.413: 9.1.8.4*/
+#define ENB_NAME_SIZE 150
+struct ie_enb_name {
+	char enb_name[ENB_NAME_SIZE];
+};
+
+/*36.413: 9.2.1.3a*/
+enum ie_RRC_est_cause {
+	EMERGENCY,
+	HIGHPRIORITYACCESS,
+	MT_ACCESS,
+	MO_SIGNALLING,
+	MO_DATA,
+	DELAYTOLERANTACCESS,
+	MO_VOICECALL,
+	MO_EXCEPTIONDATA
+};
+
+/**E-RAB structure declarations**/
+struct eRAB_header { //TODO: making provision, chec -is it needed?
+	unsigned char criticality;
+};
+
+struct eRAB_setup_ctx_SU {
+	unsigned short eRAB_id;
+	unsigned short dont_know_byte;
+	unsigned int transp_layer_addr;
+	unsigned int gtp_teid;
+};
+
+union eRAB_IE {
+	struct eRAB_setup_ctx_SU su_res;
+};
+
+typedef struct eRAB_elements {
+	struct eRAB_header header;
+	unsigned char no_of_elements;
+	union eRAB_IE *elements;
+}eRAB_elements;
+/**eRAB structures end**/
+
+/**Information elements structs end**/
+typedef union nas_pdu_elements_union {
+	unsigned char rand[NAS_RAND_SIZE];
+	unsigned char autn[NAS_AUTN_SIZE];
+	unsigned char IMSI[BINARY_IMSI_LEN];
+	unsigned char short_mac[SHORT_MAC_SIZE];
+	struct esm_sec_info esm_info;
+	enum drx_params drx;
+	struct MS_net_capab ms_network;
+	struct UE_net_capab ue_network;
+
+	struct XRES   auth_resp; /*Authentication response*/
+	struct AUTS   auth_fail_resp; /*Authentication response*/
+
+	struct apn_name apn;
+
+	unsigned char attach_res;
+	unsigned char t3412;
+	tai_list tailist;
+	esm_msg_container esm_msg;
+	guti mi_guti;
+	bool esm_info_tx_required;
+	unsigned char pti;
+    unsigned char eps_res;
+    unsigned char spare;
+    unsigned short int pco_options[10];
+}nas_pdu_elements_union;
+typedef struct nas_pdu_elements {
+   nas_ie_type msgType;
+   nas_pdu_elements_union pduElement;
+}nas_pdu_elements;
+
+
+#define NAS_MSG_UE_IE_GUTI  0x00000001
+#define NAS_MSG_UE_IE_IMSI  0x00000002
+#define UE_ID_IMSI(flags)   ((flags & NAS_MSG_UE_IE_IMSI) == NAS_MSG_UE_IE_IMSI)
+#define UE_ID_GUTI(flags)   ((flags & NAS_MSG_UE_IE_GUTI) == NAS_MSG_UE_IE_GUTI)
+typedef struct nasPDU {
+	nas_pdu_header header;
+	unsigned char elements_len;
+	nas_pdu_elements *elements;
+    unsigned int flags;
+} nasPDU;
+
+#pragma pack(1)
+/* TODO : Change type */
+typedef struct ue_aggregate_maximum_bitrate {
+	uint32_t uEaggregateMaxBitRateDL;
+	uint32_t uEaggregateMaxBitRateUL;
+} ue_aggregate_maximum_bitrate;
+
+typedef struct allocation_retention_prio {
+	uint8_t prioLevel :4;
+	uint8_t preEmptionCapab :1;
+	uint8_t preEmptionVulnebility :1;
+	uint8_t spare :2;
+} allocation_retention_prio;
+
+typedef struct E_RAB_Level_QoS_Params {
+	uint8_t qci;
+	//uint8_t ext;
+    allocation_retention_prio arPrio;
+} E_RAB_Level_QoS_Params;
+
+typedef struct ERABSetup {
+	uint8_t e_RAB_ID;
+	E_RAB_Level_QoS_Params e_RAB_QoS_Params;
+	uint32_t transportLayerAddress;
+	uint32_t gtp_teid;
+	struct nasPDU nas;
+} ERABSetup;
+
+#pragma pack()
+/* Dependencies */
+typedef enum s1apCause_PR {
+    s1apCause_PR_NOTHING,   /* No components present */
+    s1apCause_PR_radioNetwork,
+    s1apCause_PR_transport,
+    s1apCause_PR_nas,
+    s1apCause_PR_protocol,
+    s1apCause_PR_misc
+
+} s1apCause_PR;
+
+typedef enum s1apCause_PR_transporauseRadioNetwork {
+    s1apCauseRadioNetwork_unspecified   = 0,
+    s1apCauseRadioNetwork_tx2relocoverall_expiry    = 1,
+    s1apCauseRadioNetwork_successful_handover   = 2,
+    s1apCauseRadioNetwork_release_due_to_eutran_generated_reason    = 3,
+    s1apCauseRadioNetwork_handover_cancelled    = 4,
+    s1apCauseRadioNetwork_partial_handover  = 5,
+    s1apCauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system = 6,
+    s1apCauseRadioNetwork_ho_target_not_allowed = 7,
+    s1apCauseRadioNetwork_tS1relocoverall_expiry    = 8,
+    s1apCauseRadioNetwork_tS1relocprep_expiry   = 9,
+    s1apCauseRadioNetwork_cell_not_available    = 10,
+    s1apCauseRadioNetwork_unknown_targetID  = 11,
+    s1apCauseRadioNetwork_no_radio_resources_available_in_target_cell   = 12,
+    s1apCauseRadioNetwork_unknown_mme_ue_s1ap_id    = 13,
+    s1apCauseRadioNetwork_unknown_enb_ue_s1ap_id    = 14,
+    s1apCauseRadioNetwork_unknown_pair_ue_s1ap_id   = 15,
+    s1apCauseRadioNetwork_handover_desirable_for_radio_reason   = 16,
+    s1apCauseRadioNetwork_time_critical_handover    = 17,
+    s1apCauseRadioNetwork_resource_optimisation_handover    = 18,
+    s1apCauseRadioNetwork_reduce_load_in_serving_cell   = 19,
+    s1apCauseRadioNetwork_user_inactivity   = 20,
+    s1apCauseRadioNetwork_radio_connection_with_ue_lost = 21,
+    s1apCauseRadioNetwork_load_balancing_tau_required   = 22,
+    s1apCauseRadioNetwork_cs_fallback_triggered = 23,
+    s1apCauseRadioNetwork_ue_not_available_for_ps_service   = 24,
+    s1apCauseRadioNetwork_radio_resources_not_available = 25,
+    s1apCauseRadioNetwork_failure_in_radio_interface_procedure  = 26,
+    s1apCauseRadioNetwork_invalid_qos_combination   = 27,
+    s1apCauseRadioNetwork_interrat_redirection  = 28,
+    s1apCauseRadioNetwork_interaction_with_other_procedure  = 29,
+    s1apCauseRadioNetwork_unknown_E_RAB_ID  = 30,
+    s1apCauseRadioNetwork_multiple_E_RAB_ID_instances   = 31,
+    s1apCauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported   = 32,
+    s1apCauseRadioNetwork_s1_intra_system_handover_triggered    = 33,
+    s1apCauseRadioNetwork_s1_inter_system_handover_triggered    = 34,
+    s1apCauseRadioNetwork_x2_handover_triggered = 35,
+    s1apCauseRadioNetwork_redirection_towards_1xRTT = 36,
+    s1apCauseRadioNetwork_not_supported_QCI_value   = 37,
+    s1apCauseRadioNetwork_invalid_CSG_Id    = 38,
+    s1apCauseRadioNetwork_release_due_to_pre_emption    = 39
+} e_s1apCauseRadioNetwork;
+
+typedef enum s1apCauseTransport {
+    s1apCauseTransport_transport_resource_unavailable   = 0,
+    s1apCauseTransport_unspecified  = 1
+} e_s1apCauseTransport;
+
+typedef enum s1apCauseNas {
+    s1apCauseNas_normal_release = 0,
+    s1apCauseNas_authentication_failure = 1,
+    s1apCauseNas_detach = 2,
+    s1apCauseNas_unspecified    = 3,
+    s1apCauseNas_csg_subscription_expiry    = 4
+} e_s1apCauseNas;
+
+typedef enum s1apCauseProtocol {
+    s1apCauseProtocol_transfer_syntax_error = 0,
+    s1apCauseProtocol_abstract_syntax_error_reject  = 1,
+    s1apCauseProtocol_abstract_syntax_error_ignore_and_notify   = 2,
+    s1apCauseProtocol_message_not_compatible_with_receiver_state    = 3,
+    s1apCauseProtocol_semantic_error    = 4,
+    s1apCauseProtocol_abstract_syntax_error_falsely_constructed_message = 5,
+    s1apCauseProtocol_unspecified   = 6
+} e_s1apCauseProtocol;
+
+typedef enum s1apCauseMisc {
+    s1apCauseMisc_control_processing_overload   = 0,
+    s1apCauseMisc_not_enough_user_plane_processing_resources    = 1,
+    s1apCauseMisc_hardware_failure  = 2,
+    s1apCauseMisc_om_intervention   = 3,
+    s1apCauseMisc_unspecified   = 4,
+    s1apCauseMisc_unknown_PLMN  = 5
+} e_s1apCauseMisc;
+
+/* s1apCauseMisc */
+typedef long     s1apCauseMisc_t;
+/* s1apCauseProtocol */
+typedef long     s1apCauseProtocol_t;
+/* s1apCauseNas */
+typedef long     s1apCauseNas_t;
+/* s1apCauseTransport */
+typedef long     s1apCauseTransport_t;
+/* s1apCauseRadioNetwork */
+typedef long     s1apCauseRadioNetwork_t;
+
+typedef struct s1apCause {
+    s1apCause_PR present;
+    union s1apCause_u {
+        s1apCauseRadioNetwork_t  radioNetwork;
+        s1apCauseTransport_t     transport;
+        s1apCauseNas_t   nas;
+        s1apCauseProtocol_t  protocol;
+        s1apCauseMisc_t  misc;
+    } choice;
+} s1apCause_t;
+
+
+typedef struct proto_IE_data {
+	int 			IE_type;
+    union value{
+        struct ie_enb_name 	enb_name;
+        struct ie_global_enb_id global_enb_id;
+        long			enb_ue_s1ap_id;
+        long			mme_ue_s1ap_id;
+        struct 			nasPDU nas;
+        struct s1apCause cause;
+        struct TAI 		 tai;
+        struct CGI 		 utran_cgi;
+        struct STMSI	 s_tmsi;
+        enum ie_RRC_est_cause 	rrc_est_cause;
+        struct eRAB_elements 	erab;
+        ue_aggregate_maximum_bitrate ue_aggrt_max_bit_rate;
+        ERABSetup E_RABToBeSetupItemCtxtSUReq;
+        ue_sec_capabilities ue_sec_capab;
+        uint8_t sec_key[SECURITY_KEY_SIZE];
+    }val;
+}proto_IEs;
+
+struct proto_IE {
+    ProcedureCode_t  procedureCode;
+    Criticality_t    criticality;
+	short 		no_of_IEs;
+	proto_IEs	*data;
+	uint8_t     ie_nas_index;
+    uint8_t     ie_tai_index;
+    uint8_t     ie_cgi_index;
+};
+
+enum protocolie_id {
+	id_MME_UE_S1AP_ID = 0,
+	id_Cause = 2,
+	id_eNB_UE_S1AP_ID = 8,
+	id_ERABToBeSetupListCtxtSUReq = 24,
+	id_NAS_PDU = 26,
+	id_ERABToBeSetupItemCtxtSUReq = 52,
+	id_uEaggregatedMaximumBitrate = 66,
+	id_SecurityKey = 73,
+	id_UE_S1AP_IDs = 99,
+	id_UESecurityCapabilities = 107,
+};
+
+enum protocol_discriminator{
+	EPSSessionManagementMessage = 2,
+    EPSMobilityManagementMessages = 7,
+};
+
+enum criticality{
+	CRITICALITY_REJECT = 0x0,
+	CRITICALITY_IGNORE = 0x40,
+	CRITICALITY_NOTIFY,
+};
+
+enum eps_nas_mesage_type {
+	AttachAccept = 0x42,
+	AttachReject = 0x44,
+	DetachAccept = 0x46,
+	DetachRequest = 0x45,
+	TauAccept    = 0x49,
+    TauReject    = 0x4b,
+	AuthenticationRequest = 0x52,
+    IdentityRequest       = 0x55,
+	SecurityModeCommand = 0x5d,
+	ESMInformationRequest = 0xd9,
+};
+
+enum procedure_code {
+	id_InitialContextSetup = 9,
+	id_downlinkNASTransport = 11,
+	id_errorIndication = 15,
+	id_UEContexRelease = 23,
+};
+
+typedef struct s1ap_PDU {
+	unsigned char procedurecode;
+	unsigned char criticality;
+	struct proto_IE value;
+}s1ap_PDU;
+
+/* NAS Security Header */
+typedef enum security_header_type {
+    Plain = 0,
+    IntegrityProtected,
+    IntegrityProtectedCiphered,
+    IntegrityProtectedEPSSecCntxt,
+}security_header_type;
+
+typedef struct nas_pdu_header_sec {
+        unsigned char security_header_type:4;
+        unsigned char proto_discriminator:4;
+        unsigned char mac[MAC_SIZE];
+        unsigned char seq_no;
+}nas_pdu_header_sec;
+
+typedef struct nas_pdu_header_short {
+        unsigned char security_header_type:4;
+        unsigned char proto_discriminator:4;
+        unsigned char message_type;
+}nas_pdu_header_short;
+
+typedef struct nas_pdu_header_long {
+        unsigned char security_header_type:4;
+        unsigned char proto_discriminator:4;
+        unsigned char procedure_trans_identity;
+        unsigned char message_type;
+}nas_pdu_header_long;
+
+/* NAS Security Encryption Algorithm */
+typedef enum security_encryption_algo {
+	Algo_EEA0 = 0,
+
+}security_encryption_algo;
+
+/* NAS Security Integrity Algorithm */
+typedef enum security_integrity_algo {
+	Algo_EIA0 = 0,
+	Algo_128EIA1 = 1,
+}security_integrity_algo;
+
+
+#define BUFFER_SIZE 255
+
+typedef struct Buffer {
+	unsigned char buf[BUFFER_SIZE];
+	unsigned char pos;
+}Buffer;
+
+#endif /*__S1AP_STRUCTS_H*/
diff --git a/include/common/sec.h b/include/common/sec.h
new file mode 100644
index 0000000..845c2d8
--- /dev/null
+++ b/include/common/sec.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __STAGE1_SEC_H_
+#define __STAGE1_SEC_H_
+
+/* Common to HSS and MME */
+#define AIA_RES_SIZE         8
+#define AIA_AUTS_SIZE        14
+#define AIA_AUTN_SIZE        16
+#define AIA_RAND_SIZE        16
+#define AIA_KASME_SIZE       32
+#define AIA_NEXT_HOP_SIZE    32
+
+#define HASH_SALT_LEN        7
+#define HASH_KEY_LEN         512
+
+#define NAS_INT_KEY_SIZE     16
+#define KENB_SIZE            32
+#define HMAC_SIZE            1024
+
+typedef struct RAND {
+	unsigned char len;
+	unsigned char val[AIA_RAND_SIZE];
+} RAND;
+
+typedef struct XRES {
+	unsigned char len;
+	unsigned char val[AIA_RES_SIZE];
+} XRES;
+
+typedef struct AUTS {
+	unsigned char len;
+	unsigned char val[AIA_AUTS_SIZE];
+} AUTS;
+
+typedef struct AUTN {
+	unsigned char len;
+	unsigned char val[AIA_AUTN_SIZE];
+} AUTN;
+
+typedef struct KASME {
+	unsigned char len;
+	unsigned char val[AIA_KASME_SIZE];
+} KASME;
+
+/**
+ * @brief Create integrity key
+ * @param[in] kasme key
+ * @param[out] int_key generated integrity key
+ * @return void
+ */
+void create_integrity_key(unsigned char *kasme, unsigned char *int_key);
+
+/**
+ * @brief Create eNodeB key to exchange in init ctx message
+ * @param [in]kasme key
+ * @param [out]kenb_key output the generated key
+ * @return void
+ */
+void create_kenb_key(unsigned char *kasme, unsigned char *kenb_key,
+		unsigned int seq_no);
+
+
+void calculate_hmac_sha256(const unsigned char *input_data,
+	    int input_data_len, const unsigned char *key,
+		int key_length, void *output, unsigned int *out_len);
+
+#endif
diff --git a/include/common/snow_3g.h b/include/common/snow_3g.h
new file mode 100644
index 0000000..fe2e8d4
--- /dev/null
+++ b/include/common/snow_3g.h
@@ -0,0 +1,44 @@
+/*---------------------------------------------------------
+* SNOW_3G.h
+*---------------------------------------------------------*/
+/*
+ * The code has been referred from
+ * 1. https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf
+ * 2. https://www.gsma.com/aboutus/wp-content/uploads/2014/12/uea2uia2d1v21.pdf
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+
+typedef unsigned char u8;
+typedef unsigned int u32;
+typedef unsigned long long u64;
+
+/* Initialization.
+ * Input k[4]: Four 32-bit words making up 128-bit key.
+ * Input IV[4]: Four 32-bit words making 128-bit initialization variable.
+ * Output: All the LFSRs and FSM are initialized for key generation.
+ * See Section 4.1 of
+ * (https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf)
+ * specs document.
+ */
+
+
+void Initialize(u32 k[4], u32 IV[4]);
+
+/* Generation of Keystream.
+* input n: number of 32-bit words of keystream.
+* input z: space for the generated keystream, assumes
+* memory is allocated already.
+* output: generated keystream which is filled in z
+* See section 4.2 of
+* (https://www.gsma.com/aboutus/wp-content/uploads/2014/12/snow3gspec.pdf)
+* specs document.
+*/
+
+void GenerateKeystream(u32 n, u32 *z);
+
diff --git a/include/common/stimer.h b/include/common/stimer.h
new file mode 100644
index 0000000..ddf65dc
--- /dev/null
+++ b/include/common/stimer.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __STIMER_H
+#define __STIMER_H
+
+#include <time.h>
+
+typedef long long int stimer_t;
+
+#define STIMER_GET_CURRENT_TP(__now__)                                                 \
+({                                                                                     \
+   struct timespec __ts__;                                                             \
+   __now__ = clock_gettime(CLOCK_REALTIME,&__ts__) ?                                   \
+         -1 : (((stimer_t)__ts__.tv_sec) * 1000000000) + ((stimer_t)__ts__.tv_nsec);   \
+   __now__;                                                                            \
+})
+
+#define STIMER_GET_ELAPSED_NS(_start_)                                                 \
+({                                                                                     \
+   stimer_t __ns__;                                                                    \
+   STIMER_GET_CURRENT_TP(__ns__);                                                      \
+   if (__ns__ != -1)                                                                   \
+      __ns__ -= _start_;                                                               \
+   __ns__;                                                                             \
+})
+
+#define STIMER_GET_ELAPSED_US(__start__)                                               \
+({                                                                                     \
+   stimer_t __us__ = STIMER_GET_ELAPSED_NS(__start__);                                 \
+   if (__us__ != -1)                                                                   \
+      __us__ = (__us__ / 1000) + (__us__ % 1000 >= 500 ? 1 : 0);                       \
+   __us__;                                                                             \
+})
+
+#define STIMER_GET_ELAPSED_MS(___start___)                                             \
+({                                                                                     \
+   stimer_t __ms__ = STIMER_GET_ELAPSED_US(___start___);                               \
+   if (__ms__ != -1)                                                                   \
+      __ms__ = (__ms__ / 1000) + (__ms__ % 1000 >= 500 ? 1 : 0);                       \
+   __ms__;                                                                             \
+})
+
+#endif
+
diff --git a/include/common/thread_pool.h b/include/common/thread_pool.h
new file mode 100644
index 0000000..0bbad0b
--- /dev/null
+++ b/include/common/thread_pool.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __THREAD_POOL_H
+#define __THREAD_POOL_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+struct thread_pool;
+typedef void (* JobFunction) (void *);
+
+/*
+ * Creates new thread pool
+ * on success return pointer to thread_pool
+ * on failure return NULL
+ */
+extern struct thread_pool *thread_pool_new(int count);
+
+/*
+ * Stops all threads and
+ * destroy the thread pool
+ * on success return 0
+ * on failure return -1
+ */
+extern int thread_pool_destroy(struct thread_pool *pool);
+
+/*
+ * Queues the job to thread pool
+ * idle threads will pick the job
+ * on success it return 0
+ * on failure returns -ve values
+ */
+extern int insert_job(struct thread_pool *pool, JobFunction function,
+		void *userdata);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/include/common/tpool_queue.h b/include/common/tpool_queue.h
new file mode 100644
index 0000000..9ebd3f3
--- /dev/null
+++ b/include/common/tpool_queue.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TPOOL_QUEUE_H
+#define __TPOOL_QUEUE_H
+
+struct node {
+	void *data;
+	struct node *next;
+};
+
+struct Queue {
+	int length;
+	struct node *head;
+	struct node *tail;
+};
+
+struct thread_pool {
+	struct Queue *thread_queue;	/* queue to store thread ids */
+	struct Queue *job_queue;	/* for storing jobs */
+
+	pthread_mutex_t queue_mutex;	/* protection to job_queue */
+	pthread_cond_t job_received;	/* synchronisation with worker threads */
+	
+	pthread_t dispatch_thread;	/* signals threads if new work in job_queue*/
+
+	int idle_threads;		/* count of idle threads */
+};
+
+struct Job {
+	JobFunction function;
+	void *arg;
+};
+
+struct Queue;
+
+typedef void (* QueueDataFreeFunc)(void *data);
+
+extern struct Queue *queue_new();
+extern void queue_destroy(struct Queue *queue, QueueDataFreeFunc function);
+
+extern int queue_push_tail(struct Queue *queue, void *data);
+extern void *queue_pop_head(struct Queue *queue);
+extern int queue_get_length(struct Queue *queue);
+
+#endif
+
diff --git a/include/mme-app/actionHandlers/actionHandlers.h b/include/mme-app/actionHandlers/actionHandlers.h
new file mode 100644
index 0000000..be57cf7
--- /dev/null
+++ b/include/mme-app/actionHandlers/actionHandlers.h
@@ -0,0 +1,302 @@
+
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**************************************
+ * 
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/actionHandlers.h.tt>
+ **************************************/
+#ifndef ACTIONHANDLERS_H_
+#define ACTIONHANDLERS_H_
+
+#include "smTypes.h"
+
+namespace mme
+{
+    class ActionHandlers
+    {
+
+        /***************************************
+        * Constructor
+        ****************************************/
+        ActionHandlers()
+        {
+        }
+
+        /***************************************
+        * Destructor
+        ****************************************/
+        ~ActionHandlers()
+        {
+        }
+
+        public:
+
+        /**********************************************
+        * Action handler : attach_done
+        ***********************************************/
+        static SM::ActStatus attach_done(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : auth_req_to_ue
+        ***********************************************/
+        static SM::ActStatus auth_req_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : auth_response_validate
+        ***********************************************/
+        static SM::ActStatus auth_response_validate(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : check_esm_info_req_required
+        ***********************************************/
+        static SM::ActStatus check_esm_info_req_required(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : cs_req_to_sgw
+        ***********************************************/
+        static SM::ActStatus cs_req_to_sgw(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_attach_req_handler
+        ***********************************************/
+        static SM::ActStatus default_attach_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_cancel_loc_req_handler
+        ***********************************************/
+        static SM::ActStatus default_cancel_loc_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_ddn_handler
+        ***********************************************/
+        static SM::ActStatus default_ddn_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_detach_req_handler
+        ***********************************************/
+        static SM::ActStatus default_detach_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_s1_release_req_handler
+        ***********************************************/
+        static SM::ActStatus default_s1_release_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_service_req_handler
+        ***********************************************/
+        static SM::ActStatus default_service_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : default_tau_req_handler
+        ***********************************************/
+        static SM::ActStatus default_tau_req_handler(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : del_session_req
+        ***********************************************/
+        static SM::ActStatus del_session_req(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : detach_accept_to_ue
+        ***********************************************/
+        static SM::ActStatus detach_accept_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : ni_detach_req_to_ue
+        ***********************************************/
+        static SM::ActStatus ni_detach_req_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : perform_auth_and_sec_check
+        ***********************************************/
+        static SM::ActStatus perform_auth_and_sec_check(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_aia
+        ***********************************************/
+        static SM::ActStatus process_aia(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_attach_cmp_from_ue
+        ***********************************************/
+        static SM::ActStatus process_attach_cmp_from_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_cs_resp
+        ***********************************************/
+        static SM::ActStatus process_cs_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_del_session_resp
+        ***********************************************/
+        static SM::ActStatus process_del_session_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_detach_accept_from_ue
+        ***********************************************/
+        static SM::ActStatus process_detach_accept_from_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_esm_info_resp
+        ***********************************************/
+        static SM::ActStatus process_esm_info_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_identity_response
+        ***********************************************/
+        static SM::ActStatus process_identity_response(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_init_ctxt_resp
+        ***********************************************/
+        static SM::ActStatus process_init_ctxt_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_init_ctxt_resp_svc_req
+        ***********************************************/
+        static SM::ActStatus process_init_ctxt_resp_svc_req(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_mb_resp
+        ***********************************************/
+        static SM::ActStatus process_mb_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_mb_resp_svc_req
+        ***********************************************/
+        static SM::ActStatus process_mb_resp_svc_req(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_rel_ab_resp_from_sgw
+        ***********************************************/
+        static SM::ActStatus process_rel_ab_resp_from_sgw(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_sec_mode_resp
+        ***********************************************/
+        static SM::ActStatus process_sec_mode_resp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_service_request
+        ***********************************************/
+        static SM::ActStatus process_service_request(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_ue_ctxt_rel_comp
+        ***********************************************/
+        static SM::ActStatus process_ue_ctxt_rel_comp(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_ue_ctxt_rel_comp_for_detach
+        ***********************************************/
+        static SM::ActStatus process_ue_ctxt_rel_comp_for_detach(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : process_ula
+        ***********************************************/
+        static SM::ActStatus process_ula(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : sec_mode_cmd_to_ue
+        ***********************************************/
+        static SM::ActStatus sec_mode_cmd_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_air_to_hss
+        ***********************************************/
+        static SM::ActStatus send_air_to_hss(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_auth_reject
+        ***********************************************/
+        static SM::ActStatus send_auth_reject(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_ddn_ack_to_sgw
+        ***********************************************/
+        static SM::ActStatus send_ddn_ack_to_sgw(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_esm_info_req_to_ue
+        ***********************************************/
+        static SM::ActStatus send_esm_info_req_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_identity_request_to_ue
+        ***********************************************/
+        static SM::ActStatus send_identity_request_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_init_ctxt_req_to_ue
+        ***********************************************/
+        static SM::ActStatus send_init_ctxt_req_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_init_ctxt_req_to_ue_svc_req
+        ***********************************************/
+        static SM::ActStatus send_init_ctxt_req_to_ue_svc_req(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_mb_req_to_sgw
+        ***********************************************/
+        static SM::ActStatus send_mb_req_to_sgw(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_mb_req_to_sgw_svc_req
+        ***********************************************/
+        static SM::ActStatus send_mb_req_to_sgw_svc_req(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_paging_req_to_ue
+        ***********************************************/
+        static SM::ActStatus send_paging_req_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_rel_ab_req_to_sgw
+        ***********************************************/
+        static SM::ActStatus send_rel_ab_req_to_sgw(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_s1_rel_cmd_to_ue
+        ***********************************************/
+        static SM::ActStatus send_s1_rel_cmd_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_s1_rel_cmd_to_ue_for_detach
+        ***********************************************/
+        static SM::ActStatus send_s1_rel_cmd_to_ue_for_detach(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_tau_response_to_ue
+        ***********************************************/
+        static SM::ActStatus send_tau_response_to_ue(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : send_ulr_to_hss
+        ***********************************************/
+        static SM::ActStatus send_ulr_to_hss(SM::ControlBlock& cb);                
+
+        /**********************************************
+        * Action handler : validate_imsi_in_ue_context
+        ***********************************************/
+        static SM::ActStatus validate_imsi_in_ue_context(SM::ControlBlock& cb);                
+    };//ActionHandlers
+};//mme
+
+#endif /* ACTIONHANDLERS_H_ */
\ No newline at end of file
diff --git a/include/mme-app/contextManager/bearerContextManager.h b/include/mme-app/contextManager/bearerContextManager.h
new file mode 100644
index 0000000..5f33047
--- /dev/null
+++ b/include/mme-app/contextManager/bearerContextManager.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __BearerContextManager__
+#define __BearerContextManager__
+/******************************************************
+* bearerContextManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class BearerContext;
+
+	class BearerContextManager
+	{
+	public:
+		/****************************************
+		* BearerContextManager
+		*  constructor
+		****************************************/
+		BearerContextManager(int numOfBlocks);
+		
+		/****************************************
+		* BearerContextManager
+		*    Destructor
+		****************************************/
+		~BearerContextManager();
+		
+		/******************************************
+		 * allocateBearerContext
+		 *  allocate BearerContext data block
+		 ******************************************/
+		BearerContext* allocateBearerContext();
+		
+		/******************************************
+		 * deallocateBearerContext
+		 *  deallocate a BearerContext data block
+		 ******************************************/
+		void deallocateBearerContext(BearerContext* BearerContextp );
+	
+	private:
+		cmn::memPool::MemPoolManager<BearerContext> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/dataBlocks.h b/include/mme-app/contextManager/dataBlocks.h
new file mode 100644
index 0000000..b3b4809
--- /dev/null
+++ b/include/mme-app/contextManager/dataBlocks.h
@@ -0,0 +1,962 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DGM_BLOCKSTRUCTURES_H
+#define DGM_BLOCKSTRUCTURES_H
+/**************************************
+*
+* This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/dataBlocks.h.tt>
+ ***************************************/
+#include "structs.h"
+#include "permDataBlock.h"
+#include "tempDataBlock.h"
+#include <utils/mmeCauseTypes.h>
+
+namespace mme
+{
+	class UEContext;
+	class MmContext;
+	class SessionContext;
+	class BearerContext;
+	class MmeProcedureCtxt;
+	class MmeDetachProcedureCtxt;
+	class MmeSvcReqProcedureCtxt;
+	class MmeTauProcedureCtxt;
+
+	class UEContext:public SM::PermDataBlock
+	{
+		public:
+	
+			/****************************************
+			* UEContext
+			*    constructor
+			****************************************/
+			UEContext();
+			
+			/****************************************
+			* ~UEContext
+			*    destructor
+			****************************************/
+			~UEContext();
+			
+			/****************************************
+			* setenbFd
+			*    set enbFd to UEContext
+			****************************************/
+			void setEnbFd( int enbFd_i );
+			
+			/****************************************
+			* getenbFd
+			*    get enbFd from UEContext
+			****************************************/
+			int getEnbFd();
+			
+			/****************************************
+			* sets1apEnbUeId
+			*    set s1apEnbUeId to UEContext
+			****************************************/
+			void setS1apEnbUeId( int s1apEnbUeId_i );
+			
+			/****************************************
+			* gets1apEnbUeId
+			*    get s1apEnbUeId from UEContext
+			****************************************/
+			int getS1apEnbUeId();
+			
+			/****************************************
+			* setsubscriptionStatus
+			*    set subscriptionStatus to UEContext
+			****************************************/
+			void setSubscriptionStatus( int subscriptionStatus_i );
+			
+			/****************************************
+			* getsubscriptionStatus
+			*    get subscriptionStatus from UEContext
+			****************************************/
+			int getSubscriptionStatus();
+			
+			/****************************************
+			* setnetAccessMode
+			*    set netAccessMode to UEContext
+			****************************************/
+			void setNetAccessMode( int netAccessMode_i );
+			
+			/****************************************
+			* getnetAccessMode
+			*    get netAccessMode from UEContext
+			****************************************/
+			int getNetAccessMode();
+			
+			/****************************************
+			* setcontextID
+			*    set contextID to UEContext
+			****************************************/
+			void setContextID( uint32_t contextID_i );
+			
+			/****************************************
+			* getcontextID
+			*    get contextID from UEContext
+			****************************************/
+			uint32_t getContextID();
+			
+			/****************************************
+			* setrauTauTimer
+			*    set rauTauTimer to UEContext
+			****************************************/
+			void setRauTauTimer( unsigned int rauTauTimer_i );
+			
+			/****************************************
+			* getrauTauTimer
+			*    get rauTauTimer from UEContext
+			****************************************/
+			unsigned int getRauTauTimer();
+			
+			/****************************************
+			* setaccessRestrictionData
+			*    set accessRestrictionData to UEContext
+			****************************************/
+			void setAccessRestrictionData( unsigned int accessRestrictionData_i );
+			
+			/****************************************
+			* getaccessRestrictionData
+			*    get accessRestrictionData from UEContext
+			****************************************/
+			unsigned int getAccessRestrictionData();
+			
+			/****************************************
+			* setimsi
+			*    set imsi to UEContext
+			****************************************/
+			void setImsi( const DigitRegister15& imsi_i );
+			
+			/****************************************
+			* getimsi
+			*    get imsi from UEContext
+			****************************************/
+			const DigitRegister15& getImsi()const;
+			
+			/****************************************
+			* setmsisdn
+			*    set msisdn to UEContext
+			****************************************/
+			void setMsisdn( const DigitRegister15& msisdn_i );
+			
+			/****************************************
+			* getmsisdn
+			*    get msisdn from UEContext
+			****************************************/
+			const DigitRegister15& getMsisdn()const;
+			
+			/****************************************
+			* setdwnLnkSeqNo
+			*    set dwnLnkSeqNo to UEContext
+			****************************************/
+			void setDwnLnkSeqNo( unsigned short dwnLnkSeqNo_i );
+			
+			/****************************************
+			* getdwnLnkSeqNo
+			*    get dwnLnkSeqNo from UEContext
+			****************************************/
+			unsigned short getDwnLnkSeqNo();
+			
+			/****************************************
+			* setupLnkSeqNo
+			*    set upLnkSeqNo to UEContext
+			****************************************/
+			void setUpLnkSeqNo( unsigned short upLnkSeqNo_i );
+			
+			/****************************************
+			* getupLnkSeqNo
+			*    get upLnkSeqNo from UEContext
+			****************************************/
+			unsigned short getUpLnkSeqNo();
+			
+			/****************************************
+			* setueState
+			*    set ueState to UEContext
+			****************************************/
+			void setUeState( UE_State_e ueState_i );
+			
+			/****************************************
+			* getueState
+			*    get ueState from UEContext
+			****************************************/
+			UE_State_e getUeState();
+			
+			/****************************************
+			* settai
+			*    set tai to UEContext
+			****************************************/
+			void setTai( const Tai& tai_i );
+			
+			/****************************************
+			* gettai
+			*    get tai from UEContext
+			****************************************/
+			const Tai& getTai()const;
+			
+			/****************************************
+			* setutranCgi
+			*    set utranCgi to UEContext
+			****************************************/
+			void setUtranCgi( const Cgi& utranCgi_i );
+			
+			/****************************************
+			* getutranCgi
+			*    get utranCgi from UEContext
+			****************************************/
+			const Cgi& getUtranCgi()const;
+			
+			/****************************************
+			* setmsNetCapab
+			*    set msNetCapab to UEContext
+			****************************************/
+			void setMsNetCapab( const Ms_net_capab& msNetCapab_i );
+			
+			/****************************************
+			* getmsNetCapab
+			*    get msNetCapab from UEContext
+			****************************************/
+			const Ms_net_capab& getMsNetCapab()const;
+			
+			/****************************************
+			* setueNetCapab
+			*    set ueNetCapab to UEContext
+			****************************************/
+			void setUeNetCapab( const Ue_net_capab& ueNetCapab_i );
+			
+			/****************************************
+			* getueNetCapab
+			*    get ueNetCapab from UEContext
+			****************************************/
+			const Ue_net_capab& getUeNetCapab()const;
+			
+			/****************************************
+			* setueSecInfo
+			*    set ueSecInfo to UEContext
+			****************************************/
+			void setUeSecInfo( const Secinfo& ueSecInfo_i );
+			
+			/****************************************
+			* getueSecInfo
+			*    get ueSecInfo from UEContext
+			****************************************/
+			const Secinfo& getUeSecInfo()const;
+			
+			/****************************************
+			* setambr
+			*    set ambr to UEContext
+			****************************************/
+			void setAmbr( const Ambr& ambr_i );
+			
+			/****************************************
+			* getambr
+			*    get ambr from UEContext
+			****************************************/
+			const Ambr& getAmbr()const;
+			
+			/****************************************
+			* setaiaSecInfo
+			*    set aiaSecInfo to UEContext
+			****************************************/
+			void setAiaSecInfo( const E_utran_sec_vector& aiaSecInfo_i );
+			
+			/****************************************
+			* getaiaSecInfo
+			*    get aiaSecInfo from UEContext
+			****************************************/
+			const E_utran_sec_vector& getAiaSecInfo()const;
+			
+			/****************************************
+			* setmTmsi
+			*    set mTmsi to UEContext
+			****************************************/
+			void setMtmsi( uint32_t mTmsi );
+
+			/****************************************
+			* getaiaSecInfo
+			*    get aiaSecInfo from UEContext
+			****************************************/
+			uint32_t getMtmsi();
+			
+			/****************************************
+			* setMmContext
+			*    set MmContext to UEContext
+			****************************************/
+			void setMmContext( MmContext* MmContextp ) ;
+			
+			/****************************************
+			* getMmContext
+			*    get MmContext to UEContext
+			****************************************/
+			MmContext* getMmContext();
+			
+			/****************************************
+			* setSessionContext
+			*    set SessionContext to UEContext
+			****************************************/
+			void setSessionContext( SessionContext* SessionContextp ) ;
+			
+			/****************************************
+			* getSessionContext
+			*    get SessionContext to UEContext
+			****************************************/
+			SessionContext* getSessionContext();
+			
+		
+		private:
+		
+			// DataName
+			int enbFd_m;
+			
+			// DataName
+			int s1apEnbUeId_m;
+			
+			// DataName
+			int subscriptionStatus_m;
+			
+			// DataName
+			int netAccessMode_m;
+			
+			// DataName
+			uint32_t contextID_m;
+			
+			// DataName
+			unsigned int rauTauTimer_m;
+			
+			// DataName
+			unsigned int accessRestrictionData_m;
+			
+			// DataName
+			DigitRegister15 imsi_m;
+			
+			// DataName
+			DigitRegister15 msisdn_m;
+			
+			// DataName
+			unsigned short dwnLnkSeqNo_m;
+			
+			// DataName
+			unsigned short upLnkSeqNo_m;
+			
+			// DataName
+			UE_State_e ueState_m;
+			
+			// DataName
+			Tai tai_m;
+			
+			// DataName
+			Cgi utranCgi_m;
+			
+			// DataName
+			Ms_net_capab msNetCapab_m;
+			
+			// DataName
+			Ue_net_capab ueNetCapab_m;
+			
+			// DataName
+			Secinfo ueSecInfo_m;
+			
+			// DataName
+			Ambr ambr_m;
+			
+			// DataName
+			E_utran_sec_vector aiaSecInfo_m;
+			
+			// DataName
+			uint32_t mTmsi_m;
+
+			// MmContext
+			MmContext* MmContext_mp;
+			
+			// SessionContext
+			SessionContext* SessionContext_mp;
+			
+	};
+	 
+	class MmContext:public SM::PermDataBlock
+	{
+		public:
+	
+			/****************************************
+			* MmContext
+			*    constructor
+			****************************************/
+			MmContext();
+			
+			/****************************************
+			* ~MmContext
+			*    destructor
+			****************************************/
+			~MmContext();
+			
+			/****************************************
+			* setmmState
+			*    set mmState to MmContext
+			****************************************/
+			void setMmState(EmmState mmState_i );
+			
+			/****************************************
+			* getmmState
+			*    get mmState from MmContext
+			****************************************/
+			EmmState getMmState();
+			
+			
+		private:
+		
+			// DataName
+			EmmState mmState_m;
+			
+			
+	};
+	 
+	class SessionContext:public SM::PermDataBlock
+	{
+		public:
+	
+			/****************************************
+			* SessionContext
+			*    constructor
+			****************************************/
+			SessionContext();
+			
+			/****************************************
+			* ~SessionContext
+			*    destructor
+			****************************************/
+			~SessionContext();
+			
+			/****************************************
+			* setsessionId
+			*    set sessionId to SessionContext
+			****************************************/
+			void setSessionId( uint8_t sessionId_i );
+			
+			/****************************************
+			* getsessionId
+			*    get sessionId from SessionContext
+			****************************************/
+			uint8_t getSessionId();
+			
+			/****************************************
+			* sets11SgwCtrlFteid
+			*    set s11SgwCtrlFteid to SessionContext
+			****************************************/
+			void setS11SgwCtrlFteid( const Fteid& s11SgwCtrlFteid_i );
+			
+			/****************************************
+			* gets11SgwCtrlFteid
+			*    get s11SgwCtrlFteid from SessionContext
+			****************************************/
+			const Fteid& getS11SgwCtrlFteid()const;
+			
+			/****************************************
+			* sets5S8PgwCtrlFteid
+			*    set s5S8PgwCtrlFteid to SessionContext
+			****************************************/
+			void setS5S8PgwCtrlFteid( const Fteid& s5S8PgwCtrlFteid_i );
+			
+			/****************************************
+			* gets5S8PgwCtrlFteid
+			*    get s5S8PgwCtrlFteid from SessionContext
+			****************************************/
+			const Fteid& getS5S8PgwCtrlFteid()const;
+			
+			/****************************************
+			* setpdnAddr
+			*    set pdnAddr to SessionContext
+			****************************************/
+			void setPdnAddr( const Paa& pdnAddr_i );
+			
+			/****************************************
+			* getpdnAddr
+			*    get pdnAddr from SessionContext
+			****************************************/
+			const Paa& getPdnAddr()const;
+			
+			/****************************************
+			* setaccessPtName
+			*    set accessPtName to SessionContext
+			****************************************/
+			void setAccessPtName( const Apn_name& accessPtName_i );
+			
+			/****************************************
+			* getaccessPtName
+			*    get accessPtName from SessionContext
+			****************************************/
+			const Apn_name& getAccessPtName()const;
+			
+			/****************************************
+			* geteRabId
+			*    get eRabId from SessionContext
+			****************************************/
+			unsigned short getErabId();
+			
+			/****************************************
+			* setapnConfigProfileCtxId
+			*    set apnConfigProfileCtxId to SessionContext
+			****************************************/
+			void setApnConfigProfileCtxId( unsigned int apnConfigProfileCtxId_i );
+			
+			/****************************************
+			* getapnConfigProfileCtxId
+			*    get apnConfigProfileCtxId from SessionContext
+			****************************************/
+			unsigned int getApnConfigProfileCtxId();
+
+			/****************************************
+		        * setpti
+			*    set pti to SessionContext
+			****************************************/
+			void setPti( uint8_t pti_i );
+
+			/****************************************
+			* getpti
+			*    get pti from SessionContext
+			****************************************/
+			uint8_t getPti();
+			
+			/****************************************
+			* setBearerContext
+			*    set BearerContext to SessionContext
+			****************************************/
+			void setBearerContext( BearerContext* BearerContextp ) ;
+			
+			/****************************************
+			* getBearerContext
+			*    get BearerContext to SessionContext
+			****************************************/
+			BearerContext* getBearerContext();
+		
+		
+		private:
+		
+			// DataName
+			uint8_t sessionId_m;
+			
+			// DataName
+			Fteid s11SgwCtrlFteid_m;
+			
+			// DataName
+			Fteid s5S8PgwCtrlFteid_m;
+			
+			// DataName
+			Paa pdnAddr_m;
+			
+			// DataName
+			Apn_name accessPtName_m;
+
+			// DataName
+			unsigned int apnConfigProfileCtxId_m;
+			
+			// DataName
+			uint8_t pti_m;
+			
+			// BearerContext
+			BearerContext* BearerContext_mp;
+			
+	};
+	 
+	class BearerContext:public SM::PermDataBlock
+	{
+		public:
+	
+			/****************************************
+			* BearerContext
+			*    constructor
+			****************************************/
+			BearerContext();
+			
+			/****************************************
+			* ~BearerContext
+			*    destructor
+			****************************************/
+			~BearerContext();
+			
+			/****************************************
+			* sets1uSgwUserFteid
+			*    set s1uSgwUserFteid to BearerContext
+			****************************************/
+			void setS1uSgwUserFteid( const Fteid& s1uSgwUserFteid_i );
+			
+			/****************************************
+			* gets1uSgwUserFteid
+			*    get s1uSgwUserFteid from BearerContext
+			****************************************/
+			const Fteid& getS1uSgwUserFteid()const;
+			
+			/****************************************
+			* sets5S8PgwUserFteid
+			*    set s5S8PgwUserFteid to BearerContext
+			****************************************/
+			void setS5S8PgwUserFteid( const Fteid& s5S8PgwUserFteid_i );
+			
+			/****************************************
+			* gets5S8PgwUserFteid
+			*    get s5S8PgwUserFteid from BearerContext
+			****************************************/
+			const Fteid& getS5S8PgwUserFteid()const;
+			
+			/****************************************
+			* sets1uEnbUserFteid
+			*    set s1uEnbUserFteid to BearerContext
+			****************************************/
+			void setS1uEnbUserFteid( const Fteid& s1uEnbUserFteid_i );
+			
+			/****************************************
+			* gets1uEnbUserFteid
+			*    get s1uEnbUserFteid from BearerContext
+			****************************************/
+			const Fteid& getS1uEnbUserFteid()const;
+			
+			/****************************************
+			* setbearerId
+			*    set bearerId to BearerContext
+			****************************************/
+			void setBearerId( unsigned char bearerId_i );
+			
+			/****************************************
+			* getbearerId
+			*    get bearerId from BearerContext
+			****************************************/
+			unsigned char getBearerId();
+			
+			
+		
+		private:
+		
+			// DataName
+			Fteid s1uSgwUserFteid_m;
+			
+			// DataName
+			Fteid s5S8PgwUserFteid_m;
+			
+			// DataName
+			Fteid s1uEnbUserFteid_m;
+			
+			// DataName
+			unsigned char bearerId_m;
+			
+			
+	};
+	 
+	class MmeProcedureCtxt:public SM::TempDataBlock
+	{
+		public:
+	
+			/****************************************
+			* MmeProcedureCtxt
+			*    constructor
+			****************************************/
+			MmeProcedureCtxt();
+			
+			/****************************************
+			* ~MmeProcedureCtxt
+			*    destructor
+			****************************************/
+			~MmeProcedureCtxt();
+			
+			/****************************************
+			* setctxtType
+			*    set ctxtType to MmeProcedureCtxt
+			****************************************/
+			void setCtxtType( ProcedureType ctxtType_i );
+			
+			/****************************************
+			* getctxtType
+			*    get ctxtType from MmeProcedureCtxt
+			****************************************/
+			ProcedureType getCtxtType();
+
+			/****************************************
+			* setesmInfoTxRequired
+			*    set esmInfoTxRequired to MmeProcedureCtxt
+			****************************************/
+			void setEsmInfoTxRequired( bool esmInfoTxRequired_i );
+			
+			/****************************************
+			* getesmInfoTxRequired
+			*    get esmInfoTxRequired from MmeProcedureCtxt
+			****************************************/
+			bool getEsmInfoTxRequired();
+			
+			/****************************************
+			* setpti
+			*    set pti to MmeProcedureCtxt
+			****************************************/
+			void setPti( uint8_t pti_i );
+
+			/****************************************
+			* getpti
+			*    get pti from MmeProcedureCtxt
+			****************************************/
+			uint8_t getPti();
+			
+			/****************************************
+			* setpcoOptions
+			*    set pcoOptions to MmeProcedureCtxt
+			****************************************/
+			void setPcoOptions(const unsigned short int* pco_options_i);
+
+			/****************************************
+			* getpcoOptions
+			*    get pcoOptions from MmeProcedureCtxt
+			****************************************/
+			const unsigned short int* getPcoOptions()const;
+
+			/****************************************
+			* setattachType
+			*    set attachType to MmeProcedureCtxt
+			****************************************/
+			void setAttachType( AttachType attachType_i );
+
+			/****************************************
+			* getattachType
+			*    get attachType from MmeProcedureCtxt
+			****************************************/
+			AttachType getAttachType();
+
+			/****************************************
+			* setMmeErrorCause
+			*    set mmeErrorCause to MmeProcedureCtxt
+			*******************************************/
+			void setMmeErrorCause( MmeErrorCause mmeErrorCause_i );
+
+			/*******************************************
+			* getMmeErrorCause
+			*    get mmeErrorCause from MmeProcedureCtxt
+			*********************************************/
+			MmeErrorCause getMmeErrorCause();
+
+
+		private:
+		
+			// DataName
+			ProcedureType ctxtType_m;
+
+            // DataName
+            MmeErrorCause mmeErrorCause_m;
+	
+			//DataName
+			AttachType attachType_m;
+
+			//DataName
+			unsigned short int pcoOptions_m[10];
+
+			// DataName
+			uint8_t pti_m;
+
+			//DataName
+			bool esmInfoTxRequired_m;
+
+	};
+	
+	class MmeDetachProcedureCtxt:public MmeProcedureCtxt
+	{
+		public:
+
+			/****************************************
+			* MmeDetachProcedureCtxt
+			*    constructor
+			****************************************/
+			MmeDetachProcedureCtxt();
+
+			/****************************************
+			* ~MmeDetachProcedureCtxt
+			*    destructor
+			****************************************/
+			~MmeDetachProcedureCtxt();
+
+			/****************************************
+			* setdetachType
+			*    set detachType to MmeDetachProcedureCtxt
+			****************************************/
+			void setDetachType(DetachType detachType_i );
+
+			/****************************************
+			* getdetachType
+			*    get detachType from MmeDetachProcedureCtxt
+			****************************************/
+			DetachType getDetachType();
+
+			/****************************************
+			* setcancellationType
+			*    set cancellationType to MmeProcedureCtxt
+			****************************************/
+			void setCancellationType(CancellationType cancellationType_i );
+
+			/****************************************
+			* getcancellationType
+			*    get cancellationType from MmeProcedureCtxt
+			****************************************/
+			CancellationType getCancellationType();
+
+		private:
+
+			// DataName
+			DetachType detachType_m;
+
+			//DataName
+			CancellationType cancellationType_m;
+	};
+
+
+
+	class MmeSvcReqProcedureCtxt:public MmeProcedureCtxt
+	{
+		public:
+		    /****************************************
+		    * MmeSvcReqProcedureCtxt
+		    *    constructor
+		    ****************************************/
+		    MmeSvcReqProcedureCtxt();
+
+		    /****************************************
+		    * ~MmeSvcReqProcedureCtxt
+		    *    destructor
+		    ****************************************/
+		    ~MmeSvcReqProcedureCtxt();
+			
+		    /****************************************
+		    * setseqNo
+		    *    set seqNo to MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    void setDdnSeqNo( uint32_t ddnSeqNum_i );
+
+		    /****************************************
+		    * getseqNo
+		    *    get seqNo from MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    uint32_t getDdnSeqNo();
+
+		    /**************************************************
+		    * setPagingTrigger
+		    *    set pagingTrigger to MmeSvcReqProcedureCtxt
+		    **************************************************/
+		    void setPagingTrigger( PagingTrigger pagingTrigger_i );
+	
+		    /****************************************
+		    * getPagingTrigger
+		    *    get pagingTrigger from MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    PagingTrigger getPagingTrigger();
+	
+		    /****************************************
+		    * setEpsBearerId
+		    *    set epsBearerId to MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    void setEpsBearerId( unsigned char epsBearerId_i );
+	
+		    /****************************************
+		    * getEpsBearerId
+		    *    get epsBearerId from MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    unsigned char getEpsBearerId();
+	
+		    /****************************************
+		    * setArp
+		    *    set arp to MmeSvcReqProcedureCtxt
+	   	    ****************************************/
+		    void setArp( const Arp& arp_i );
+	
+		    /****************************************
+		    * getArp
+		    *    get arp from MmeSvcReqProcedureCtxt
+		    ****************************************/
+		    const Arp& getArp()const;
+	
+		    					
+	    private:
+			// DataName
+			PagingTrigger pagingTrigger_m;
+			
+			// DataName
+			unsigned char epsBearerId_m;
+			
+			// DataName
+			Arp arp_m;
+			
+			// DataName
+			uint32_t ddnSeqNum_m;
+			
+	};
+	
+	class MmeTauProcedureCtxt:public MmeProcedureCtxt
+	{
+		public:
+			/****************************************
+			* MmeTauProcedureCtxt
+			*    constructor
+			****************************************/
+			MmeTauProcedureCtxt();
+
+			/****************************************
+			* ~MmeTauProcedureCtxt
+			*    destructor
+			****************************************/
+			~MmeTauProcedureCtxt();
+				
+			/****************************************
+			* sets1apEnbUeId
+			*    set s1apEnbUeId to MmeTauProcedureCtxt
+			****************************************/
+			void setS1apEnbUeId( int s1apEnbUeId_i );
+			
+			/****************************************
+			* gets1apEnbUeId
+			*    get s1apEnbUeId from MmeTauProcedureCtxt
+			****************************************/
+			int getS1apEnbUeId();
+			
+			/****************************************
+			* settai
+			*    set tai to MmeTauProcedureCtxt
+			****************************************/
+			void setTai( const Tai& tai_i );
+			
+			/****************************************
+			* gettai
+			*    get tai from MmeTauProcedureCtxt
+			****************************************/
+			const Tai& getTai()const;
+			
+			/****************************************
+			* setenbFd
+			*    set enbFd to MmeTauProcedureCtxt
+			****************************************/
+			void setEnbFd( int enbFd_i );
+			
+			/****************************************
+			* getenbFd
+			*    get enbFd from MmeTauProcedureCtxt
+			****************************************/
+			int getEnbFd();		
+			
+			
+				
+		private:
+			int s1apEnbUeId_m;
+			Tai tai_m;
+			int enbFd_m;			
+			
+	};
+	
+} // mme
+#endif
diff --git a/include/mme-app/contextManager/mmContextManager.h b/include/mme-app/contextManager/mmContextManager.h
new file mode 100644
index 0000000..cdf2113
--- /dev/null
+++ b/include/mme-app/contextManager/mmContextManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MmContextManager__
+#define __MmContextManager__
+/******************************************************
+* mmContextManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class MmContext;
+	class MmContextManager
+	{
+	public:
+		/****************************************
+		* MmContextManager
+		*  constructor
+		****************************************/
+		MmContextManager(int numOfBlocks);
+		
+		/****************************************
+		* MmContextManager
+		*    Destructor
+		****************************************/
+		~MmContextManager();
+		
+		/******************************************
+		 * allocateMmContext
+		 *  allocate MmContext data block
+		 ******************************************/
+		MmContext* allocateMmContext();
+		
+		/******************************************
+		 * deallocateMmContext
+		 *  deallocate a MmContext data block
+		 ******************************************/
+		void deallocateMmContext(MmContext* MmContextp );
+	
+	private:
+		cmn::memPool::MemPoolManager<MmContext> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/mmeDetachProcedureCtxtManager.h b/include/mme-app/contextManager/mmeDetachProcedureCtxtManager.h
new file mode 100644
index 0000000..b7c3197
--- /dev/null
+++ b/include/mme-app/contextManager/mmeDetachProcedureCtxtManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MmeDetachProcedureCtxtManager__
+#define __MmeDetachProcedureCtxtManager__
+/******************************************************
+ * mmeDetachProcedureCtxtManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class MmeDetachProcedureCtxt;
+	class MmeDetachProcedureCtxtManager
+	{
+	public:
+		/****************************************
+		* MmeDetachProcedureCtxtManager
+		*  constructor
+		****************************************/
+		MmeDetachProcedureCtxtManager(int numOfBlocks);
+		
+		/****************************************
+		* MmeDetachProcedureCtxtManager
+		*    Destructor
+		****************************************/
+		~MmeDetachProcedureCtxtManager();
+		
+		/******************************************
+		 * allocateMmeDetachProcedureCtxt
+		 *  allocate MmeDetachProcedureCtxt data block
+		 ******************************************/
+		MmeDetachProcedureCtxt* allocateMmeDetachProcedureCtxt();
+		
+		/******************************************
+		 * deallocateMmeDetachProcedureCtxt
+		 *  deallocate a MmeDetachProcedureCtxt data block
+		 ******************************************/
+		void deallocateMmeDetachProcedureCtxt(MmeDetachProcedureCtxt* MmeDetachProcedureCtxtp );
+	
+	private:
+		cmn::memPool::MemPoolManager<MmeDetachProcedureCtxt> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/mmeProcedureCtxtManager.h b/include/mme-app/contextManager/mmeProcedureCtxtManager.h
new file mode 100644
index 0000000..c244fd4
--- /dev/null
+++ b/include/mme-app/contextManager/mmeProcedureCtxtManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MmeProcedureCtxtManager__
+#define __MmeProcedureCtxtManager__
+/******************************************************
+* mmeProcedureCtxtManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class MmeProcedureCtxt;
+	class MmeProcedureCtxtManager
+	{
+	public:
+		/****************************************
+		* MmeProcedureCtxtManager
+		*  constructor
+		****************************************/
+		MmeProcedureCtxtManager(int numOfBlocks);
+		
+		/****************************************
+		* MmeProcedureCtxtManager
+		*    Destructor
+		****************************************/
+		~MmeProcedureCtxtManager();
+		
+		/******************************************
+		 * allocateMmeProcedureCtxt
+		 *  allocate MmeProcedureCtxt data block
+		 ******************************************/
+		MmeProcedureCtxt* allocateMmeProcedureCtxt();
+		
+		/******************************************
+		 * deallocateMmeProcedureCtxt
+		 *  deallocate a MmeProcedureCtxt data block
+		 ******************************************/
+		void deallocateMmeProcedureCtxt(MmeProcedureCtxt* MmeProcedureCtxtp );
+	
+	private:
+		cmn::memPool::MemPoolManager<MmeProcedureCtxt> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/mmeSvcReqProcedureCtxtManager.h b/include/mme-app/contextManager/mmeSvcReqProcedureCtxtManager.h
new file mode 100644
index 0000000..cd3e55a
--- /dev/null
+++ b/include/mme-app/contextManager/mmeSvcReqProcedureCtxtManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2019, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MmeSvcReqProcedureCtxtManager__
+#define __MmeSvcReqProcedureCtxtManager__
+/******************************************************
+* mmeSvcReqProcedureCtxtManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class MmeSvcReqProcedureCtxt;
+	class MmeSvcReqProcedureCtxtManager
+	{
+	public:
+		/****************************************
+		* MmeSvcReqProcedureCtxtManager
+		*  constructor
+		****************************************/
+		MmeSvcReqProcedureCtxtManager(int numOfBlocks);
+		
+		/****************************************
+		* MmeSvcReqProcedureCtxtManager
+		*    Destructor
+		****************************************/
+		~MmeSvcReqProcedureCtxtManager();
+		
+		/******************************************
+		 * allocateMmeSvcReqProcedureCtxt
+		 *  allocate MmeSvcReqProcedureCtxt data block
+		 ******************************************/
+		MmeSvcReqProcedureCtxt* allocateMmeSvcReqProcedureCtxt();
+		
+		/******************************************
+		 * deallocateMmeSvcReqProcedureCtxt
+		 *  deallocate a MmeSvcReqProcedureCtxt data block
+		 ******************************************/
+		void deallocateMmeSvcReqProcedureCtxt(MmeSvcReqProcedureCtxt* MmeSvcReqProcedureCtxtp );
+	
+	private:
+		cmn::memPool::MemPoolManager<MmeSvcReqProcedureCtxt> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/mmeTauProcedureCtxtManager.h b/include/mme-app/contextManager/mmeTauProcedureCtxtManager.h
new file mode 100644
index 0000000..da46b7f
--- /dev/null
+++ b/include/mme-app/contextManager/mmeTauProcedureCtxtManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MmeTauProcedureCtxtManager__
+#define __MmeTauProcedureCtxtManager__
+/******************************************************
+ * MmeTauProcedureCtxtManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class MmeTauProcedureCtxt;
+	class MmeTauProcedureCtxtManager
+	{
+	public:
+		/****************************************
+		* MmeTauProcedureCtxtManager
+		*  constructor
+		****************************************/
+		MmeTauProcedureCtxtManager(int numOfBlocks);
+		
+		/****************************************
+		* MmeTauProcedureCtxtManager
+		*    Destructor
+		****************************************/
+		~MmeTauProcedureCtxtManager();
+		
+		/******************************************
+		* allocateMmeTauProcedureCtxt
+		*  allocate MmeTauProcedureCtxt data block
+		******************************************/
+		MmeTauProcedureCtxt* allocateMmeTauProcedureCtxt();
+		
+		/******************************************
+		* deallocateMmeTauProcedureCtxt
+		*  deallocate a MmeTauProcedureCtxt data block
+		******************************************/
+		void deallocateMmeTauProcedureCtxt(MmeTauProcedureCtxt* MmeTauProcedureCtxtp );
+	
+	private:
+		cmn::memPool::MemPoolManager<MmeTauProcedureCtxt> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/sessionContextManager.h b/include/mme-app/contextManager/sessionContextManager.h
new file mode 100644
index 0000000..7b55924
--- /dev/null
+++ b/include/mme-app/contextManager/sessionContextManager.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SessionContextManager__
+#define __SessionContextManager__
+/******************************************************
+* sessionContextManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class SessionContext;
+	class SessionContextManager
+	{
+	public:
+		/****************************************
+		* SessionContextManager
+		*  constructor
+		****************************************/
+		SessionContextManager(int numOfBlocks);
+		
+		/****************************************
+		* SessionContextManager
+		*    Destructor
+		****************************************/
+		~SessionContextManager();
+		
+		/******************************************
+		 * allocateSessionContext
+		 *  allocate SessionContext data block
+		 ******************************************/
+		SessionContext* allocateSessionContext();
+		
+		/******************************************
+		 * deallocateSessionContext
+		 *  deallocate a SessionContext data block
+		 ******************************************/
+		void deallocateSessionContext(SessionContext* SessionContextp );
+	
+	private:
+		cmn::memPool::MemPoolManager<SessionContext> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/contextManager/subsDataGroupManager.h b/include/mme-app/contextManager/subsDataGroupManager.h
new file mode 100644
index 0000000..b8d7b16
--- /dev/null
+++ b/include/mme-app/contextManager/subsDataGroupManager.h
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SUBS_DATAGROUPMANAGER__
+#define __SUBS_DATAGROUPMANAGER__
+/**************************************
+ *
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/subsDataGroupManager.h.tt>
+ ***************************************/
+#include <map>
+#include <mutex>
+
+#include "dataGroupManager.h"
+#include "contextManager/dataBlocks.h"
+#include "contextManager/uEContextManager.h"
+#include "contextManager/mmContextManager.h"
+#include "contextManager/sessionContextManager.h"
+#include "contextManager/bearerContextManager.h"
+#include "contextManager/mmeProcedureCtxtManager.h"
+#include "contextManager/mmeDetachProcedureCtxtManager.h"
+#include "contextManager/mmeSvcReqProcedureCtxtManager.h"
+#include "contextManager/mmeTauProcedureCtxtManager.h"
+
+
+namespace mme
+{	
+	class SubsDataGroupManager:public cmn::DGM::DataGroupManager
+	{
+		public:
+		
+			/******************************************
+			* Instance 
+			*    Creates static instance for the SubsDataGroupManager
+			*******************************************/
+			static SubsDataGroupManager* Instance();
+	
+			/****************************************
+			* SubsDataGroupManager
+			*    Destructor
+			****************************************/
+			virtual ~SubsDataGroupManager();
+			
+			/******************************************
+			* initialize
+			*  Initializes control block and pool managers
+			******************************************/
+			void initialize();
+
+			/******************************************
+			* getUEContext
+			*  Get UEContext data block
+			******************************************/
+			UEContext* getUEContext();
+			
+			/******************************************
+			* deleteUEContext
+			*  Delete a UEContext data block
+			******************************************/
+			void deleteUEContext(UEContext* UEContextp );
+			
+			/******************************************
+			* getMmContext
+			*  Get MmContext data block
+			******************************************/
+			MmContext* getMmContext();
+			
+			/******************************************
+			* deleteMmContext
+			*  Delete a MmContext data block
+			******************************************/
+			void deleteMmContext(MmContext* MmContextp );
+			
+			/******************************************
+			* getSessionContext
+			*  Get SessionContext data block
+			******************************************/
+			SessionContext* getSessionContext();
+			
+			/******************************************
+			* deleteSessionContext
+			*  Delete a SessionContext data block
+			******************************************/
+			void deleteSessionContext(SessionContext* SessionContextp );
+			
+			/******************************************
+			* getBearerContext
+			*  Get BearerContext data block
+			******************************************/
+			BearerContext* getBearerContext();
+			
+			/******************************************
+			* deleteBearerContext
+			*  Delete a BearerContext data block
+			******************************************/
+			void deleteBearerContext(BearerContext* BearerContextp );
+			
+			/******************************************
+			* getMmeProcedureCtxt
+			*  Get MmeProcedureCtxt data block
+			******************************************/
+			MmeProcedureCtxt* getMmeProcedureCtxt();
+			
+			/******************************************
+			* deleteMmeProcedureCtxt
+			*  Delete a MmeProcedureCtxt data block
+			******************************************/
+			void deleteMmeProcedureCtxt(MmeProcedureCtxt* MmeProcedureCtxtp );
+			
+			/******************************************
+			* getMmeDetachProcedureCtxt
+			*  Get MmeDetachProcedureCtxt data block
+			****************************************/
+			MmeDetachProcedureCtxt* getMmeDetachProcedureCtxt();
+
+			/******************************************
+                        * deleteMmeDetachProcedureCtxt
+                        *  Delete a MmeDetachProcedureCtxt data block
+                        ******************************************/
+                        void deleteMmeDetachProcedureCtxt(MmeDetachProcedureCtxt* MmeDetachProcedureCtxtp );
+			
+			/******************************************
+			* getMmeSvcReqProcedureCtxt
+			*  Get MmeSvcReqProcedureCtxt data block
+			******************************************/
+			MmeSvcReqProcedureCtxt* getMmeSvcReqProcedureCtxt();
+
+                        /******************************************
+                        * deleteMmeSvcReqProcedureCtxt
+                        *  Delete a MmeSvcReqProcedureCtxt data block
+                        ******************************************/
+                        void deleteMmeSvcReqProcedureCtxt(MmeSvcReqProcedureCtxt* MmeSvcReqProcedureCtxtp );
+						
+			/******************************************
+			* getMmeTauProcedureCtxt
+			*  Get MmeTauProcedureCtxt data block
+			******************************************/
+			MmeTauProcedureCtxt* getMmeTauProcedureCtxt();
+			
+			/******************************************
+			* deleteMmeTauProcedureCtxt
+			*  Delete a MmeTauProcedureCtxt data block
+			******************************************/
+			void deleteMmeTauProcedureCtxt(MmeTauProcedureCtxt* MmeTauProcedureCtxtp );
+
+			/******************************************
+			* addimsikey
+			* Add a imsi as key and cb index as value to imsi_cb_id_map
+			******************************************/
+			int addimsikey( DigitRegister15 key, int cb_index );
+			
+			/******************************************
+			* deleteimsikey
+			* delete a imsi key from imsi_cb_id_map
+			******************************************/
+			int deleteimsikey( DigitRegister15 key );
+			
+			/******************************************
+			* findCBWithimsi
+			* Find cb with given imsi from imsi_cb_id_map
+			******************************************/
+			int findCBWithimsi( DigitRegister15 key );
+
+			/******************************************
+			* addmTmsikey
+			* Add a mTmsi as key and cb index as value to mTmsi_cb_id_map
+			******************************************/
+			int addmTmsikey( uint32_t mTmsi, int cb_index );
+
+			/******************************************
+			* deletemTmsikey
+			* delete a mTmsi key from mTmsi_cb_id_map
+			******************************************/
+			int deletemTmsikey( uint32_t key );
+			
+			/******************************************
+			* findCBWithmTmsi
+			* Find cb with given mTmsi from mTmsi_cb_id_map
+			******************************************/
+			int findCBWithmTmsi( uint32_t key );
+			
+		private:
+			
+			/****************************************
+			* SubsDataGroupManager
+			*    Private constructor
+			****************************************/
+			SubsDataGroupManager();  
+			
+			/****************************************
+			* UEContext Pool Manager
+			****************************************/
+			UEContextManager* UEContextManagerm_p;
+			
+			/****************************************
+			* MmContext Pool Manager
+			****************************************/
+			MmContextManager* MmContextManagerm_p;
+			
+			/****************************************
+			* SessionContext Pool Manager
+			****************************************/
+			SessionContextManager* SessionContextManagerm_p;
+			
+			/****************************************
+			* BearerContext Pool Manager
+			****************************************/
+			BearerContextManager* BearerContextManagerm_p;
+			
+			/****************************************
+			* MmeProcedureCtxt Pool Manager
+			****************************************/
+			MmeProcedureCtxtManager* MmeProcedureCtxtManagerm_p;
+			
+			/****************************************
+			* MmeDetachProcedureCtxt Pool Manager
+			****************************************/
+			MmeDetachProcedureCtxtManager* MmeDetachProcedureCtxtManagerm_p;
+
+			/****************************************
+			* MmeSvcReqProcedureCtxt Pool Manager
+			****************************************/
+			MmeSvcReqProcedureCtxtManager* MmeSvcReqProcedureCtxtManagerm_p;
+						
+			/****************************************
+			* MmeTauProcedureCtxt Pool Manager
+			****************************************/
+			MmeTauProcedureCtxtManager* MmeTauProcedureCtxtManagerm_p;
+
+			/****************************************
+			* imsi Key Map
+			****************************************/
+			std::map<DigitRegister15, int> imsi_cb_id_map;
+
+			/****************************************
+			 * imsi Key Map Mutex
+			 ****************************************/
+			std::mutex imsi_cb_id_map_mutex;
+
+			/****************************************
+			* mTmsi Key Map
+			****************************************/
+			std::map<uint32_t, int> mTmsi_cb_id_map;
+
+			/****************************************
+			* mTmsi Key Map Mutex
+			****************************************/
+			std::mutex mTmsi_cb_id_map_mutex;
+
+	};
+};
+
+
+
+#endif
diff --git a/include/mme-app/contextManager/uEContextManager.h b/include/mme-app/contextManager/uEContextManager.h
new file mode 100644
index 0000000..1daa305
--- /dev/null
+++ b/include/mme-app/contextManager/uEContextManager.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2019, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UEContextManager__
+#define __UEContextManager__
+/******************************************************
+* uEContextManager.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/ctxtManagerTmpls/blockPoolManager.h.tt>
+ ***************************************/
+#include "memPoolManager.h"
+
+namespace mme
+{
+	class UEContext;
+
+	class UEContextManager
+	{
+	public:
+		/****************************************
+		* UEContextManager
+		*  constructor
+		****************************************/
+		UEContextManager(int numOfBlocks);
+		
+		/****************************************
+		* UEContextManager
+		*    Destructor
+		****************************************/
+		~UEContextManager();
+		
+		/******************************************
+		 * getUEContext
+		 *  get UEContext data block
+		 ******************************************/
+		UEContext* allocateUEContext();
+		
+		/******************************************
+		 * deleteUEContext
+		 *  deallocate a UEContext data block
+		 ******************************************/
+		void deallocateUEContext(UEContext* UEContextp );
+	
+	private:
+		cmn::memPool::MemPoolManager<UEContext> poolManager_m;
+	};
+};
+
+#endif
+		
+		
diff --git a/include/mme-app/hash.h b/include/mme-app/hash.h
new file mode 100644
index 0000000..739f707
--- /dev/null
+++ b/include/mme-app/hash.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __IMSI_LOOKUP_H_
+#define __IMSI_LOOKUP_H_
+
+int
+init_hash();
+
+#endif /*__IMSI_LOOKUP_H_*/
diff --git a/include/mme-app/interfaces/mmeIpcInterface.h b/include/mme-app/interfaces/mmeIpcInterface.h
new file mode 100644
index 0000000..58d85c6
--- /dev/null
+++ b/include/mme-app/interfaces/mmeIpcInterface.h
@@ -0,0 +1,42 @@
+/*
+ * mmeIpcInterface.h
+ *
+ *  Created on: Aug 29, 2019
+ *      Author: Anjana_Sreekumar
+ */
+
+#ifndef INCLUDE_MME_APP_INTERFACES_MMEIPCINTERFACE_H_
+#define INCLUDE_MME_APP_INTERFACES_MMEIPCINTERFACE_H_
+
+#include <ipcChannel.h>
+
+namespace cmn{
+namespace utils{
+	class MsgBuffer;
+}
+}
+
+class MmeIpcInterface {
+
+public:
+	MmeIpcInterface();
+	virtual ~MmeIpcInterface();
+
+	bool setup();
+	void teardown();
+
+	cmn::ipc::IpcChannel* sender();
+	cmn::ipc::IpcChannel* reader();
+
+	void handleIpcMsg(cmn::utils::MsgBuffer* buf);
+
+	bool dispatchIpcMsg(char* buf, uint32_t len, cmn::ipc::IpcAddress& destAddr);
+
+	bool dispatchIpcMsg(cmn::utils::MsgBuffer* msgBuf_p, cmn::ipc::IpcAddress& destAddr);
+
+private:
+	cmn::ipc::IpcChannel* sender_mp;
+	cmn::ipc::IpcChannel* reader_mp;
+};
+
+#endif /* INCLUDE_MME_APP_INTERFACES_MMEIPCINTERFACE_H_ */
diff --git a/include/mme-app/mmeStates/attachStart.h b/include/mme-app/mmeStates/attachStart.h
new file mode 100644
index 0000000..56df80b
--- /dev/null
+++ b/include/mme-app/mmeStates/attachStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachStart__
+#define __AttachStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachStart* Instance();
+
+			/****************************************
+			* AttachStart
+			*    Destructor
+			****************************************/
+			~AttachStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachStart
+			*    Private constructor
+			****************************************/
+			AttachStart();  
+	};
+};
+#endif // __AttachStart__
diff --git a/include/mme-app/mmeStates/attachWfAia.h b/include/mme-app/mmeStates/attachWfAia.h
new file mode 100644
index 0000000..b54c808
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfAia.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfAia.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfAia__
+#define __AttachWfAia__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfAia : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfAia* Instance();
+
+			/****************************************
+			* AttachWfAia
+			*    Destructor
+			****************************************/
+			~AttachWfAia();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfAia
+			*    Private constructor
+			****************************************/
+			AttachWfAia();  
+	};
+};
+#endif // __AttachWfAia__
diff --git a/include/mme-app/mmeStates/attachWfAttCmp.h b/include/mme-app/mmeStates/attachWfAttCmp.h
new file mode 100644
index 0000000..5913047
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfAttCmp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfAttCmp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfAttCmp__
+#define __AttachWfAttCmp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfAttCmp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfAttCmp* Instance();
+
+			/****************************************
+			* AttachWfAttCmp
+			*    Destructor
+			****************************************/
+			~AttachWfAttCmp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfAttCmp
+			*    Private constructor
+			****************************************/
+			AttachWfAttCmp();  
+	};
+};
+#endif // __AttachWfAttCmp__
diff --git a/include/mme-app/mmeStates/attachWfAuthResp.h b/include/mme-app/mmeStates/attachWfAuthResp.h
new file mode 100644
index 0000000..af8c4ba
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfAuthResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfAuthResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfAuthResp__
+#define __AttachWfAuthResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfAuthResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfAuthResp* Instance();
+
+			/****************************************
+			* AttachWfAuthResp
+			*    Destructor
+			****************************************/
+			~AttachWfAuthResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfAuthResp
+			*    Private constructor
+			****************************************/
+			AttachWfAuthResp();  
+	};
+};
+#endif // __AttachWfAuthResp__
diff --git a/include/mme-app/mmeStates/attachWfAuthRespValidate.h b/include/mme-app/mmeStates/attachWfAuthRespValidate.h
new file mode 100644
index 0000000..46cfe57
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfAuthRespValidate.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfAuthRespValidate.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfAuthRespValidate__
+#define __AttachWfAuthRespValidate__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfAuthRespValidate : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfAuthRespValidate* Instance();
+
+			/****************************************
+			* AttachWfAuthRespValidate
+			*    Destructor
+			****************************************/
+			~AttachWfAuthRespValidate();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfAuthRespValidate
+			*    Private constructor
+			****************************************/
+			AttachWfAuthRespValidate();  
+	};
+};
+#endif // __AttachWfAuthRespValidate__
diff --git a/include/mme-app/mmeStates/attachWfCsResp.h b/include/mme-app/mmeStates/attachWfCsResp.h
new file mode 100644
index 0000000..a9ebb84
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfCsResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfCsResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfCsResp__
+#define __AttachWfCsResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfCsResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfCsResp* Instance();
+
+			/****************************************
+			* AttachWfCsResp
+			*    Destructor
+			****************************************/
+			~AttachWfCsResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfCsResp
+			*    Private constructor
+			****************************************/
+			AttachWfCsResp();  
+	};
+};
+#endif // __AttachWfCsResp__
diff --git a/include/mme-app/mmeStates/attachWfEsmInfoCheck.h b/include/mme-app/mmeStates/attachWfEsmInfoCheck.h
new file mode 100644
index 0000000..13c0d24
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfEsmInfoCheck.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfEsmInfoCheck.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfEsmInfoCheck__
+#define __AttachWfEsmInfoCheck__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfEsmInfoCheck : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfEsmInfoCheck* Instance();
+
+			/****************************************
+			* AttachWfEsmInfoCheck
+			*    Destructor
+			****************************************/
+			~AttachWfEsmInfoCheck();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfEsmInfoCheck
+			*    Private constructor
+			****************************************/
+			AttachWfEsmInfoCheck();  
+	};
+};
+#endif // __AttachWfEsmInfoCheck__
diff --git a/include/mme-app/mmeStates/attachWfEsmInfoResp.h b/include/mme-app/mmeStates/attachWfEsmInfoResp.h
new file mode 100644
index 0000000..b710b26
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfEsmInfoResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfEsmInfoResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfEsmInfoResp__
+#define __AttachWfEsmInfoResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfEsmInfoResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfEsmInfoResp* Instance();
+
+			/****************************************
+			* AttachWfEsmInfoResp
+			*    Destructor
+			****************************************/
+			~AttachWfEsmInfoResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfEsmInfoResp
+			*    Private constructor
+			****************************************/
+			AttachWfEsmInfoResp();  
+	};
+};
+#endif // __AttachWfEsmInfoResp__
diff --git a/include/mme-app/mmeStates/attachWfIdentityResponse.h b/include/mme-app/mmeStates/attachWfIdentityResponse.h
new file mode 100644
index 0000000..52ce29c
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfIdentityResponse.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfIdentityResponse.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfIdentityResponse__
+#define __AttachWfIdentityResponse__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfIdentityResponse : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfIdentityResponse* Instance();
+
+			/****************************************
+			* AttachWfIdentityResponse
+			*    Destructor
+			****************************************/
+			~AttachWfIdentityResponse();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfIdentityResponse
+			*    Private constructor
+			****************************************/
+			AttachWfIdentityResponse();  
+	};
+};
+#endif // __AttachWfIdentityResponse__
diff --git a/include/mme-app/mmeStates/attachWfImsiValidateAction.h b/include/mme-app/mmeStates/attachWfImsiValidateAction.h
new file mode 100644
index 0000000..aeede2b
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfImsiValidateAction.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfImsiValidateAction.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfImsiValidateAction__
+#define __AttachWfImsiValidateAction__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfImsiValidateAction : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfImsiValidateAction* Instance();
+
+			/****************************************
+			* AttachWfImsiValidateAction
+			*    Destructor
+			****************************************/
+			~AttachWfImsiValidateAction();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfImsiValidateAction
+			*    Private constructor
+			****************************************/
+			AttachWfImsiValidateAction();  
+	};
+};
+#endif // __AttachWfImsiValidateAction__
diff --git a/include/mme-app/mmeStates/attachWfInitCtxtResp.h b/include/mme-app/mmeStates/attachWfInitCtxtResp.h
new file mode 100644
index 0000000..e6a37bc
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfInitCtxtResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfInitCtxtResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfInitCtxtResp__
+#define __AttachWfInitCtxtResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfInitCtxtResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfInitCtxtResp* Instance();
+
+			/****************************************
+			* AttachWfInitCtxtResp
+			*    Destructor
+			****************************************/
+			~AttachWfInitCtxtResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfInitCtxtResp
+			*    Private constructor
+			****************************************/
+			AttachWfInitCtxtResp();  
+	};
+};
+#endif // __AttachWfInitCtxtResp__
diff --git a/include/mme-app/mmeStates/attachWfInitCtxtRespAttCmp.h b/include/mme-app/mmeStates/attachWfInitCtxtRespAttCmp.h
new file mode 100644
index 0000000..0484d76
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfInitCtxtRespAttCmp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfInitCtxtRespAttCmp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfInitCtxtRespAttCmp__
+#define __AttachWfInitCtxtRespAttCmp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfInitCtxtRespAttCmp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfInitCtxtRespAttCmp* Instance();
+
+			/****************************************
+			* AttachWfInitCtxtRespAttCmp
+			*    Destructor
+			****************************************/
+			~AttachWfInitCtxtRespAttCmp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfInitCtxtRespAttCmp
+			*    Private constructor
+			****************************************/
+			AttachWfInitCtxtRespAttCmp();  
+	};
+};
+#endif // __AttachWfInitCtxtRespAttCmp__
diff --git a/include/mme-app/mmeStates/attachWfMbResp.h b/include/mme-app/mmeStates/attachWfMbResp.h
new file mode 100644
index 0000000..4ceb47d
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfMbResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfMbResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfMbResp__
+#define __AttachWfMbResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfMbResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfMbResp* Instance();
+
+			/****************************************
+			* AttachWfMbResp
+			*    Destructor
+			****************************************/
+			~AttachWfMbResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfMbResp
+			*    Private constructor
+			****************************************/
+			AttachWfMbResp();  
+	};
+};
+#endif // __AttachWfMbResp__
diff --git a/include/mme-app/mmeStates/attachWfSecCmp.h b/include/mme-app/mmeStates/attachWfSecCmp.h
new file mode 100644
index 0000000..e5efe91
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfSecCmp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfSecCmp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfSecCmp__
+#define __AttachWfSecCmp__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfSecCmp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfSecCmp* Instance();
+
+			/****************************************
+			* AttachWfSecCmp
+			*    Destructor
+			****************************************/
+			~AttachWfSecCmp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfSecCmp
+			*    Private constructor
+			****************************************/
+			AttachWfSecCmp();  
+	};
+};
+#endif // __AttachWfSecCmp__
diff --git a/include/mme-app/mmeStates/attachWfUla.h b/include/mme-app/mmeStates/attachWfUla.h
new file mode 100644
index 0000000..3c046a2
--- /dev/null
+++ b/include/mme-app/mmeStates/attachWfUla.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * attachWfUla.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __AttachWfUla__
+#define __AttachWfUla__
+
+#include "state.h"
+
+namespace mme {
+
+	class AttachWfUla : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static AttachWfUla* Instance();
+
+			/****************************************
+			* AttachWfUla
+			*    Destructor
+			****************************************/
+			~AttachWfUla();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* AttachWfUla
+			*    Private constructor
+			****************************************/
+			AttachWfUla();  
+	};
+};
+#endif // __AttachWfUla__
diff --git a/include/mme-app/mmeStates/defaultMmeState.h b/include/mme-app/mmeStates/defaultMmeState.h
new file mode 100644
index 0000000..e223b75
--- /dev/null
+++ b/include/mme-app/mmeStates/defaultMmeState.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * defaultMmeState.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __DefaultMmeState__
+#define __DefaultMmeState__
+
+#include "state.h"
+
+namespace mme {
+
+	class DefaultMmeState : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static DefaultMmeState* Instance();
+
+			/****************************************
+			* DefaultMmeState
+			*    Destructor
+			****************************************/
+			~DefaultMmeState();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* DefaultMmeState
+			*    Private constructor
+			****************************************/
+			DefaultMmeState();  
+	};
+};
+#endif // __DefaultMmeState__
diff --git a/include/mme-app/mmeStates/detachStart.h b/include/mme-app/mmeStates/detachStart.h
new file mode 100644
index 0000000..d40bcfd
--- /dev/null
+++ b/include/mme-app/mmeStates/detachStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * detachStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __DetachStart__
+#define __DetachStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class DetachStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static DetachStart* Instance();
+
+			/****************************************
+			* DetachStart
+			*    Destructor
+			****************************************/
+			~DetachStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* DetachStart
+			*    Private constructor
+			****************************************/
+			DetachStart();  
+	};
+};
+#endif // __DetachStart__
diff --git a/include/mme-app/mmeStates/detachWfDelSessionResp.h b/include/mme-app/mmeStates/detachWfDelSessionResp.h
new file mode 100644
index 0000000..6b9a9a7
--- /dev/null
+++ b/include/mme-app/mmeStates/detachWfDelSessionResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * detachWfDelSessionResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __DetachWfDelSessionResp__
+#define __DetachWfDelSessionResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class DetachWfDelSessionResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static DetachWfDelSessionResp* Instance();
+
+			/****************************************
+			* DetachWfDelSessionResp
+			*    Destructor
+			****************************************/
+			~DetachWfDelSessionResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* DetachWfDelSessionResp
+			*    Private constructor
+			****************************************/
+			DetachWfDelSessionResp();  
+	};
+};
+#endif // __DetachWfDelSessionResp__
diff --git a/include/mme-app/mmeStates/niDetachStart.h b/include/mme-app/mmeStates/niDetachStart.h
new file mode 100644
index 0000000..a45260f
--- /dev/null
+++ b/include/mme-app/mmeStates/niDetachStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * niDetachStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __NiDetachStart__
+#define __NiDetachStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class NiDetachStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static NiDetachStart* Instance();
+
+			/****************************************
+			* NiDetachStart
+			*    Destructor
+			****************************************/
+			~NiDetachStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* NiDetachStart
+			*    Private constructor
+			****************************************/
+			NiDetachStart();  
+	};
+};
+#endif // __NiDetachStart__
diff --git a/include/mme-app/mmeStates/niDetachWfDelSessResp.h b/include/mme-app/mmeStates/niDetachWfDelSessResp.h
new file mode 100644
index 0000000..9f334ce
--- /dev/null
+++ b/include/mme-app/mmeStates/niDetachWfDelSessResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * niDetachWfDelSessResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __NiDetachWfDelSessResp__
+#define __NiDetachWfDelSessResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class NiDetachWfDelSessResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static NiDetachWfDelSessResp* Instance();
+
+			/****************************************
+			* NiDetachWfDelSessResp
+			*    Destructor
+			****************************************/
+			~NiDetachWfDelSessResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* NiDetachWfDelSessResp
+			*    Private constructor
+			****************************************/
+			NiDetachWfDelSessResp();  
+	};
+};
+#endif // __NiDetachWfDelSessResp__
diff --git a/include/mme-app/mmeStates/niDetachWfDetAccptDelSessResp.h b/include/mme-app/mmeStates/niDetachWfDetAccptDelSessResp.h
new file mode 100644
index 0000000..c3f3f3d
--- /dev/null
+++ b/include/mme-app/mmeStates/niDetachWfDetAccptDelSessResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * niDetachWfDetAccptDelSessResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __NiDetachWfDetAccptDelSessResp__
+#define __NiDetachWfDetAccptDelSessResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class NiDetachWfDetAccptDelSessResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static NiDetachWfDetAccptDelSessResp* Instance();
+
+			/****************************************
+			* NiDetachWfDetAccptDelSessResp
+			*    Destructor
+			****************************************/
+			~NiDetachWfDetAccptDelSessResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* NiDetachWfDetAccptDelSessResp
+			*    Private constructor
+			****************************************/
+			NiDetachWfDetAccptDelSessResp();  
+	};
+};
+#endif // __NiDetachWfDetAccptDelSessResp__
diff --git a/include/mme-app/mmeStates/niDetachWfDetachAccept.h b/include/mme-app/mmeStates/niDetachWfDetachAccept.h
new file mode 100644
index 0000000..47ccdc9
--- /dev/null
+++ b/include/mme-app/mmeStates/niDetachWfDetachAccept.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * niDetachWfDetachAccept.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __NiDetachWfDetachAccept__
+#define __NiDetachWfDetachAccept__
+
+#include "state.h"
+
+namespace mme {
+
+	class NiDetachWfDetachAccept : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static NiDetachWfDetachAccept* Instance();
+
+			/****************************************
+			* NiDetachWfDetachAccept
+			*    Destructor
+			****************************************/
+			~NiDetachWfDetachAccept();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* NiDetachWfDetachAccept
+			*    Private constructor
+			****************************************/
+			NiDetachWfDetachAccept();  
+	};
+};
+#endif // __NiDetachWfDetachAccept__
diff --git a/include/mme-app/mmeStates/niDetachWfS1RelComp.h b/include/mme-app/mmeStates/niDetachWfS1RelComp.h
new file mode 100644
index 0000000..57af7a1
--- /dev/null
+++ b/include/mme-app/mmeStates/niDetachWfS1RelComp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * niDetachWfS1RelComp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __NiDetachWfS1RelComp__
+#define __NiDetachWfS1RelComp__
+
+#include "state.h"
+
+namespace mme {
+
+	class NiDetachWfS1RelComp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static NiDetachWfS1RelComp* Instance();
+
+			/****************************************
+			* NiDetachWfS1RelComp
+			*    Destructor
+			****************************************/
+			~NiDetachWfS1RelComp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* NiDetachWfS1RelComp
+			*    Private constructor
+			****************************************/
+			NiDetachWfS1RelComp();  
+	};
+};
+#endif // __NiDetachWfS1RelComp__
diff --git a/include/mme-app/mmeStates/pagingStart.h b/include/mme-app/mmeStates/pagingStart.h
new file mode 100644
index 0000000..d42f481
--- /dev/null
+++ b/include/mme-app/mmeStates/pagingStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * pagingStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __PagingStart__
+#define __PagingStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class PagingStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static PagingStart* Instance();
+
+			/****************************************
+			* PagingStart
+			*    Destructor
+			****************************************/
+			~PagingStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* PagingStart
+			*    Private constructor
+			****************************************/
+			PagingStart();  
+	};
+};
+#endif // __PagingStart__
diff --git a/include/mme-app/mmeStates/pagingWfServiceReq.h b/include/mme-app/mmeStates/pagingWfServiceReq.h
new file mode 100644
index 0000000..5c81557
--- /dev/null
+++ b/include/mme-app/mmeStates/pagingWfServiceReq.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * pagingWfServiceReq.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __PagingWfServiceReq__
+#define __PagingWfServiceReq__
+
+#include "state.h"
+
+namespace mme {
+
+	class PagingWfServiceReq : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static PagingWfServiceReq* Instance();
+
+			/****************************************
+			* PagingWfServiceReq
+			*    Destructor
+			****************************************/
+			~PagingWfServiceReq();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* PagingWfServiceReq
+			*    Private constructor
+			****************************************/
+			PagingWfServiceReq();  
+	};
+};
+#endif // __PagingWfServiceReq__
diff --git a/include/mme-app/mmeStates/s1ReleaseStart.h b/include/mme-app/mmeStates/s1ReleaseStart.h
new file mode 100644
index 0000000..7540446
--- /dev/null
+++ b/include/mme-app/mmeStates/s1ReleaseStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * s1ReleaseStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __S1ReleaseStart__
+#define __S1ReleaseStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class S1ReleaseStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static S1ReleaseStart* Instance();
+
+			/****************************************
+			* S1ReleaseStart
+			*    Destructor
+			****************************************/
+			~S1ReleaseStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* S1ReleaseStart
+			*    Private constructor
+			****************************************/
+			S1ReleaseStart();  
+	};
+};
+#endif // __S1ReleaseStart__
diff --git a/include/mme-app/mmeStates/s1ReleaseWfReleaseAccessBearerResp.h b/include/mme-app/mmeStates/s1ReleaseWfReleaseAccessBearerResp.h
new file mode 100644
index 0000000..6c6eef7
--- /dev/null
+++ b/include/mme-app/mmeStates/s1ReleaseWfReleaseAccessBearerResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * s1ReleaseWfReleaseAccessBearerResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __S1ReleaseWfReleaseAccessBearerResp__
+#define __S1ReleaseWfReleaseAccessBearerResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class S1ReleaseWfReleaseAccessBearerResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static S1ReleaseWfReleaseAccessBearerResp* Instance();
+
+			/****************************************
+			* S1ReleaseWfReleaseAccessBearerResp
+			*    Destructor
+			****************************************/
+			~S1ReleaseWfReleaseAccessBearerResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* S1ReleaseWfReleaseAccessBearerResp
+			*    Private constructor
+			****************************************/
+			S1ReleaseWfReleaseAccessBearerResp();  
+	};
+};
+#endif // __S1ReleaseWfReleaseAccessBearerResp__
diff --git a/include/mme-app/mmeStates/s1ReleaseWfUeCtxtReleaseComp.h b/include/mme-app/mmeStates/s1ReleaseWfUeCtxtReleaseComp.h
new file mode 100644
index 0000000..25b39c6
--- /dev/null
+++ b/include/mme-app/mmeStates/s1ReleaseWfUeCtxtReleaseComp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * s1ReleaseWfUeCtxtReleaseComp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __S1ReleaseWfUeCtxtReleaseComp__
+#define __S1ReleaseWfUeCtxtReleaseComp__
+
+#include "state.h"
+
+namespace mme {
+
+	class S1ReleaseWfUeCtxtReleaseComp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static S1ReleaseWfUeCtxtReleaseComp* Instance();
+
+			/****************************************
+			* S1ReleaseWfUeCtxtReleaseComp
+			*    Destructor
+			****************************************/
+			~S1ReleaseWfUeCtxtReleaseComp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* S1ReleaseWfUeCtxtReleaseComp
+			*    Private constructor
+			****************************************/
+			S1ReleaseWfUeCtxtReleaseComp();  
+	};
+};
+#endif // __S1ReleaseWfUeCtxtReleaseComp__
diff --git a/include/mme-app/mmeStates/serviceRequestStart.h b/include/mme-app/mmeStates/serviceRequestStart.h
new file mode 100644
index 0000000..24ca62a
--- /dev/null
+++ b/include/mme-app/mmeStates/serviceRequestStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * serviceRequestStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __ServiceRequestStart__
+#define __ServiceRequestStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class ServiceRequestStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static ServiceRequestStart* Instance();
+
+			/****************************************
+			* ServiceRequestStart
+			*    Destructor
+			****************************************/
+			~ServiceRequestStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* ServiceRequestStart
+			*    Private constructor
+			****************************************/
+			ServiceRequestStart();  
+	};
+};
+#endif // __ServiceRequestStart__
diff --git a/include/mme-app/mmeStates/serviceRequestWfAuthAndSecCheckCmp.h b/include/mme-app/mmeStates/serviceRequestWfAuthAndSecCheckCmp.h
new file mode 100644
index 0000000..ba37289
--- /dev/null
+++ b/include/mme-app/mmeStates/serviceRequestWfAuthAndSecCheckCmp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * serviceRequestWfAuthAndSecCheckCmp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __ServiceRequestWfAuthAndSecCheckCmp__
+#define __ServiceRequestWfAuthAndSecCheckCmp__
+
+#include "state.h"
+
+namespace mme {
+
+	class ServiceRequestWfAuthAndSecCheckCmp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static ServiceRequestWfAuthAndSecCheckCmp* Instance();
+
+			/****************************************
+			* ServiceRequestWfAuthAndSecCheckCmp
+			*    Destructor
+			****************************************/
+			~ServiceRequestWfAuthAndSecCheckCmp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* ServiceRequestWfAuthAndSecCheckCmp
+			*    Private constructor
+			****************************************/
+			ServiceRequestWfAuthAndSecCheckCmp();  
+	};
+};
+#endif // __ServiceRequestWfAuthAndSecCheckCmp__
diff --git a/include/mme-app/mmeStates/serviceRequestWfInitCtxtResp.h b/include/mme-app/mmeStates/serviceRequestWfInitCtxtResp.h
new file mode 100644
index 0000000..0276c08
--- /dev/null
+++ b/include/mme-app/mmeStates/serviceRequestWfInitCtxtResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * serviceRequestWfInitCtxtResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __ServiceRequestWfInitCtxtResp__
+#define __ServiceRequestWfInitCtxtResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class ServiceRequestWfInitCtxtResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static ServiceRequestWfInitCtxtResp* Instance();
+
+			/****************************************
+			* ServiceRequestWfInitCtxtResp
+			*    Destructor
+			****************************************/
+			~ServiceRequestWfInitCtxtResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* ServiceRequestWfInitCtxtResp
+			*    Private constructor
+			****************************************/
+			ServiceRequestWfInitCtxtResp();  
+	};
+};
+#endif // __ServiceRequestWfInitCtxtResp__
diff --git a/include/mme-app/mmeStates/serviceRequestWfMbResp.h b/include/mme-app/mmeStates/serviceRequestWfMbResp.h
new file mode 100644
index 0000000..b7b103c
--- /dev/null
+++ b/include/mme-app/mmeStates/serviceRequestWfMbResp.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * serviceRequestWfMbResp.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __ServiceRequestWfMbResp__
+#define __ServiceRequestWfMbResp__
+
+#include "state.h"
+
+namespace mme {
+
+	class ServiceRequestWfMbResp : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static ServiceRequestWfMbResp* Instance();
+
+			/****************************************
+			* ServiceRequestWfMbResp
+			*    Destructor
+			****************************************/
+			~ServiceRequestWfMbResp();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* ServiceRequestWfMbResp
+			*    Private constructor
+			****************************************/
+			ServiceRequestWfMbResp();  
+	};
+};
+#endif // __ServiceRequestWfMbResp__
diff --git a/include/mme-app/mmeStates/stateFactory.h b/include/mme-app/mmeStates/stateFactory.h
new file mode 100644
index 0000000..5367e85
--- /dev/null
+++ b/include/mme-app/mmeStates/stateFactory.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+/**************************************
+ * 
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/stateFactory.h.tt>
+ **************************************/
+
+#ifndef __StateFactory__
+#define __StateFactory__
+
+namespace mme {
+	class StateFactory {
+            public:
+			/******************************************
+			* Instance
+			*   Creates static instance for the state
+			*******************************************/
+            static StateFactory* Instance();
+
+			/*****************************************
+			* StateFactory
+			*   Destructor
+			*****************************************/
+			~StateFactory();
+
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+             void initialize();
+
+            private:
+			/****************************************
+			* StateFactory
+			*	Private constructor
+			****************************************/
+            StateFactory();
+
+	};
+};
+#endif // __StateFactory__
diff --git a/include/mme-app/mmeStates/tauStart.h b/include/mme-app/mmeStates/tauStart.h
new file mode 100644
index 0000000..d42c203
--- /dev/null
+++ b/include/mme-app/mmeStates/tauStart.h
@@ -0,0 +1,61 @@
+ /*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ /******************************************************
+ * tauStart.h
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/state.h.tt>
+ ******************************************************/
+ 
+#ifndef __TauStart__
+#define __TauStart__
+
+#include "state.h"
+
+namespace mme {
+
+	class TauStart : public SM::State
+	{
+		public:
+			/******************************************
+			* Instance 
+			*    Creates static instance for the state
+			*******************************************/
+			static TauStart* Instance();
+
+			/****************************************
+			* TauStart
+			*    Destructor
+			****************************************/
+			~TauStart();			
+			
+			/******************************************
+			* initialize
+			*  Initializes action handlers for the state
+			* and next state
+			******************************************/
+			void initialize();
+	
+		private:
+			/****************************************
+			* TauStart
+			*    Private constructor
+			****************************************/
+			TauStart();  
+	};
+};
+#endif // __TauStart__
diff --git a/include/mme-app/mme_app.h b/include/mme-app/mme_app.h
new file mode 100644
index 0000000..3f792fd
--- /dev/null
+++ b/include/mme-app/mme_app.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MME_APP_H_
+#define __MME_APP_H_
+
+#include <stdbool.h>
+#include <map>
+#include <array>
+
+#include "s1ap_structs.h"
+
+/**
+ * MME main application configuration parameters structures.
+ * All fields in this will be filled in from input json file.
+ */
+typedef struct mme_config
+{
+	unsigned int mme_ip_addr;
+	unsigned short mme_sctp_port;
+	unsigned int s11_sgw_ip;
+	unsigned int s11_pgw_ip;
+	unsigned int enb_ip;
+	unsigned short enb_port;
+	unsigned short mme_egtp_def_port;
+	char  *mme_egtp_def_hostname;
+	char  *mme_name;
+
+	char  mcc_dig1;
+	char  mcc_dig2;
+	char  mcc_dig3;
+	char  mnc_dig1;
+	char  mnc_dig2;
+	char  mnc_dig3;
+	struct PLMN plmn_id;
+
+	unsigned int mme_s1ap_ip;
+	unsigned int mme_egtp_ip;
+	unsigned short mme_group_id;
+	unsigned char mme_code;
+} mme_config;
+
+const size_t fifoQSize_c = 1000;
+
+void stat_init();
+
+
+#endif /*__MME_APP_H_*/
diff --git a/include/mme-app/msgHandlers/gtpMsgHandler.h b/include/mme-app/msgHandlers/gtpMsgHandler.h
new file mode 100644
index 0000000..7f38784
--- /dev/null
+++ b/include/mme-app/msgHandlers/gtpMsgHandler.h
@@ -0,0 +1,31 @@
+/*
+ * gtpMsgHandler.h
+ *
+ *  Created on: Jun 5, 2019
+ *      Author: Anjana_Sreekumar
+ */
+
+#ifndef INCLUDE_MME_APP_MSGHANDLERS_GTPMSGHANDLER_H_
+#define INCLUDE_MME_APP_MSGHANDLERS_GTPMSGHANDLER_H_
+
+#include "msgType.h"
+#include <msgBuffer.h>
+
+class GtpMsgHandler {
+public:
+	static GtpMsgHandler* Instance();
+	~GtpMsgHandler();
+
+	void handleGtpMessage_v(cmn::utils::MsgBuffer* buffer);
+
+private:
+	GtpMsgHandler();
+
+	void handleCreateSessionResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleModifyBearerResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleDeleteSessionResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleReleaseBearerResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleDdnMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+};
+
+#endif /* INCLUDE_MME_APP_MSGHANDLERS_GTPMSGHANDLER_H_ */
diff --git a/include/mme-app/msgHandlers/s1MsgHandler.h b/include/mme-app/msgHandlers/s1MsgHandler.h
new file mode 100644
index 0000000..32ca4d7
--- /dev/null
+++ b/include/mme-app/msgHandlers/s1MsgHandler.h
@@ -0,0 +1,40 @@
+/*
+ * s1MsgHandler.h
+ *
+ *  Created on: Jun 5, 2019
+ *      Author: Anjana_Sreekumar
+ */
+
+#ifndef INCLUDE_MME_APP_MSGHANDLERS_S1MSGHANDLER_H_
+#define INCLUDE_MME_APP_MSGHANDLERS_S1MSGHANDLER_H_
+
+#include "msgType.h"
+#include <msgBuffer.h>
+
+class S1MsgHandler {
+public:
+	static S1MsgHandler* Instance();
+	~S1MsgHandler();
+
+	void handleS1Message_v(const cmn::utils::MsgBuffer* buffer);
+
+private:
+	S1MsgHandler();
+
+	void handleInitUeAttachRequestMsg_v(const cmn::utils::MsgBuffer* msgData_p);
+	void handleIdentityResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleAuthResponseMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleSecurityModeResponse_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleEsmInfoResponse_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleInitCtxtResponse_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleAttachComplete_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleDetachRequest_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleS1ReleaseRequestMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleS1ReleaseComplete_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleNIDetachRequest_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleDetachAcceptFromUE_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleServiceRequest_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleTauRequestMsg_v(const cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+};
+
+#endif /* INCLUDE_MME_APP_MSGHANDLERS_S1MSGHANDLER_H_ */
diff --git a/include/mme-app/msgHandlers/s6MsgHandler.h b/include/mme-app/msgHandlers/s6MsgHandler.h
new file mode 100644
index 0000000..7d9b4fd
--- /dev/null
+++ b/include/mme-app/msgHandlers/s6MsgHandler.h
@@ -0,0 +1,31 @@
+/*
+ * s6MsgHandler.h
+ *
+ *  Created on: Jun 5, 2019
+ *      Author: Anjana_Sreekumar
+ */
+
+#ifndef INCLUDE_MME_APP_MSGHANDLERS_S6MSGHANDLER_H_
+#define INCLUDE_MME_APP_MSGHANDLERS_S6MSGHANDLER_H_
+
+#include "msgType.h"
+#include <msgBuffer.h>
+
+class S6MsgHandler {
+public:
+	static S6MsgHandler* Instance();
+	virtual ~S6MsgHandler();
+
+	void handleS6Message_v(cmn::utils::MsgBuffer* msgBuf);
+
+private:
+	S6MsgHandler();
+
+	void handleAuthInfoAnswer_v(cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleUpdateLocationAnswer_v(cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handlePurgeAnswer_v(cmn::utils::MsgBuffer* msgData_p, uint32_t ueIdx);
+	void handleCancelLocationRequest_v(cmn::utils::MsgBuffer* msgData_p);
+
+};
+
+#endif /* INCLUDE_MME_APP_MSGHANDLERS_S6MSGHANDLER_H_ */
diff --git a/include/mme-app/procedureStats.h b/include/mme-app/procedureStats.h
new file mode 100644
index 0000000..e9501fe
--- /dev/null
+++ b/include/mme-app/procedureStats.h
@@ -0,0 +1,54 @@
+#ifndef PROCEDURE_STATS_H
+#define PROCEDURE_STATS_H
+namespace mme
+{
+        class ProcedureStats
+        {
+        public:
+                static int num_of_air_sent;
+                static int num_of_ulr_sent;
+                static int num_of_processed_aia;
+                static int num_of_processed_ula;
+                static int num_of_auth_req_to_ue_sent;
+                static int num_of_processed_auth_response;
+                static int num_of_sec_mode_cmd_to_ue_sent;
+                static int num_of_processed_sec_mode_resp;
+                static int num_of_esm_info_req_to_ue_sent;
+                static int num_of_handled_esm_info_resp;
+                static int num_of_cs_req_to_sgw_sent;
+                static int num_of_processed_cs_resp;
+                static int num_of_init_ctxt_req_to_ue_sent;
+                static int num_of_processed_init_ctxt_resp;
+                static int num_of_mb_req_to_sgw_sent;
+                static int num_of_processed_attach_cmp_from_ue;
+                static int num_of_processed_mb_resp;
+                static int num_of_attach_done;
+                static int num_of_del_session_req_sent;
+                static int num_of_purge_req_sent;
+                static int num_of_processed_del_session_resp;
+                static int num_of_processed_pur_resp;
+                static int num_of_detach_accept_to_ue_sent;
+                static int num_of_processed_detach_accept;
+                static int num_of_ue_ctxt_release;
+                static int num_of_processed_ctxt_rel_resp;
+                static int num_of_subscribers_attached;
+                static int num_of_rel_access_bearer_req_sent;
+                static int num_of_rel_access_bearer_resp_received;
+                static int num_of_s1_rel_req_received;
+                static int num_of_s1_rel_cmd_sent;
+                static int num_of_s1_rel_comp_received;
+                static int num_of_clr_received;
+                static int num_of_cla_sent;
+                static int num_of_detach_req_to_ue_sent;
+                static int num_of_detach_accept_from_ue;
+                static int total_num_of_subscribers;
+                static int num_of_subscribers_detached;
+		static int num_of_ddn_received;
+		static int num_of_service_request_received;
+		static int num_of_ddn_ack_sent;		
+		static int num_of_tau_response_to_ue_sent;
+		
+
+        };
+};
+#endif
diff --git a/include/mme-app/secUtils.h b/include/mme-app/secUtils.h
new file mode 100644
index 0000000..14abb3f
--- /dev/null
+++ b/include/mme-app/secUtils.h
@@ -0,0 +1,12 @@
+class SecUtils
+{
+	public:
+	static void create_integrity_key(unsigned char *kasme, unsigned char *int_key);
+
+	static void create_kenb_key(unsigned char *kasme, unsigned char *kenb_key,
+			unsigned int seq_no);
+
+	static void calculate_hmac_sha256(const unsigned char *input_data,
+			int input_data_len, const unsigned char *key,
+			int key_length, void *output, unsigned int *out_len);
+};
diff --git a/include/mme-app/structs.h b/include/mme-app/structs.h
new file mode 100644
index 0000000..9420b0e
--- /dev/null
+++ b/include/mme-app/structs.h
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef STRUCTS_H_
+#define STRUCTS_H_
+
+#include <iostream>
+#include "msgType.h"
+#include "s1ap_structs.h"
+#include "ue_table.h"
+#include "s11_structs.h"
+#include <utils/mmeProcedureTypes.h>
+
+
+class Tai
+{
+	public:
+		Tai();
+		Tai( const TAI& tai_i );
+		~Tai();
+		void operator = ( const Tai& tai_i );
+	public:
+		TAI tai_m;
+};
+
+class Cgi
+{
+	public:
+		Cgi();
+		Cgi( const CGI& cgi_i );
+		~Cgi();
+		void operator = ( const Cgi& cgi_i );
+	public:
+		CGI cgi_m;
+};
+
+class Stmsi
+{
+        public:
+                Stmsi();
+                Stmsi( const STMSI& stmsi_i );
+                ~Stmsi();
+                void operator = ( const Stmsi& stmsi_i );
+        public:
+                STMSI stmsi_m;
+};
+
+
+class Arp
+{
+        public:
+                Arp();
+                Arp( const ARP& arp_i );
+                ~Arp();
+                void operator = ( const Arp& arp_i );
+        public:
+                ARP arp_m;
+};
+
+class Ms_net_capab
+{
+	public:
+		Ms_net_capab();
+		Ms_net_capab( const MS_net_capab& ms_net_capb_i );
+		~Ms_net_capab();
+		void operator = ( const Ms_net_capab& ms_net_capb_i );
+	public:
+		MS_net_capab ms_net_capab_m;
+};
+
+class Ue_net_capab
+{
+	public:
+		Ue_net_capab();
+		Ue_net_capab( const UE_net_capab& ue_net_capab_i );
+		~Ue_net_capab();
+		void operator = ( const Ue_net_capab& ue_net_capab_i );
+	public:
+		UE_net_capab ue_net_capab_m;
+};
+
+class Secinfo
+{
+	public:
+		Secinfo();
+		Secinfo( const secinfo& secinfo_i );
+		~Secinfo();
+		void operator = ( const Secinfo& secinfo_i );		
+	public:
+		secinfo secinfo_m;
+};
+
+class Ambr
+{
+	public:
+		Ambr();
+		Ambr( const AMBR& ambr_i );
+		~Ambr();
+		void operator = ( const Ambr& ambr_i );
+	public:
+		AMBR ambr_m;
+};
+
+class E_utran_sec_vector
+{
+	public:
+		E_utran_sec_vector();
+		E_utran_sec_vector( const E_UTRAN_sec_vector& secinfo_i );
+		~E_utran_sec_vector();
+		void operator = ( const E_utran_sec_vector& secinfo_i );
+		friend std::ostream& operator << ( std::ostream& os, const E_utran_sec_vector& data_i );
+	public:
+		E_UTRAN_sec_vector* AiaSecInfo_mp;
+};
+	
+class Fteid
+{
+	public:
+		Fteid();
+		Fteid( const fteid& fteid_i );
+		~Fteid();
+		void operator = ( const Fteid& fteid_i );
+	public:
+		fteid fteid_m;
+};
+
+class Paa
+{
+	public:
+		Paa();
+		Paa( const PAA& paa_i );
+		~Paa();
+		void operator = ( const Paa& paa_i );
+	public:
+		PAA paa_m;
+};
+
+class Apn_name
+{
+	public:
+		Apn_name();
+		Apn_name( const apn_name& apn_name_i );
+		~Apn_name();
+		void operator = ( const Apn_name& apn_name_i );
+	public:
+		apn_name apnname_m;
+};
+
+class DigitRegister15
+{
+	public:
+		DigitRegister15();
+		void convertToBcdArray(uint8_t* arrayOut) const;
+		void convertFromBcdArray(const uint8_t* bcdArrayIn);
+		void setImsiDigits( uint8_t* digitsArrayIn );
+		void getImsiDigits( uint8_t* digitsArrayIn ) const;	
+		bool isValid() const;
+		void operator = ( const DigitRegister15& data_i );
+		bool operator == ( const DigitRegister15& data_i )const;
+		bool operator < ( const DigitRegister15& data_i )const;
+
+		friend std::ostream& operator << ( std::ostream& os, const DigitRegister15& data_i );
+	
+	private:
+
+		uint8_t digitsArray[15];
+};
+
+#endif
diff --git a/include/mme-app/ue_table.h b/include/mme-app/ue_table.h
new file mode 100644
index 0000000..a038ac0
--- /dev/null
+++ b/include/mme-app/ue_table.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UE_TABLE_H_
+#define __UE_TABLE_H_
+
+#include "s1ap_structs.h"
+#include "s11_structs.h"
+#include "msgType.h"
+
+struct secinfo {
+	uint8_t int_key[NAS_INT_KEY_SIZE];
+	uint8_t kenb_key[KENB_SIZE];
+};
+
+struct AMBR {
+	unsigned int max_requested_bw_dl;
+	unsigned int max_requested_bw_ul;
+};
+
+#endif /*ue_table*/
diff --git a/include/mme-app/utils/defaultMmeProcedureCtxt.h b/include/mme-app/utils/defaultMmeProcedureCtxt.h
new file mode 100644
index 0000000..5fb4204
--- /dev/null
+++ b/include/mme-app/utils/defaultMmeProcedureCtxt.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_MME_APP_UTILS_DEFAULTMMEPROCEDURECTXT_H_
+#define INCLUDE_MME_APP_UTILS_DEFAULTMMEPROCEDURECTXT_H_
+
+#include <contextManager/dataBlocks.h>
+
+namespace mme
+{
+class DefaultMmeProcedureCtxt : public MmeProcedureCtxt
+{
+public:
+    static DefaultMmeProcedureCtxt* Instance();
+
+private:
+    DefaultMmeProcedureCtxt();
+    ~DefaultMmeProcedureCtxt();
+};
+}
+
+
+
+#endif /* INCLUDE_MME_APP_UTILS_DEFAULTMMEPROCEDURECTXT_H_ */
diff --git a/include/mme-app/utils/mmeCauseTypes.h b/include/mme-app/utils/mmeCauseTypes.h
new file mode 100644
index 0000000..6535119
--- /dev/null
+++ b/include/mme-app/utils/mmeCauseTypes.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_MME_APP_UTILS_MMECAUSETYPES_H_
+#define INCLUDE_MME_APP_UTILS_MMECAUSETYPES_H_
+
+#include <stdint.h>
+
+namespace mme
+{
+
+typedef uint32_t MmeErrorCause;
+
+const MmeErrorCause noError_c = 0x00;
+const MmeErrorCause ueContextNotFound_c = 0x01;
+
+}
+
+#endif /* INCLUDE_MME_APP_UTILS_MMECAUSETYPES_H_ */
diff --git a/include/mme-app/utils/mmeCommonUtils.h b/include/mme-app/utils/mmeCommonUtils.h
new file mode 100644
index 0000000..cc40620
--- /dev/null
+++ b/include/mme-app/utils/mmeCommonUtils.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_MME_APP_UTILS_MMECOMMONUTILS_H_
+#define INCLUDE_MME_APP_UTILS_MMECOMMONUTILS_H_
+
+#include <stdint.h>
+#include <utils/mmeProcedureTypes.h>
+#include <msgType.h>
+
+struct guti;
+
+namespace SM
+{
+	class ControlBlock;
+}
+
+namespace cmn
+{
+	namespace utils
+	{
+		class MsgBuffer;
+	}
+}
+
+namespace mme
+{
+	class MmeProcedureCtxt;
+	class UEContext;
+	class MmeCommonUtils
+	{
+	public:
+		static bool isLocalGuti(const guti& guti_r);
+		static uint32_t allocateMtmsi();
+
+		static SM::ControlBlock* findControlBlock(cmn::utils::MsgBuffer* msgData_p);
+
+		static AttachType getAttachType(UEContext* ueCtxt_p, const struct ue_attach_info& attachReqMsg_r);
+
+	private:
+		MmeCommonUtils();
+		~MmeCommonUtils();
+	};
+}
+
+#endif /* INCLUDE_MME_APP_UTILS_MMECOMMONUTILS_H_ */
diff --git a/include/mme-app/utils/mmeContextManagerUtils.h b/include/mme-app/utils/mmeContextManagerUtils.h
new file mode 100644
index 0000000..4f844a5
--- /dev/null
+++ b/include/mme-app/utils/mmeContextManagerUtils.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_MME_APP_UTILS_MMECONTEXTMANAGERUTILS_H_
+#define INCLUDE_MME_APP_UTILS_MMECONTEXTMANAGERUTILS_H_
+
+#include <utils/mmeProcedureTypes.h>
+#include <stdint.h>
+
+namespace SM
+{
+class ControlBlock;
+}
+
+namespace mme
+{
+
+class MmeProcedureCtxt;
+class MmeContextManagerUtils
+{
+public:
+
+    static MmeProcedureCtxt* findProcedureCtxt(SM::ControlBlock& cb_r, ProcedureType procType);
+
+	static bool deleteProcedureCtxt(MmeProcedureCtxt* procedure_p);
+	static bool deallocateProcedureCtxt(SM::ControlBlock& cb_r, ProcedureType procType);
+	static bool deallocateAllProcedureCtxts(SM::ControlBlock& cb_r);
+
+	static void deleteUEContext(uint32_t cbIndex);
+	static void deleteSessionContext(SM::ControlBlock& cb_r);
+
+private:
+	MmeContextManagerUtils();
+	~MmeContextManagerUtils();
+};
+}
+
+
+
+#endif /* INCLUDE_MME_APP_UTILS_MMECONTEXTMANAGERUTILS_H_ */
diff --git a/include/mme-app/utils/mmeProcedureTypes.h b/include/mme-app/utils/mmeProcedureTypes.h
new file mode 100644
index 0000000..2c7c620
--- /dev/null
+++ b/include/mme-app/utils/mmeProcedureTypes.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_MME_APP_UTILS_MMEPROCEDURETYPES_H_
+#define INCLUDE_MME_APP_UTILS_MMEPROCEDURETYPES_H_
+
+namespace mme
+{
+ enum AttachType
+ {
+	 invalidAttachType_c,
+
+	 imsiAttach_c,
+	 knownGutiAttach_c,
+	 unknownGutiAttach_c,
+
+	 maxAttachType_c
+ };
+
+ enum ProcedureType
+ {
+    	invalidProcedureType_c,
+
+    	defaultMmeProcedure_c,
+    	attach_c,
+    	detach_c,
+    	s1Release_c,
+    	serviceRequest_c,
+    	tau_c,
+
+    	maxProcedureType_c
+ };
+
+ enum DetachType
+ {
+    	invalidDetachType_c,
+
+    	mmeInitDetach_c,
+    	hssInitDetach_c,
+    	ueInitDetach_c,
+
+    	maxDetachtype_c
+ };
+
+ enum UE_State_e
+ {
+        InvalidState,
+
+        NoState,
+        EpsAttached,
+        EpsDetached,
+
+        maxUeState
+ };
+ using EmmState = UE_State_e;
+
+ enum PagingTrigger
+ {
+        none_c,
+        hssInit_c,
+        ddnInit_c,
+        maxPagingTrigger_c
+ };
+
+}
+
+#endif /* INCLUDE_MME_APP_UTILS_MMEPROCEDURETYPES_H_ */
diff --git a/include/s11/gtpv2c.h b/include/s11/gtpv2c.h
new file mode 100644
index 0000000..6177146
--- /dev/null
+++ b/include/s11/gtpv2c.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GTPV2C_H_
+#define __GTPV2C_H_
+
+#include <stdint.h>
+
+#include "s11_structs.h"
+
+#define MAX_GTPV2C_UDP_LEN                                   4096
+
+#define GTP_VERSION_GTPV2C                                   2
+
+/* GTP Message Type */
+#define GTP_CREATE_SESSION_REQ                               32
+#define GTP_CREATE_SESSION_RSP                               33
+#define GTP_MODIFY_BEARER_REQ                                34
+#define GTP_MODIFY_BEARER_RSP                                35
+#define GTP_DELETE_SESSION_REQ                               36
+#define GTP_DELETE_SESSION_RSP                               37
+//S1 Release
+#define GTP_RELEASE_BEARER_REQ				     170
+
+enum gtpv2c_interfaces {
+	GTPV2C_IFTYPE_S1U_ENODEB_GTPU = 0,
+};
+
+
+void
+set_gtpv2c_header(struct gtpv2c_header *gtpv2c_tx, uint8_t type,
+		uint32_t teid, uint32_t seq);
+
+#endif /* __GTPV2C_H_ */
diff --git a/include/s11/gtpv2c_ie.h b/include/s11/gtpv2c_ie.h
new file mode 100644
index 0000000..05f409f
--- /dev/null
+++ b/include/s11/gtpv2c_ie.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __GTPV2C_IE_H_
+#define __GTPV2C_IE_H_
+
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <netinet/in.h>
+
+#define IPV4_IE_LENGTH          4
+#define IPV6_IE_LENGTH          16
+
+/* TODO: Check size */
+#define GTPV2C_MAX_LEN          4096
+
+#define AMBR_UPLINK             100000000
+#define AMBR_DOWNLINK           50000000
+
+#define MBR_UPLINK              245018193L//245018193976L
+#define MBR_DOWNLINK            245018193L//245018193976L
+
+enum gtpv2c_ie_type {
+	IE_RESERVED = 0,
+	IE_IMSI = 1,
+	IE_APN = 71,
+	IE_AMBR = 72,
+	IE_EBI = 73,
+	IE_INDICATION = 77,
+	IE_MSISDN = 76,
+	IE_PAA = 79,
+	IE_BEARER_QOS = 80,
+	IE_RAT_TYPE = 82,
+	IE_SERVING_NETWORK = 83,
+	IE_ULI = 86,
+	IE_FTEID = 87,
+	IE_BEARER_CONTEXT = 93,
+	IE_PDN_TYPE = 99,
+	IE_APN_RESTRICTION = 127,
+	IE_SELECTION_MODE = 128,
+};
+
+enum cause_value {
+	GTPV2C_CAUSE_REQUEST_ACCEPTED = 16,
+	GTPV2C_CAUSE_REQUEST_ACCEPTED_PARTIALLY = 17,
+	GTPV2C_CAUSE_NEW_PDN_TYPE_NETWORK_PREFERENCE = 18,
+	GTPV2C_CAUSE_NEW_PDN_TYPE_SINGLE_ADDR_BEARER = 19,
+	GTPV2C_CAUSE_CONTEXT_NOT_FOUND = 64,
+	GTPV2C_CAUSE_INVALID_MESSAGE_FORMAT = 65,
+	GTPV2C_CAUSE_INVALID_LENGTH = 67,
+	GTPV2C_CAUSE_SERVICE_NOT_SUPPORTED = 68,
+	GTPV2C_CAUSE_MANDATORY_IE_INCORRECT = 69,
+	GTPV2C_CAUSE_MANDATORY_IE_MISSING = 70,
+	GTPV2C_CAUSE_SYSTEM_FAILURE = 72,
+	GTPV2C_CAUSE_NO_RESOURCES_AVAILABLE = 73,
+	GTPV2C_CAUSE_MISSING_UNKNOWN_APN = 78,
+	GTPV2C_CAUSE_PREFERRED_PDN_TYPE_UNSUPPORTED = 83,
+	GTPV2C_CAUSE_ALL_DYNAMIC_ADDRESSES_OCCUPIED = 84,
+	GTPV2C_CAUSE_REQUEST_REJECTED = 94,
+	GTPV2C_CAUSE_REMOTE_PEER_NOT_RESPONDING = 100,
+	GTPV2C_CAUSE_CONDITIONAL_IE_MISSING = 103,
+};
+
+#define PDN_IP_TYPE_IPV4                                      1
+#define PDN_IP_TYPE_IPV6                                      2
+#define PDN_IP_TYPE_IPV4V6                                    3
+
+
+enum gtpv2c_ie_instance {
+	INSTANCE_ZERO = 0,
+	INSTANCE_ONE = 1,
+	INSTANCE_TWO = 2,
+};
+
+#pragma pack(1)
+
+
+typedef struct gtpv2c_ie_t {
+	uint8_t type;
+	uint16_t length;
+	uint8_t instance;
+	uint8_t value[GTPV2C_MAX_LEN];
+} gtpv2c_ie;
+
+
+typedef struct fteid_ie_t {
+	uint8_t iface_type :6;
+	uint8_t ipv6 :1;
+	uint8_t ipv4 :1;
+	uint32_t teid;
+	union ip_t {
+		uint32_t ipv4;
+		uint8_t ipv6[INET6_ADDRSTRLEN];
+		struct ipv4v6_t_x {
+			uint32_t ipv4;
+			uint8_t ipv6[INET6_ADDRSTRLEN];
+		} ipv4v6;
+	} ipaddr;
+} fteid_ie;
+
+
+#pragma pack()
+
+#endif /* __GTPV2C_IE_H_ */
diff --git a/include/s11/s11.h b/include/s11/s11.h
new file mode 100644
index 0000000..cdc6536
--- /dev/null
+++ b/include/s11/s11.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */  
+ 
+
+#ifndef __UE_S11_H_
+#define __UE_S11_H_
+
+#include <stdint.h>
+#include "log.h"
+#include "s11_structs.h"
+
+/*No of threads handling S11 GTPv2 messages coming in*/
+#define S11_THREADPOOL_SIZE 5
+
+#define S11_GTPV2C_BUF_LEN	4096
+
+/*GTPv2c message types*/
+#define S11_GTP_CREATE_SESSION_REQ	32
+#define S11_GTP_CREATE_SESSION_RESP	33
+#define S11_GTP_MODIFY_BEARER_RESP	35
+#define S11_GTP_DELETE_SESSION_RESP	37
+#define S11_GTP_RELEASE_BEARER_REQ	170
+#define S11_GTP_RELEASE_BEARER_RESP	171
+#define S11_GTP_DDN			176
+
+/*GTPv2c IE message types*/
+#define S11_IE_CAUSE		2
+#define S11_IE_FTEID_C		87
+#define S11_IE_PAA		79
+#define S11_IE_APN_RESTRICTION	127
+#define S11_IE_BEARER_CTX	93
+#define S11_IE_EPS_BEARER_ID	73
+
+int
+init_s11();
+
+void
+handle_s11_message(void *message);
+
+int
+init_s11();
+
+void
+handle_s11_message(void *message);
+
+int
+s11_transation(char * buf, unsigned int len);
+
+void* create_session_handler(void *);
+void* modify_bearer_handler(void *);
+void* release_bearer_handler(void *); 
+void* delete_session_handler(void *);
+void* ddn_ack_handler(void *);
+/*int s11_CS_resp_handler(char *message);
+int s11_MB_resp_handler(char *message);
+int s11_DS_resp_handler(char *message);
+int s11_RB_resp_handler(char *message);
+int s11_DDN_handler(char *message);
+*/
+
+
+void
+bswap8_array(uint8_t *src, uint8_t *dest, uint32_t len);
+
+int parse_gtpv2c_IEs(char *msg, int len, struct s11_proto_IE *proto_ies);
+
+#endif /*S11_H*/
diff --git a/include/s11/s11_config.h b/include/s11/s11_config.h
new file mode 100644
index 0000000..98de079
--- /dev/null
+++ b/include/s11/s11_config.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S11_CONFIG_H_
+#define __S11_CONFIG_H_
+
+#include <stdbool.h>
+
+typedef struct s11_config
+{
+	unsigned int sgw_ip;
+	unsigned int pgw_ip;
+	unsigned int egtp_def_port;
+	unsigned int local_egtp_ip;
+} s11_config;
+
+void
+init_parser(char *path);
+
+int
+parse_s11_conf();
+
+#endif /*__S11_CONFIG_H*/
diff --git a/include/s1ap/enb.h b/include/s1ap/enb.h
new file mode 100644
index 0000000..4d976f0
--- /dev/null
+++ b/include/s1ap/enb.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __ENB_H_
+#define __ENB_H_
+
+#endif /*__ENB_H_*/
diff --git a/include/s1ap/main.h b/include/s1ap/main.h
new file mode 100644
index 0000000..089121a
--- /dev/null
+++ b/include/s1ap/main.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * main.h
+ *
+ */
+
+#ifndef MAIN_H_
+#define MAIN_H_
+
+#include <time.h>
+#include <stdint.h>
+
+#include "stimer.h"
+
+#define THREADPOOL_SIZE 10
+
+#define SCTP_BUF_SIZE 1024
+
+/*Timer and stat calculations*/
+struct time_stat {
+	stimer_t init_ue;
+	stimer_t esm_in;
+	stimer_t esm_out;
+	stimer_t auth_in;
+	stimer_t auth_to_mme;
+	stimer_t secreq_in;
+	stimer_t secreq_out;
+	stimer_t secresp_in;
+	stimer_t secresp_to_mme;
+	stimer_t esmreq_in;
+	stimer_t esmreq_out;
+	stimer_t espresp_in;
+	stimer_t espresp_to_mme;
+	stimer_t initctx_out;
+	stimer_t initctx_resp;
+	stimer_t att_done;
+};
+
+void
+*authreq_handler(void *);
+
+void
+*attach_reject_handler(void *);
+
+void
+*idreq_handler(void *);
+
+void
+*secreq_handler(void *);
+
+void
+*esmreq_handler(void *);
+
+void
+*icsreq_handler(void *);
+
+void
+*detach_accept_handler(void *);
+
+void
+*s1_release_command_handler(void *);
+
+void
+*paging_handler(void *);
+
+void
+*ics_req_paging_handler(void *);
+
+void 
+*tau_response_handler(void *);
+
+void
+calculate_mac(uint8_t *int_key, uint32_t seq_no, uint8_t direction,
+		uint8_t bearer, uint8_t *data, uint16_t data_len,
+		uint8_t *mac);
+
+typedef long long int stimer_t;
+
+#define STIMER_GET_CURRENT_TP(__now__)                                                 \
+	({                                                                                     \
+	    struct timespec __ts__;                                                             \
+	    __now__ = clock_gettime(CLOCK_REALTIME,&__ts__) ?                                   \
+	          -1 : (((stimer_t)__ts__.tv_sec) * 1000000000) + ((stimer_t)__ts__.tv_nsec);   \
+	    __now__;                                                                            \
+	 })
+
+#define STIMER_GET_ELAPSED_NS(_start_)                                                 \
+	({                                                                                     \
+	    stimer_t __ns__;                                                                    \
+	    STIMER_GET_CURRENT_TP(__ns__);                                                      \
+	    if (__ns__ != -1)                                                                   \
+	       __ns__ -= _start_;                                                               \
+	    __ns__;                                                                             \
+	 })
+
+#endif /* MAIN_H_ */
diff --git a/include/s1ap/options.h b/include/s1ap/options.h
new file mode 100644
index 0000000..50eab87
--- /dev/null
+++ b/include/s1ap/options.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * options.h
+ *
+ */
+
+#ifndef OPTIONS_H_
+#define OPTIONS_H_
+
+#include "s1ap.h"
+
+#define REQ_ARGS 0x0000
+void parse_args(int argc, char **argv);
+void log_buffer_free(char** buffer);
+void convert_imsi_to_bcd_str(uint8_t *src, uint8_t* dest); 
+#endif /* OPTIONS_H_ */
diff --git a/include/s1ap/s1ap.h b/include/s1ap/s1ap.h
new file mode 100644
index 0000000..b955a03
--- /dev/null
+++ b/include/s1ap/s1ap.h
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_H_
+#define __S1AP_H_
+
+#include <stdbool.h>
+
+#include "s1ap_structs.h"
+#include "log.h"
+#include "s1ap_ie.h"
+#include "InitiatingMessage.h"
+#include "SuccessfulOutcome.h"
+#include "UnsuccessfulOutcome.h"
+#include "common_proc_info.h"
+
+int
+s1_init_ctx_resp_handler(SuccessfulOutcome_t *msg);
+
+int
+parse_IEs(char *msg, struct proto_IE *proto_ies, unsigned short proc_code);
+
+int convertToInitUeProtoIe(InitiatingMessage_t *msg, struct proto_IE* proto_ies);
+int convertUplinkNasToProtoIe(InitiatingMessage_t *msg, struct proto_IE* proto_ies);
+int convertUeCtxRelReqToProtoIe(InitiatingMessage_t *msg, struct proto_IE* proto_ies);
+int convertInitCtxRspToProtoIe(SuccessfulOutcome_t *msg, struct proto_IE* proto_ies);
+int convertUeCtxRelComplToProtoIe(SuccessfulOutcome_t *msg, struct proto_IE* proto_ies);
+
+int
+s1_setup_handler(InitiatingMessage_t *msg, int enb_fd);
+
+int
+s1_init_ue_handler(struct proto_IE *s1_init_ies, int enb_fd);
+
+void
+handle_s1ap_message(void *message);
+
+int
+init_s1ap();
+
+void
+read_config();
+
+void*
+IAM_handler(void *data);
+
+int s1_esm_resp_handler(struct proto_IE *s1_esm_resp_ies);
+
+int s1_secmode_resp_handler(struct proto_IE *s1_sec_resp_ies);
+
+int s1_auth_resp_handler(struct proto_IE *s1_auth_resp_ies);
+
+int s1_auth_fail_handler(struct proto_IE *s1_auth_resp_ies);
+
+int s1_identity_resp_handler(struct proto_IE *s1_id_resp_ies);
+
+int s1_attach_complete_handler(struct proto_IE *s1_esm_resp_ies);
+
+int
+detach_stage1_handler(struct proto_IE *detach_ies, bool retransmit);
+
+int
+s1_init_ue_service_req_handler(struct proto_IE *service_req_ies, int enb_fd);
+
+int
+tau_request_handler(struct proto_IE *s1_tau_req_ies, int enb_fd);
+
+int
+s1_ctx_release_resp_handler(SuccessfulOutcome_t *msg);
+
+int
+s1_ctx_release_request_handler(InitiatingMessage_t *msg);
+
+int 
+s1_ctx_release_complete_handler(SuccessfulOutcome_t *msg);
+
+int
+detach_accept_from_ue_handler(struct proto_IE *detach_ies, bool retransmit);
+
+int s1ap_mme_encode_ue_context_release_command(
+        struct s1ap_common_req_Q_msg *s1apPDU,
+        uint8_t **buffer, uint32_t *length);
+
+int s1ap_mme_encode_paging_request(
+        struct s1ap_common_req_Q_msg *s1apPDU,
+        uint8_t **buffer, uint32_t *length);
+
+int s1ap_mme_encode_initiating(
+        struct s1ap_common_req_Q_msg *s1apPDU,
+        uint8_t **buffer, uint32_t *length);
+
+int s1ap_mme_encode_initial_context_setup_request(
+        struct s1ap_common_req_Q_msg *s1apPDU,
+        uint8_t **buffer, uint32_t *length);
+
+int
+s1ap_mme_decode_initiating (InitiatingMessage_t *initiating_p, int enb_fd);
+
+int
+s1ap_mme_decode_successfull_outcome (SuccessfulOutcome_t *initiating_p);
+
+int
+s1ap_mme_decode_unsuccessfull_outcome (UnsuccessfulOutcome_t *initiating_p);
+
+int
+copyU16(unsigned char *buffer, uint32_t val);
+
+int
+send_sctp_msg(int connSock, unsigned char *buffer, size_t len, uint16_t stream_no);
+
+void
+buffer_copy(struct Buffer *buffer, void *value, size_t size);
+
+/**
+ * @brief Decode int value from the byte array received in the s1ap incoming
+ * packet.
+ * @param[in] bytes - Array of bytes in packet
+ * @param[in] len - Length of the bytes array from which to extract the int
+ * @return Integer value extracted out of bytes array. 0 if failed.
+ */
+int
+decode_int_val(unsigned char *bytes, short len);
+
+char*
+msg_to_hex_str(const char *msg, int len, char **buffer);
+
+unsigned short
+get_length(char **msg);
+#endif /*__S1AP_H_*/
diff --git a/include/s1ap/s1ap_config.h b/include/s1ap/s1ap_config.h
new file mode 100644
index 0000000..5f18140
--- /dev/null
+++ b/include/s1ap/s1ap_config.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_CONFIG_H_
+#define __S1AP_CONFIG_H_
+
+#include <stdbool.h>
+#include "s1ap_structs.h"
+
+#define MME_NAME_LEN 256
+
+/**
+ * s1ap interface configuration parameters
+ */
+typedef struct s1ap_config
+{
+	unsigned short sctp_port;
+	unsigned short enb_port;
+	unsigned int enb_ip;
+	char  *mme_name;
+	unsigned int s1ap_local_ip;
+	unsigned short mme_group_id;
+	unsigned short max_enbs_cnt;
+	unsigned char rel_cap;
+	unsigned char mme_code;
+	char  sctp_type; /* sctp, udp */
+	struct PLMN mme_plmn_id;
+	struct PLMN target_mme_plmn_id;
+} s1ap_config;
+
+void
+init_parser(char *path);
+
+int
+parse_s1ap_conf();
+
+#endif /*__S1AP_CONFIG_H_*/
diff --git a/include/s1ap/s1ap_ie.h b/include/s1ap/s1ap_ie.h
new file mode 100644
index 0000000..f93a461
--- /dev/null
+++ b/include/s1ap/s1ap_ie.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_IE_H_
+#define __S1AP_IE_H_
+
+#include "s1ap_msg_codes.h"
+#include "s1ap_structs.h"
+
+
+#define S1AP_INITUE_IEs 5
+
+/*** IE parsing functions ***/
+typedef void * (ie_parser_function)(char *msg, int len);
+
+//ie_parser_function ie_parser[32];//={};
+
+void* ie_parse_global_enb_id(char *msg, int len);
+void* ie_parse_enb_name(char *msg, int len);
+void* ie_parse_supported_TAs(char *msg, int len);
+void* ie_parse_pagins_DRX(char *msg, int len);
+
+/*** IE parsing functions end***/
+
+#endif /*S1AP_IE_H_*/
diff --git a/include/s1ap/s1ap_msg_codes.h b/include/s1ap/s1ap_msg_codes.h
new file mode 100644
index 0000000..67ca2c9
--- /dev/null
+++ b/include/s1ap/s1ap_msg_codes.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_MSG_CODES_H_
+#define __S1AP_MSG_CODES_H_
+
+/****S1AP Procedude codes****/
+#define S1AP_SETUP_REQUEST_CODE 17
+#define S1AP_INITIAL_UE_MSG_CODE 12
+#define S1AP_UE_CONTEXT_RELEASE_REQUEST_CODE 18
+#define S1AP_UE_CONTEXT_RELEASE_CODE 23
+/*uplink NAS Transport*/
+#define S1AP_UL_NAS_TX_MSG_CODE 13
+#define S1AP_INITIAL_CTX_RESP_CODE 9
+
+/*S1AP Protocol IE types*/
+#define S1AP_IE_GLOBAL_ENB_ID 59
+#define S1AP_IE_ENB_NAME 60
+#define S1AP_IE_SUPPORTED_TAS 64
+#define S1AP_IE_DEF_PAGING_DRX 137
+#define S1AP_IE_MMENAME 61
+#define S1AP_IE_SERVED_GUMMEIES 105
+#define S1AP_IE_REL_MME_CAPACITY 87
+
+#define S1AP_IE_MME_UE_ID 0
+#define S1AP_IE_CAUSE 2
+#define S1AP_IE_ENB_UE_ID 8
+#define S1AP_IE_NAS_PDU  26
+#define S1AP_IE_TAI  67
+#define S1AP_IE_UTRAN_CGI  100
+#define S1AP_IE_S_TMSI  96
+#define S1AP_IE_RRC_EST_CAUSE  134
+#define S1AP_ERAB_SETUP_CTX_SUR 51
+
+/*NAS message type codes*/
+#define NAS_ESM_RESP 0xda
+#define NAS_AUTH_RESP 0x53
+#define NAS_AUTH_REJECT 0x54
+#define NAS_AUTH_FAILURE 0x5c
+#define NAS_IDENTITY_REQUEST 0x55
+#define NAS_IDENTITY_RESPONSE 0x56
+#define NAS_SEC_MODE_COMPLETE 0x5e
+#define NAS_SEC_MODE_REJECT  0x5f
+#define NAS_ATTACH_REQUEST 0x41
+#define NAS_ATTACH_COMPLETE 0x43
+#define NAS_ATTACH_REJECT 0x44
+#define NAS_TAU_REQUEST    0x48
+#define NAS_TAU_COMPLETE   0x4
+#define NAS_DETACH_REQUEST 0x45
+#define NAS_DETACH_ACCEPT 0x46
+#define NAS_SERVICE_REQUEST 0x4D
+
+#endif /*__S1AP_MSG_CODES*/
diff --git a/include/s1ap/sctp_conn.h b/include/s1ap/sctp_conn.h
new file mode 100644
index 0000000..be9a9e0
--- /dev/null
+++ b/include/s1ap/sctp_conn.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_SCTP_CONN_H_
+#define __S1AP_SCTP_CONN_H_
+
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <netinet/sctp.h>
+
+#define MAX_STREAM 5
+#define MAX_PENDING_CONN 5
+#define ENB_PORT 62324
+
+int create_sctp_socket(unsigned int remote_ip, unsigned short port);
+
+int accept_sctp_socket(int sockfd);
+
+int recv_sctp_msg(int sockfd, unsigned char *buf, size_t len);
+
+int send_sctp_msg(int connSock, unsigned char *buffer, size_t len, uint16_t stream_no);
+
+int close_sctp_socket(int sockfd);
+
+#endif /*__S1AP_SCTP_CONN_H*/
diff --git a/include/s6a/s6a.h b/include/s6a/s6a.h
new file mode 100644
index 0000000..e4aa383
--- /dev/null
+++ b/include/s6a/s6a.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S6A_H_
+#define __S6A_H_
+
+#include <freeDiameter/freeDiameter-host.h>
+#include <freeDiameter/libfdproto.h>
+#include <freeDiameter/libfdcore.h>
+
+#include "log.h"
+#include "hss_message.h"
+
+#define S6A_FD_CONF "conf/s6a_fd.conf"
+#define HSS_RESP_THREADPOOL_SIZE 10
+#define STR_IMSI_LEN 16
+#define SESS_ID_LEN 128
+
+/**
+ * brief: Structure to store s6a freediameter session information
+ */
+struct s6a_sess_info {
+	unsigned char imsi[8];
+	char sess_id[SESS_ID_LEN];
+	int sess_id_len;
+};
+
+/**
+ * @brief Handle HSS reponse message
+ * @param[in] message buffer
+ * @return void
+ */
+void
+hss_resp_handler(void *message);
+
+/**
+ * @brief Handler thread for AIR/ULR request coming from mme-app
+ * This function sends both AIR and ULR
+ * @param[in] data- message buffer
+ * @return void*
+ */
+void*
+AIR_handler(void *data);
+
+/**
+ * @brief Handler thread for detach request coming from mme-app
+ * @param[in] data- message buffer
+ * @return void *
+ */
+void*
+detach_handler(void *data);
+
+/*Handler for AIA coming from built in perf HS*/
+void
+handle_perf_hss_aia(int ue_idx, struct hss_aia_msg *aia);
+
+/*Handler for ULA coming from built in perf HS*/
+void
+handle_perf_hss_ula(int ue_idx, struct hss_ula_msg *ula);
+
+/*Handler for AIA coming from built in perf HS*/
+void
+handle_perf_hss_purge_resp(int ue_idx);
+
+
+//NI Detach
+/*Handler for CLR coming from built in perf HSS*/
+void
+handle_perf_hss_clr(int ue_idx, struct hss_clr_msg *clr);
+
+/**
+ * @brief convert binary imsi to string imsi
+ * Binary imsi is stored in 8 bytes, each nibble representing each imsi char.
+ * char imsi stroes each char in 1 byte.
+ * @param[in] b_imsi : Binary imsi
+ * @param[out] s_imsi : Converted string imsi
+ * @return void
+ */
+void
+imsi_bin_to_str(unsigned char *b_imsi, char *s_imsi);
+
+#endif /*S6A*/
diff --git a/include/s6a/s6a_config.h b/include/s6a/s6a_config.h
new file mode 100644
index 0000000..aaed84d
--- /dev/null
+++ b/include/s6a/s6a_config.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S1AP_CONFIG_H_
+#define __S1AP_CONFIG_H_
+
+#include <stdbool.h>
+#include "s1ap_structs.h"
+
+#define HSS_HOST_NAME_LEN 256
+#define HSS_REALM_LEN 256
+#define SS_IPC_ENDPT_FILE_LEN 256
+
+/**
+ * @brief: Whether HSS to be contacted is freediameter based real HSS or the
+ * dummy designed for performance testing
+ */
+enum  e_HSS_HOST_TYPE {
+	HSS_PERF,
+	HSS_FD,
+};
+
+/**
+ * @brief What type of RPC mechanism to use for communication with dummy HSS
+ */
+enum  e_HSS_RPC {
+	HSS_IPC,
+	HSS_RPC,
+};
+
+/**
+ * @brief HSS configuration read from hss json file
+ */
+typedef struct s6a_config {
+	/**Defines whether freediameter based hss to be used or inbuilt hss to be
+	 * used.
+	 */
+	enum  e_HSS_HOST_TYPE hss_type;
+
+	/*Applicable in case of in built HSS. Defines which type of communication
+	 * to be used. This is for future provision to support RPC
+	 */
+	enum  e_HSS_RPC hss_rpc;
+	char  *hss_ipc_endpt;
+	char  *hss_host_name;
+	char  *realm;
+} s6a_config;
+
+/**
+ * @brief Initialize json parser for givn file
+ * @param path to the hss json file
+ */
+void
+init_parser(char *path);
+
+/**
+ * @brief Parser hss json file and store parameters in the structure
+ * @params none
+ * @return int as success/fail
+ */
+int
+parse_s6a_conf();
+
+#endif /*__S1AP_CONFIG_H_*/
diff --git a/include/s6a/s6a_fd.h b/include/s6a/s6a_fd.h
new file mode 100644
index 0000000..2bc716a
--- /dev/null
+++ b/include/s6a/s6a_fd.h
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __S6A_FD_H__
+#define __S6A_FD_H__
+
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <ctype.h>
+#include <freeDiameter/freeDiameter-host.h>
+#include <freeDiameter/libfdproto.h>
+#include <freeDiameter/libfdcore.h>
+
+#include "err_codes.h"
+#include "s6a.h"
+
+/*Update location request(ULR) flag bitfields*/
+/* Single-Registration-Indication  -------1*/
+#define ULR_FLAG_SINGLE_REG_IND (1)
+/*S6a/S6d-Indicator:               ------1-*/
+#define ULR_FLAG_S6AS6D_IND (1<<1)
+/*Skip-Subscriber-Data:            -----1--*/
+#define ULR_FLAGS_SKIP_SUB_DATA (1<<2)
+/*GPRS-Subscription-Data-Indicator:----1---*/
+#define ULR_FLAGS_GPRS_SUBS_DATA_IBND (1<<3)
+/*Node-Type-Indicator:             ---1----*/
+#define ULR_FLAGS_NODE_TYPE_IIND (1<<4)
+/*Initial-Attach-Indicator:        --1-----*/
+#define ULR_FLAG_INIT_ATCH_IND (1<<5)
+/*PS-LCS-Not-Supported-By-UE:      -1------*/
+#define ULR_FLAG_PS_LCS_NOT_SUPPORTED_BY_UE (1<<6)
+/*SMS-Only-Indication:             1-------*/
+#define ULR_FLAG_SMS_ONLY_IND (1<<7)
+
+#define S6A_RAT_EUTRAN 1004
+
+#define FD_DICT_SEARCH(dict, cond, id, obj) \
+	CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, dict, cond,\
+		(void*)id, &obj, ENOENT),\
+		return S6A_FD_DICTSRCH_FAILED)
+
+/**
+ * @brief Freediameter result
+ */
+struct fd_result {
+	bool present;
+	unsigned int vendor_id;
+	unsigned int result_code;
+};
+
+/**
+ * @brief Freediameter disctionary objects user in s6a transactions
+ */
+struct fd_dict_objects {
+	/*s6a and app id*/
+	struct dict_object *vendor_id;
+	struct dict_object *s6a_app;
+
+	/*Message types*/
+	struct dict_object *AIR; /*Authentication-Information-Request*/
+	struct dict_object *AIA; /*Authentication-information-Answer*/
+	struct dict_object *ULR; /*Update-Location-Request*/
+	struct dict_object *ULA; /*Update-Location-Answer*/
+	struct dict_object *PUR; /*Purge-Request*/
+	struct dict_object *PUA; /*Purge-Answer*/
+	//NI Detach
+	struct dict_object *CLR; /*Cancel-Location-Request*/
+	struct dict_object *CLA; /*Cancel-Location-Answer*/
+	//NI Detach
+	
+	/*common s6a requst header*/
+	struct dict_object *auth_app_id;
+	struct dict_object *sess_id;
+	struct dict_object *org_host;	//NI Detach
+	struct dict_object *org_realm;	//NI Detach
+	struct dict_object *dest_host;
+	struct dict_object *dest_realm;
+	struct dict_object *auth_sess_state;
+	struct dict_object *res_code;
+	struct dict_object *exp_res;
+	struct dict_object *user_name;
+
+	/*AIR elements*/
+	struct dict_object *visited_PLMN_id;
+	struct dict_object *req_EUTRAN_auth_info;
+	struct dict_object *no_of_req_vectors;
+	struct dict_object *immediate_resp_pref;
+
+	/*AIA elements*/
+	struct dict_object *auth_info;
+	struct dict_object *E_UTRAN_vector;
+	struct dict_object *RAND;
+	struct dict_object *XRES;
+	struct dict_object *AUTN;
+	struct dict_object *KASME;
+
+	/*ULR elements*/
+	struct dict_object *RAT_type;
+	struct dict_object *ULR_flags;
+
+	/*ULA elements*/
+	struct dict_object *ULA_flags;
+	struct dict_object *subscription_data;
+	struct dict_object *subscriber_status;
+	struct dict_object *MSISDN;
+	struct dict_object *net_access_mode;
+	struct dict_object *access_restriction_data;
+	struct dict_object *AMBR;
+	struct dict_object *max_req_bandwidth_UL;
+	struct dict_object *max_req_bandwidth_DL;
+	struct dict_object *APN_config_profile;
+	struct dict_object *ctx_id;
+	struct dict_object *additional_ctx_id;
+	struct dict_object *all_APN_configs_included_ind;
+	struct dict_object *APN_config;
+	struct dict_object *PDN_type;
+	struct dict_object *PDN_GW_alloc_type;
+	struct dict_object *specific_APN_info;
+	struct dict_object *non_IP_PDN_type_ind;
+	struct dict_object *non_IP_data_delivery_mech;
+	struct dict_object *SCEF_ID;
+	struct dict_object *priority_Level;
+	struct dict_object *location_area_id;
+	struct dict_object *tracking_area_id;
+	struct dict_object *subsc_periodic_RAU_TAU_tmr;
+
+	/*PUR elements*/
+	struct dict_object *PUR_flags;
+	struct dict_object *reg_subs_zone_code;
+
+	//NI Detach
+	/*CLR elements*/
+	struct dict_object *cancellation_type;
+};
+
+/**
+ * @brief Freediameter dictionary data storage
+ */
+struct fd_dict_data {
+	/* S6A AVP data */
+	struct dict_application_data app_s6a_data;
+	struct dict_vendor_data vendor_data;
+
+	/*Common s6a elements*/
+	struct dict_avp_data res_code;
+	struct dict_avp_data exp_res;
+	struct dict_avp_data exp_res_code;
+	struct dict_avp_data vendor_specific_app_id;
+	struct dict_avp_data auth_app_id;
+	struct dict_avp_data acct_app_id;
+	struct dict_avp_data vendor_id;
+	struct dict_avp_data sess_id;
+	struct dict_avp_data auth_sess_state;
+	struct dict_avp_data org_host;
+	struct dict_avp_data org_realm;
+	struct dict_avp_data dest_host;
+	struct dict_avp_data dest_realm;
+	struct dict_avp_data user_name;
+	struct dict_avp_data visited_PLMN_id;
+	struct dict_avp_data req_EUTRAN_auth_info;
+	struct dict_avp_data no_of_req_vectors;
+	struct dict_avp_data immediate_resp_pref;
+
+	/*AIA data*/
+	struct dict_avp_data auth_info;
+	struct dict_avp_data E_UTRAN_vector;
+	struct dict_avp_data RAND;
+	struct dict_avp_data XRES;
+	struct dict_avp_data AUTN;
+	struct dict_avp_data KASME;
+
+	/*ULR data*/
+	struct dict_avp_data RAT_type;
+	struct dict_avp_data ULR_flags;
+
+	/*ULA data*/
+	struct dict_avp_data ULA_flags;
+	struct dict_avp_data subscription_data;
+	struct dict_avp_data subscriber_status;
+	struct dict_avp_data MSISDN;
+	struct dict_avp_data net_access_mode;
+	struct dict_avp_data access_restriction_data;
+	struct dict_avp_data AMBR;
+	struct dict_avp_data max_req_bandwidth_UL;
+	struct dict_avp_data max_req_bandwidth_DL;
+	struct dict_avp_data APN_config_profile;
+	struct dict_avp_data ctx_id;
+	struct dict_avp_data additional_ctx_id;
+	struct dict_avp_data all_APN_configs_included_ind;
+	struct dict_avp_data APN_config;
+	struct dict_avp_data PDN_type;
+	struct dict_avp_data PDN_GW_alloc_type;
+	struct dict_avp_data specific_APN_info;
+	struct dict_avp_data non_IP_PDN_type_ind;
+	struct dict_avp_data non_IP_data_delivery_mech;
+	struct dict_avp_data SCEF_ID;
+	struct dict_avp_data priority_Level;
+	struct dict_avp_data location_area_id;
+	struct dict_avp_data tracking_area_id;
+	struct dict_avp_data subsc_periodic_RAU_TAU_tmr;
+
+	/*PUR flags*/
+	struct dict_avp_data PUR_flags;
+	struct dict_avp_data reg_subs_zone_code;
+
+	//NI Detach
+	/*CLR Data*/
+	struct dict_avp_data cancellation_type;
+};
+
+/**
+ * @brief Initialize freediameter parser, callbacks, dictionary etc.
+ * @params none
+ * @return int as success/fail
+ */
+int
+s6a_fd_init();
+
+/**
+ * @brief Initialize freediameter dictionary
+ * @param none
+ * @return int as success/fail
+ */
+int
+s6a_fd_objs_init();
+
+/**
+ * @brief Initialize freediameter dictionary data objects
+ * @param none
+ * @return int as success/fail
+ */
+int
+s6a_fd_data_init();
+
+/**
+ * @brief Initialize freediameter API callbacks for response handling
+ * @param none
+ * @return int as success/fail
+ */
+int
+s6a_fd_cb_reg();
+
+/**
+ * @brief extract ue index from session id of freediameter
+ * @param[in] sid - session id
+ * @param[in] sidlen - Session Id length
+ * @return UE index extracted out of session id
+ */
+int
+get_ue_idx_from_fd_resp(unsigned char *sid, int sidlen);
+
+/**
+ * @brief Cression session id, append ue index to session id
+ * @param[in, out] s6a_sess - session information
+ * @param[in] ue_idx to append to session id
+ * @return int as success/fail
+ */
+short
+create_fd_sess_id(struct s6a_sess_info *s6a_sess, int ue_idx);
+
+int
+aia_resp_callback(struct msg **msg, struct avp *avp, struct session *sess,
+		void *data, enum disp_action *act);
+
+int
+ula_resp_callback(struct msg **msg, struct avp *avp, struct session *sess,
+		void *data, enum disp_action *act);
+
+//NI Detach
+int
+clr_resp_callback(struct msg **msg, struct avp *avp, struct session *sess,
+		void *data, enum disp_action *act);
+
+
+#if 0
+int
+purge_resp_callback(struct msg **msg, struct avp *avp, struct session *sess,
+		void *data, enum disp_action *act);
+#endif
+
+/**
+ * @brief Dumo freediameter message on console
+ * @param msg - Freediameter message structure
+ * @return void
+ */
+void
+dump_fd_msg(struct msg *msg);
+
+/**
+ * brief add AVl object to freediameter message
+ * @param[in] avp value to add
+ * @param[in] ditionary object for reference
+ * @param[out] frediameter message where avp is added
+ * @return int as success/fail
+ */
+int
+add_fd_msg(union avp_value *val, struct dict_object * obj,
+struct msg **msg_buf);
+
+void
+handle_perf_hss_aia(int ue_idx, struct hss_aia_msg *aia);
+
+void
+handle_perf_hss_ula(int ue_idx, struct hss_ula_msg *ula);
+
+void
+handle_perf_hss_purge_resp(int ue_idx);
+
+//NI Detach
+void 
+handle_perf_hss_clr(int ue_idx, struct hss_clr_msg *clr);
+
+short
+parse_fd_result(struct avp *avp, struct fd_result *res);
+
+#endif /* __S6A_FD_H__ */
diff --git a/include/stateMachineFwk/actionTable.h b/include/stateMachineFwk/actionTable.h
new file mode 100644
index 0000000..f3b9794
--- /dev/null
+++ b/include/stateMachineFwk/actionTable.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string>
+#include <deque>
+#include "smTypes.h"
+
+#ifndef ACTIONTABLE_H_
+#define ACTIONTABLE_H_
+
+namespace SM
+{
+
+	class ControlBlock;
+	class State;
+
+	using namespace std;
+
+	class ActionTable
+	{
+   	public:
+		ActionTable();
+		virtual ~ActionTable();
+
+		virtual void display();
+
+		ActStatus executeActions(ControlBlock& cb);
+		void addAction(ActionPointer act);
+		void setNextState(State*st);
+	private:
+     		deque<ActionPointer> actionsQ;
+        	State* nextStatep;
+	};
+}
+#endif /* ACTIONTABLE_H_ */
diff --git a/include/stateMachineFwk/controlBlock.h b/include/stateMachineFwk/controlBlock.h
new file mode 100644
index 0000000..7591a1a
--- /dev/null
+++ b/include/stateMachineFwk/controlBlock.h
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CONTROLBLOCK_H_
+#define CONTROLBLOCK_H_
+
+#include <mutex>
+#include <queue>
+#include <deque>
+#include <stdint.h>
+#include <time.h>
+#include "permDataBlock.h"
+#include <smTypes.h>
+#include "tempDataBlock.h"
+
+class Event;
+class State;
+
+using namespace std;
+
+namespace SM
+{
+	typedef struct debugEventInfo
+	{
+        	Event_e event;
+	        State_e state;
+        	time_t evt_time;
+
+        	debugEventInfo(Event_e evt, State_e st, time_t t)
+        	{
+        		event = evt;
+        		state = st;
+        		evt_time = t;
+        	}
+
+	}debugEventInfo;
+
+	class Event;
+	class State;
+	class ControlBlock
+	{
+   	public:
+			static const unsigned short MAX_FAST_BLOCK_IDX = 5;
+			static uint32_t controlBlockArrayIdx;
+
+      		ControlBlock();
+      		virtual ~ControlBlock();
+
+      		void reset();
+
+      		uint32_t getCBIndex();
+
+      		void addEventToProcQ(Event &event);
+	      	bool getCurrentEvent(Event &evt);
+
+	      	State* getCurrentState();
+      		void setNextState(State* state);
+
+      		PermDataBlock* getFastAccessBlock(unsigned short idx) const;
+      		void setFastAccessBlock(PermDataBlock* pdb_p, unsigned short idx);
+
+      		PermDataBlock* getPermDataBlock() const;
+      		void setPermDataBlock(PermDataBlock* pdb_p);
+
+      		TempDataBlock* getTempDataBlock() const;
+      		void setTempDataBlock(TempDataBlock* tdb_p); 
+      		void setCurrentTempDataBlock(TempDataBlock* tdb_p);
+
+      		void addDebugInfo(debugEventInfo& eventInfo);
+      		inline deque<debugEventInfo> getDebugInfoQueue()const
+			{
+      			return debugEventInfoQ;
+			}
+
+      		void* getMsgData()
+      		{
+      			return data_p;
+      		}
+
+      		void setMsgData(void* ptr)
+      		{
+      			data_p = ptr;
+      		}
+
+      		void setControlBlockState(ControlBlockState state);
+      		ControlBlockState getControlBlockState();
+
+            bool isInProcQueue();
+            void setProcQueueFlag(bool flag);
+
+      		virtual void display();
+
+   	private:
+		std::mutex mutex_m;
+		const uint32_t cbIndex_m;
+		ControlBlockState cbState_m;
+
+		// deallocated once the event is processed
+		void* data_p;
+
+      		PermDataBlock* pdb_mp;
+      		PermDataBlock* fadb_mpa[MAX_FAST_BLOCK_IDX];
+      		TempDataBlock* tdb_mp;
+
+      		queue<Event> eventQ;
+		
+	    	deque<debugEventInfo> debugEventInfoQ;
+		bool inProcQueue_m;
+	};
+}
+#endif /* CONTROLBLOCK_H_ */
diff --git a/include/stateMachineFwk/event.h b/include/stateMachineFwk/event.h
new file mode 100644
index 0000000..7ad9423
--- /dev/null
+++ b/include/stateMachineFwk/event.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef EVENT_H_
+#define EVENT_H_
+
+#include <string>
+#include <map>
+
+#include "smEnumTypes.h"
+
+using namespace std;
+
+namespace SM
+{
+	class Event
+	{
+   	public:
+		Event();
+      		Event(Event_e evtID, void* eventData);
+      		virtual ~Event();
+
+      		inline Event_e getEventId()const
+      		{
+      			return eventID;
+      		}
+
+      		void* getEventData() const;
+
+      		virtual void display();
+ 
+   	private:
+	      	Event_e eventID;
+	      	void * eventData_p;
+	};
+}
+
+#endif /* EVENT_H_ */
diff --git a/include/stateMachineFwk/permDataBlock.h b/include/stateMachineFwk/permDataBlock.h
new file mode 100644
index 0000000..0d35bd8
--- /dev/null
+++ b/include/stateMachineFwk/permDataBlock.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef PERMDATABLOCK_H_
+#define PERMDATABLOCK_H_
+
+namespace SM
+{
+class PermDataBlock
+{
+   public:
+      PermDataBlock();
+      virtual ~PermDataBlock();
+      virtual void display();
+      
+   private:
+      // Add permanant data fields here
+      unsigned int contextID;
+};
+}
+
+#endif /* PERMDATABLOCK_H_ */
diff --git a/include/stateMachineFwk/procedureQueue.h b/include/stateMachineFwk/procedureQueue.h
new file mode 100644
index 0000000..efffaf5
--- /dev/null
+++ b/include/stateMachineFwk/procedureQueue.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef PROCEDUREQUEUE_H_
+#define PROCEDUREQUEUE_H_
+
+#include <queue>
+#include <mutex>
+#include <semaphore.h>
+
+using namespace std;
+
+namespace SM
+{
+
+class ControlBlock;
+
+class ProcedureQueue
+{
+   public:
+      ProcedureQueue();
+      ~ProcedureQueue();
+
+      ControlBlock* pop();
+      bool push(ControlBlock* cb);
+
+   private:
+      queue <ControlBlock*> cbQ;
+      std::mutex mutex_m;
+      sem_t pop_semaphore;
+};
+}
+#endif /* PROCEDUREQUEUE_H_ */
diff --git a/include/stateMachineFwk/smEnumTypes.h b/include/stateMachineFwk/smEnumTypes.h
new file mode 100644
index 0000000..2b8a456
--- /dev/null
+++ b/include/stateMachineFwk/smEnumTypes.h
@@ -0,0 +1,282 @@
+/*
+ * Copyright 2019-present, Infosys Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SM_ENUMS_H
+#define SM_ENUMS_H
+/**************************************
+ * 
+ * This is an auto generated file.
+ * Please do not edit this file.
+ * All edits to be made through template source file
+ * <TOP-DIR/scripts/SMCodeGen/templates/stateMachineTmpls/enum.tt>
+ **************************************/
+ 
+enum State_e
+{ 
+    attach_start, 
+    attach_wf_aia, 
+    attach_wf_att_cmp, 
+    attach_wf_auth_resp, 
+    attach_wf_auth_resp_validate, 
+    attach_wf_cs_resp, 
+    attach_wf_esm_info_check, 
+    attach_wf_esm_info_resp, 
+    attach_wf_identity_response, 
+    attach_wf_imsi_validate_action, 
+    attach_wf_init_ctxt_resp, 
+    attach_wf_init_ctxt_resp_att_cmp, 
+    attach_wf_mb_resp, 
+    attach_wf_sec_cmp, 
+    attach_wf_ula, 
+    default_mme_state, 
+    detach_start, 
+    detach_wf_del_session_resp, 
+    ni_detach_start, 
+    ni_detach_wf_del_sess_resp, 
+    ni_detach_wf_det_accpt_del_sess_resp, 
+    ni_detach_wf_detach_accept, 
+    ni_detach_wf_s1_rel_comp, 
+    paging_start, 
+    paging_wf_service_req, 
+    s1_release_start, 
+    s1_release_wf_release_access_bearer_resp, 
+    s1_release_wf_ue_ctxt_release_comp, 
+    service_request_start, 
+    service_request_wf_auth_and_sec_check_cmp, 
+    service_request_wf_init_ctxt_resp, 
+    service_request_wf_mb_resp, 
+    tau_start,
+    END_STATE
+};
+
+static constexpr const char* States[] =
+{
+    "attach_start",
+    "attach_wf_aia",
+    "attach_wf_att_cmp",
+    "attach_wf_auth_resp",
+    "attach_wf_auth_resp_validate",
+    "attach_wf_cs_resp",
+    "attach_wf_esm_info_check",
+    "attach_wf_esm_info_resp",
+    "attach_wf_identity_response",
+    "attach_wf_imsi_validate_action",
+    "attach_wf_init_ctxt_resp",
+    "attach_wf_init_ctxt_resp_att_cmp",
+    "attach_wf_mb_resp",
+    "attach_wf_sec_cmp",
+    "attach_wf_ula",
+    "default_mme_state",
+    "detach_start",
+    "detach_wf_del_session_resp",
+    "ni_detach_start",
+    "ni_detach_wf_del_sess_resp",
+    "ni_detach_wf_det_accpt_del_sess_resp",
+    "ni_detach_wf_detach_accept",
+    "ni_detach_wf_s1_rel_comp",
+    "paging_start",
+    "paging_wf_service_req",
+    "s1_release_start",
+    "s1_release_wf_release_access_bearer_resp",
+    "s1_release_wf_ue_ctxt_release_comp",
+    "service_request_start",
+    "service_request_wf_auth_and_sec_check_cmp",
+    "service_request_wf_init_ctxt_resp",
+    "service_request_wf_mb_resp",
+    "tau_start",
+    "END_STATE"
+};
+
+enum Event_e
+{
+    AIA_FROM_HSS,
+    ATT_CMP_FROM_UE,
+    ATTACH_REQ_FROM_UE,
+    AUTH_AND_SEC_CHECK_COMPLETE,
+    AUTH_RESP_FAILURE,
+    AUTH_RESP_FROM_UE,
+    AUTH_RESP_SUCCESS,
+    AUTH_RESP_SYNC_FAILURE,
+    CLR_FROM_HSS,
+    CS_RESP_FROM_SGW,
+    DDN_FROM_SGW,
+    DEL_SESSION_RESP_FROM_SGW,
+    DETACH_ACCEPT_FROM_UE,
+    DETACH_REQ_FROM_UE,
+    ESM_INFO_NOT_REQUIRED,
+    ESM_INFO_REQUIRED,
+    ESM_INFO_RESP_FROM_UE,
+    IDENTITY_RESPONSE_FROM_UE,
+    IMSI_VALIDATION_FAILURE,
+    IMSI_VALIDATION_SUCCESS,
+    INIT_CTXT_RESP_FROM_UE,
+    MB_RESP_FROM_SGW,
+    REL_AB_RESP_FROM_SGW,
+    S1_REL_REQ_FROM_UE,
+    SEC_MODE_RESP_FROM_UE,
+    SERVICE_REQUEST_FROM_UE,
+    TAU_REQUEST_FROM_UE,
+    UE_CTXT_REL_COMP_FROM_ENB,
+    ULA_FROM_HSS,
+    VALIDATE_IMSI,
+    END_EVENT
+};
+
+static constexpr const char* Events[] =
+{
+    "AIA_FROM_HSS",
+    "ATT_CMP_FROM_UE",
+    "ATTACH_REQ_FROM_UE",
+    "AUTH_AND_SEC_CHECK_COMPLETE",
+    "AUTH_RESP_FAILURE",
+    "AUTH_RESP_FROM_UE",
+    "AUTH_RESP_SUCCESS",
+    "AUTH_RESP_SYNC_FAILURE",
+    "CLR_FROM_HSS",
+    "CS_RESP_FROM_SGW",
+    "DDN_FROM_SGW",
+    "DEL_SESSION_RESP_FROM_SGW",
+    "DETACH_ACCEPT_FROM_UE",
+    "DETACH_REQ_FROM_UE",
+    "ESM_INFO_NOT_REQUIRED",
+    "ESM_INFO_REQUIRED",
+    "ESM_INFO_RESP_FROM_UE",
+    "IDENTITY_RESPONSE_FROM_UE",
+    "IMSI_VALIDATION_FAILURE",
+    "IMSI_VALIDATION_SUCCESS",
+    "INIT_CTXT_RESP_FROM_UE",
+    "MB_RESP_FROM_SGW",
+    "REL_AB_RESP_FROM_SGW",
+    "S1_REL_REQ_FROM_UE",
+    "SEC_MODE_RESP_FROM_UE",
+    "SERVICE_REQUEST_FROM_UE",
+    "TAU_REQUEST_FROM_UE",
+    "UE_CTXT_REL_COMP_FROM_ENB",
+    "ULA_FROM_HSS",
+    "VALIDATE_IMSI",
+    "END_EVENT"
+};
+
+enum Action_e
+{
+    ATTACH_DONE,
+    AUTH_REQ_TO_UE,
+    AUTH_RESPONSE_VALIDATE,
+    CHECK_ESM_INFO_REQ_REQUIRED,
+    CS_REQ_TO_SGW,
+    DEFAULT_ATTACH_REQ_HANDLER,
+    DEFAULT_CANCEL_LOC_REQ_HANDLER,
+    DEFAULT_DDN_HANDLER,
+    DEFAULT_DETACH_REQ_HANDLER,
+    DEFAULT_S1_RELEASE_REQ_HANDLER,
+    DEFAULT_SERVICE_REQ_HANDLER,
+    DEFAULT_TAU_REQ_HANDLER,
+    DEL_SESSION_REQ,
+    DETACH_ACCEPT_TO_UE,
+    NI_DETACH_REQ_TO_UE,
+    PERFORM_AUTH_AND_SEC_CHECK,
+    PROCESS_AIA,
+    PROCESS_ATTACH_CMP_FROM_UE,
+    PROCESS_CS_RESP,
+    PROCESS_DEL_SESSION_RESP,
+    PROCESS_DETACH_ACCEPT_FROM_UE,
+    PROCESS_ESM_INFO_RESP,
+    PROCESS_IDENTITY_RESPONSE,
+    PROCESS_INIT_CTXT_RESP,
+    PROCESS_INIT_CTXT_RESP_SVC_REQ,
+    PROCESS_MB_RESP,
+    PROCESS_MB_RESP_SVC_REQ,
+    PROCESS_REL_AB_RESP_FROM_SGW,
+    PROCESS_SEC_MODE_RESP,
+    PROCESS_SERVICE_REQUEST,
+    PROCESS_UE_CTXT_REL_COMP,
+    PROCESS_UE_CTXT_REL_COMP_FOR_DETACH,
+    PROCESS_ULA,
+    SEC_MODE_CMD_TO_UE,
+    SEND_AIR_TO_HSS,
+    SEND_AUTH_REJECT,
+    SEND_DDN_ACK_TO_SGW,
+    SEND_ESM_INFO_REQ_TO_UE,
+    SEND_IDENTITY_REQUEST_TO_UE,
+    SEND_INIT_CTXT_REQ_TO_UE,
+    SEND_INIT_CTXT_REQ_TO_UE_SVC_REQ,
+    SEND_MB_REQ_TO_SGW,
+    SEND_MB_REQ_TO_SGW_SVC_REQ,
+    SEND_PAGING_REQ_TO_UE,
+    SEND_REL_AB_REQ_TO_SGW,
+    SEND_S1_REL_CMD_TO_UE,
+    SEND_S1_REL_CMD_TO_UE_FOR_DETACH,
+    SEND_TAU_RESPONSE_TO_UE,
+    SEND_ULR_TO_HSS,
+    VALIDATE_IMSI_IN_UE_CONTEXT,
+    END_ACTION
+};
+
+static constexpr const char* Actions[] =
+{
+    "ATTACH_DONE",
+    "AUTH_REQ_TO_UE",
+    "AUTH_RESPONSE_VALIDATE",
+    "CHECK_ESM_INFO_REQ_REQUIRED",
+    "CS_REQ_TO_SGW",
+    "DEFAULT_ATTACH_REQ_HANDLER",
+    "DEFAULT_CANCEL_LOC_REQ_HANDLER",
+    "DEFAULT_DDN_HANDLER",
+    "DEFAULT_DETACH_REQ_HANDLER",
+    "DEFAULT_S1_RELEASE_REQ_HANDLER",
+    "DEFAULT_SERVICE_REQ_HANDLER",
+    "DEFAULT_TAU_REQ_HANDLER",
+    "DEL_SESSION_REQ",
+    "DETACH_ACCEPT_TO_UE",
+    "NI_DETACH_REQ_TO_UE",
+    "PERFORM_AUTH_AND_SEC_CHECK",
+    "PROCESS_AIA",
+    "PROCESS_ATTACH_CMP_FROM_UE",
+    "PROCESS_CS_RESP",
+    "PROCESS_DEL_SESSION_RESP",
+    "PROCESS_DETACH_ACCEPT_FROM_UE",
+    "PROCESS_ESM_INFO_RESP",
+    "PROCESS_IDENTITY_RESPONSE",
+    "PROCESS_INIT_CTXT_RESP",
+    "PROCESS_INIT_CTXT_RESP_SVC_REQ",
+    "PROCESS_MB_RESP",
+    "PROCESS_MB_RESP_SVC_REQ",
+    "PROCESS_REL_AB_RESP_FROM_SGW",
+    "PROCESS_SEC_MODE_RESP",
+    "PROCESS_SERVICE_REQUEST",
+    "PROCESS_UE_CTXT_REL_COMP",
+    "PROCESS_UE_CTXT_REL_COMP_FOR_DETACH",
+    "PROCESS_ULA",
+    "SEC_MODE_CMD_TO_UE",
+    "SEND_AIR_TO_HSS",
+    "SEND_AUTH_REJECT",
+    "SEND_DDN_ACK_TO_SGW",
+    "SEND_ESM_INFO_REQ_TO_UE",
+    "SEND_IDENTITY_REQUEST_TO_UE",
+    "SEND_INIT_CTXT_REQ_TO_UE",
+    "SEND_INIT_CTXT_REQ_TO_UE_SVC_REQ",
+    "SEND_MB_REQ_TO_SGW",
+    "SEND_MB_REQ_TO_SGW_SVC_REQ",
+    "SEND_PAGING_REQ_TO_UE",
+    "SEND_REL_AB_REQ_TO_SGW",
+    "SEND_S1_REL_CMD_TO_UE",
+    "SEND_S1_REL_CMD_TO_UE_FOR_DETACH",
+    "SEND_TAU_RESPONSE_TO_UE",
+    "SEND_ULR_TO_HSS",
+    "VALIDATE_IMSI_IN_UE_CONTEXT",
+    "END_ACTION"
+};
+
+#endif
\ No newline at end of file
diff --git a/include/stateMachineFwk/smTypes.h b/include/stateMachineFwk/smTypes.h
new file mode 100644
index 0000000..cb3c31f
--- /dev/null
+++ b/include/stateMachineFwk/smTypes.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INCLUDE_STATEMACHFWK_SMTYPES_H_
+#define INCLUDE_STATEMACHFWK_SMTYPES_H_
+
+#include <map>
+#include <smEnumTypes.h>
+
+using namespace std;
+
+namespace SM{
+
+class ControlBlock;
+class State;
+class ActionTable;
+
+enum ActStatus
+{
+	PROCEED,
+	HALT,
+};
+
+enum ControlBlockState
+{
+    FREE,
+    ALLOCATED,
+    MAX_STATE
+};
+
+using ActionPointer = ActStatus(*)(ControlBlock&);
+using EventToActionTableMap = std::map <Event_e, ActionTable>;
+
+};
+
+#endif /* INCLUDE_STATEMACHFWK_SMTYPES_H_ */
diff --git a/include/stateMachineFwk/state.h b/include/stateMachineFwk/state.h
new file mode 100644
index 0000000..c928d6c
--- /dev/null
+++ b/include/stateMachineFwk/state.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef STATE_H_
+#define STATE_H_
+
+#include <string>
+#include <map>
+#include "smTypes.h"
+
+using namespace std;
+
+namespace SM
+{
+	class State
+	{
+  	public:
+		State(State_e sID);
+      		virtual ~State();
+
+	      	virtual void display();
+
+      		ActStatus executeActions(Event_e evtId,ControlBlock& cb);
+
+	      	inline State_e getStateId()const
+      		{
+			return stateID;
+      		}
+
+   	protected:
+      		State_e stateID;
+	      	EventToActionTableMap eventToActionsMap;
+	};
+}
+#endif /* STATE_H_ */
diff --git a/include/stateMachineFwk/stateMachineEngine.h b/include/stateMachineFwk/stateMachineEngine.h
new file mode 100644
index 0000000..2a47c85
--- /dev/null
+++ b/include/stateMachineFwk/stateMachineEngine.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef STATEMACHINEENGINE_H_
+#define STATEMACHINEENGINE_H_
+
+#include <map>
+#include "smTypes.h"
+#include "procedureQueue.h"
+
+namespace SM
+{
+	class State;
+	class StateMachineEngine
+	{
+	public:
+		~StateMachineEngine();
+		static StateMachineEngine* Instance();
+	    void run();
+      	bool addCBToProcQ(ControlBlock* cb);
+	
+   	private:
+		StateMachineEngine();
+
+		ProcedureQueue procQ_m;
+	};
+}
+
+#endif /* STATEMACHINEENGINE_H_ */
diff --git a/include/stateMachineFwk/tempDataBlock.h b/include/stateMachineFwk/tempDataBlock.h
new file mode 100644
index 0000000..5971b1c
--- /dev/null
+++ b/include/stateMachineFwk/tempDataBlock.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2019, Infosys Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TEMPDATABLOCK_H_
+#define TEMPDATABLOCK_H_
+
+namespace SM
+{
+class State;
+class TempDataBlock
+{
+   public:
+      TempDataBlock();
+      virtual ~TempDataBlock();
+
+      virtual void display();
+
+      State* getCurrentState();
+      void setNextState(State* state);
+
+      TempDataBlock* getNextTempDataBlock();
+      void setNextTempDataBlock(TempDataBlock* tdb_p);
+
+   protected:
+      State* currentStatep;
+      TempDataBlock* next;
+};
+}
+
+#endif /* TEMPDATABLOCK_H_ */
+