24 #include <unordered_map> 55 class TranslationThread;
56 class CommunicationThread;
59 typedef std::shared_ptr<RemoteNode> RemoteNodeSPtr;
62 typedef std::shared_ptr<LocalNode> LocalNodeSPtr;
65 typedef ReqOut *ReqOutPtr;
66 typedef std::unordered_map<ULong,ReqOutPtr> ReqOutUMap;
69 typedef RspOut *RspOutPtr;
74 #define SEND_TO_APPLICATION(a,b) \ 75 (PFCP::Configuration::threadApplication()._sendThreadMessage(EThreadMessage( \ 76 static_cast<UInt>(PFCP::ApplicationEvents::a),static_cast<pVoid>(b)))) 77 #define SEND_TO_TRANSLATION(a,b) \ 78 (PFCP::TranslationThread::Instance().sendMessage(EThreadMessage( \ 79 static_cast<UInt>(PFCP::TranslationThread::Events::a),static_cast<pVoid>(b)))) 80 #define SEND_TO_COMMUNICATION(a,b) \ 81 (PFCP::CommunicationThread::Instance().sendMessage(EThreadMessage( \ 82 static_cast<UInt>(PFCP::CommunicationThread::Events::a),static_cast<pVoid>(b)))) 87 typedef ULongLong Seid;
88 typedef UChar MsgType;
103 static void*
operator new(
size_t sz);
104 static void operator delete(
void* m);
123 friend TranslationThread;
124 friend CommunicationThread;
126 static UShort
port() {
return port_; }
127 static UShort
setPort(UShort port) {
return port_ = port; }
132 static LongLong
t1() {
return t1_; }
133 static LongLong
setT1(LongLong t1) {
return t1_ = t1; }
138 static Int
n1() {
return n1_; }
139 static Int
setN1(Int n1) {
return n1_ = n1; }
144 static Long
maxRspWait() {
return static_cast<Long
>(std::max(t1_,hbt1_) * std::max(n1_,hbn1_)); }
152 static ELogger &
logger() {
if (logger_ ==
nullptr)
throw Configuration_LoggerNotDefined();
return *logger_; }
161 static Translator &
translator() {
if (xlator_ ==
nullptr)
throw Configuration_TranslatorNotDefined();
return *xlator_; }
176 template<
class TWorker>
187 static _EThreadEventNotification &
threadApplication() {
if (app_ ==
nullptr)
throw Configuration_ApplicationNotDefined();
return *app_; }
194 static LongLong hbt1_;
207 static _EThreadEventNotification *app_;
226 while ((sn = next_++) > SEQUENCE_MAX)
227 next_.compare_exchange_strong(++sn, SEQUENCE_MIN);
236 static const ULong SEQUENCE_MIN = 0;
237 static const ULong SEQUENCE_MAX = 0x00ffffffff;
238 std::atomic_ulong next_;
257 while ((seid = next_++) < SEID_MINIMUM);
266 static const Seid SEID_MINIMUM = 1;
267 std::atomic_ullong next_;
287 : addr_(fqseid.addr_),
296 addr_ = fqseid.addr_;
297 seid_ = fqseid.seid_;
310 const Seid
seid()
const {
return seid_; }
344 ULong seqNbr()
const {
return sn_; }
345 RcvdReq &setSeqNbr(ULong seqNbr) { sn_ = seqNbr;
return *
this; }
347 Int rspWnd()
const {
return rw_; }
348 RcvdReq &setRspWnd(Int rw) { rw_ = rw;
return *
this; }
354 typedef std::unordered_map<ULong,RcvdReq> RcvdReqUMap;
451 SessionBase &setSeid(SessionBaseSPtr &s, Seid ls, Seid rs, Bool notify =
True);
463 virtual Void destroy(SessionBaseSPtr &s);
468 static void*
operator new(
size_t sz)
470 if (pool_.allocSize() == 0)
474 pool_.setSize(sz, 0, 5);
480 bs += bs %
sizeof(pVoid);
484 pool_.setSize(sz, 0, 5);
489 pool_.setSize(sz, ns);
493 if (sz > pool_.allocSize())
497 ex.
setText(
"session allocation size is larger than memory pool block size");
500 return pool_.allocate();
502 static void operator delete(
void* m)
511 static ULongLong created_;
512 static ULongLong deleted_;
570 auto it = sessions_.find(seid);
571 if (it == sessions_.end())
581 Node &_addSession(Seid seid, SessionBaseSPtr &session)
583 auto it = sessions_.find(seid);
584 if (it == sessions_.end())
585 sessions_[seid] = session;
588 Node &_delSession(Seid seid)
591 sessions_.erase(seid);
594 SessionBaseSPtr getFirstSession()
596 if (sessions_.empty())
598 return sessions_.begin()->second;
603 static ULongLong created_;
604 static ULongLong deleted_;
609 SessionBaseSPtrUMap sessions_;
618 DECLARE_ERROR(RemoteNodeException_UnableToAssignTeidRangeValue);
625 friend CommunicationThread;
627 enum class State { Initialized, Started, Stopping, Stopped, Failed, Restarted };
651 RemoteNode &deleteAllSesssions(RemoteNodeSPtr &rn);
666 Bool addRcvdReq(ULong sn);
667 Bool delRcvdReq(ULong sn) {
return rrumap_.erase(sn) == 1; }
668 Bool setRcvdReqRspWnd(ULong sn, Int wnd);
669 Bool setRcvdReqRspWnd(ULong sn);
670 Void removeRcvdRqstEntries(Int wnd);
671 Bool rcvdReqExists(ULong sn)
const {
return rrumap_.find(sn) != rrumap_.end(); }
673 Void nextActivityWnd(Int wnd);
674 Bool checkActivity();
675 Void incrementActivity() { awnds_[aw_]++; }
677 Void removeOldReqs(Int rw);
688 std::vector<ULong> awnds_;
746 DECLARE_ERROR(LocalNodeException_RemoteNodeUMapInsertFailed);
753 friend CommunicationThread;
755 enum class State { Initialized, Started, Stopping, Stopped };
771 Void freeSeid(Seid seid);
777 Void freeSeqNbr(ULong sn);
781 Void setNbrActivityWnds(
size_t nbr);
789 return createRemoteNode(ipaddr, port);
795 RemoteNodeSPtr createRemoteNode(
EIpAddress &address, UShort port);
802 SessionBaseSPtr createSession(LocalNodeSPtr &ln, RemoteNodeSPtr &rn);
816 Bool rqstOutExists(ULong seqnbr)
const;
817 Bool addRqstOut(ReqOut *ro);
818 Bool setRqstOutRespWnd(ULong seqnbr, Int wnd);
819 Void removeRqstOutEntries(Int wnd);
820 Void clearRqstOutEntries();
822 Void nextActivityWnd(Int wnd);
823 Void checkActivity(LocalNodeSPtr &ln);
826 Bool onReqOutTimeout(ReqOutPtr ro);
827 Void removeOldReqs(Int rw);
829 Void sndInitialReq(ReqOutPtr ro);
830 Bool sndReq(ReqOutPtr ro);
831 Void sndRsp(RspOutPtr ro);
833 LocalNode &addSession(SessionBaseSPtr &s)
835 if (s && s->localSeid() != 0)
836 _addSession(s->localSeid(), s);
839 LocalNode &delSession(SessionBaseSPtr &s)
841 if (s && s->localSeid() != 0)
842 _delSession(s->localSeid());
845 SessionBaseSPtr createSession(LocalNodeSPtr &ln, Seid rs, RemoteNodeSPtr &rn);
903 Bool
isReq()
const {
return rqst_; }
913 static EString cn_ = ::__CLASS_NAME__;
918 virtual Void postDecode() {}
925 mc_(MsgClass::Unknown),
978 AppMsgReq(LocalNodeSPtr &ln, RemoteNodeSPtr &rn, Bool allocSeqNbr)
984 setSeqNbr(ln->allocSeqNbr());
1004 setMsgClass(PFCP::MsgClass::Node);
1012 setMsgClass(PFCP::MsgClass::Node);
1032 setMsgClass(PFCP::MsgClass::Session);
1038 :
AppMsgReq(ses->localNode(), ses->remoteNode(), allocSeqNbr),
1041 setMsgClass(PFCP::MsgClass::Session);
1053 SessionBaseSPtr ses_;
1088 AppMsgReqPtr
req() {
return amrq_; }
1102 setSeqNbr(amrq_->seqNbr());
1122 setMsgClass(PFCP::MsgClass::Node);
1131 setMsgClass(PFCP::MsgClass::Node);
1161 setMsgClass(PFCP::MsgClass::Session);
1169 setMsgClass(PFCP::MsgClass::Session);
1191 class SndHeartbeatReqData
1194 SndHeartbeatReqData()
1197 SndHeartbeatReqData(LocalNodeSPtr &ln, RemoteNodeSPtr &rn)
1202 SndHeartbeatReqData(
const SndHeartbeatReqData &hb)
1208 LocalNodeSPtr &localNode() {
return ln_; }
1209 RemoteNodeSPtr &remoteNode() {
return rn_; }
1211 SndHeartbeatReqData &setLocalNode(LocalNodeSPtr &ln) { ln_ = ln;
return *
this; }
1212 SndHeartbeatReqData &setRemoteNode(RemoteNodeSPtr &rn) { rn_ = rn;
return *
this; }
1218 typedef SndHeartbeatReqData *SndHeartbeatReqDataPtr;
1225 class RcvdHeartbeatReqData
1228 RcvdHeartbeatReqData()
1232 RcvdHeartbeatReqData(
const RcvdHeartbeatReqData &hb)
1235 started_ = hb.started_;
1238 AppMsgNodeReqPtr req()
const {
return am_; }
1239 const ETime &startTime()
const {
return started_; }
1241 RcvdHeartbeatReqData &setReq(AppMsgNodeReqPtr am) { am_ = am;
return *
this;}
1242 RcvdHeartbeatReqData &setStartTime(
const ETime &started) { started_ = started;
return *
this; }
1245 AppMsgNodeReqPtr am_;
1248 typedef RcvdHeartbeatReqData *RcvdHeartbeatReqDataPtr;
1255 class SndHeartbeatRspData
1258 SndHeartbeatRspData()
1262 SndHeartbeatRspData(AppMsgNodeReqPtr am)
1269 SndHeartbeatRspData &setReq(AppMsgNodeReqPtr am) { am_ = am;
return *
this; }
1272 AppMsgNodeReqPtr am_;
1274 typedef SndHeartbeatRspData *SndHeartbeatRspDataPtr;
1281 class RcvdHeartbeatRspData
1284 RcvdHeartbeatRspData()
1288 RcvdHeartbeatRspData(AppMsgNodeReqPtr am)
1292 ~RcvdHeartbeatRspData()
1302 const ETime &startTime()
const {
return started_; }
1304 RcvdHeartbeatRspData &setReq(AppMsgNodeReqPtr am) { am_ = am;
return *
this; }
1305 RcvdHeartbeatRspData &setStartTime(
const ETime &started) { started_ = started;
return *
this; }
1308 AppMsgNodeReqPtr am_;
1311 typedef RcvdHeartbeatRspData *RcvdHeartbeatRspDataPtr;
1320 class TranslatorMsgInfo;
1328 mc_(MsgClass::Unknown),
1334 InternalMsg(
const InternalMsg &im)
1345 assign(im.data_, im.len_);
1347 InternalMsg(
const LocalNodeSPtr &ln,
const RemoteNodeSPtr &rn,
const TranslatorMsgInfo &tmi, cpUChar data, UShort len);
1348 virtual ~InternalMsg()
1350 if (data_ !=
nullptr)
1354 InternalMsg &operator=(
const InternalMsg &im)
1363 assign(im.data_, im.len_);
1367 LocalNodeSPtr &localNode() {
return ln_; }
1368 RemoteNodeSPtr &remoteNode() {
return rn_; }
1369 SessionBaseSPtr &session() {
return ses_; }
1370 ULong seqNbr()
const {
return seq_; }
1371 MsgType msgType()
const {
return mt_; }
1372 MsgClass msgClass()
const {
return mc_; }
1373 Bool isReq()
const {
return rqst_; }
1374 UChar version()
const {
return ver_; }
1375 cpUChar data()
const {
return data_; }
1376 UShort len()
const {
return len_; }
1378 InternalMsg &setLocalNode(
const LocalNodeSPtr &ln) { ln_ = ln;
return *
this; }
1379 InternalMsg &setRemoteNode(
const RemoteNodeSPtr &rn) { rn_ = rn;
return *
this; }
1380 InternalMsg &setSession(
const SessionBaseSPtr &ses) { ses_ = ses;
return *
this; }
1381 InternalMsg &setSeqNbr(
const ULong sn) { seq_ = sn;
return *
this; }
1382 InternalMsg &setMsgType(
const MsgType mt) { mt_ = mt;
return *
this; }
1383 InternalMsg &setMsgClass(
const MsgClass mc) { mc_ = mc;
return *
this; }
1384 InternalMsg &setIsReq(
const Bool rqst) { rqst_ = rqst;
return *
this; }
1385 InternalMsg &setVersion(
const UChar ver) { ver_ = ver;
return *
this; }
1387 InternalMsg &assign(cpUChar data, UShort len)
1392 if (data_ !=
nullptr)
1397 data_ =
new UChar[len_];
1399 catch(
const std::bad_alloc& e)
1401 throw InternalMsg_OutOfMemory();
1405 std::memcpy(data_, data, len);
1409 static void*
operator new(
size_t sz);
1410 static void operator delete(
void* m);
1416 SessionBaseSPtr ses_;
1426 typedef InternalMsg *InternalMsgPtr;
1433 class RspOut :
public InternalMsg
1440 RspOut(
const RspOut &sr)
1450 RspOut &operator=(
const RspOut &ro)
1452 InternalMsg::operator=(ro);
1457 AppMsgRspPtr rsp()
const {
return am_; }
1458 RspOut &setRsp(AppMsgRspPtr am) { am_ = am;
return *
this; }
1463 typedef RspOut *RspOutPtr;
1470 class RspIn :
public InternalMsg
1478 RspIn(
const RspIn &ri)
1484 RspIn(
const LocalNodeSPtr &ln,
const RemoteNodeSPtr &rn,
const TranslatorMsgInfo &tmi, cpUChar data, UShort len, AppMsgReqPtr am)
1485 : InternalMsg(ln, rn, tmi, data, len),
1493 RspIn &operator=(
const RspIn &ri)
1495 InternalMsg::operator=(ri);
1500 AppMsgReqPtr req()
const {
return am_; }
1501 RspIn &setReq(AppMsgReqPtr am) { am_ = am;
return *
this; }
1503 Seid remoteSeid()
const {
return rs_; }
1504 RspIn &remoteSeid(Seid rs) { rs_ = rs;
return *
this; }
1506 const ETime &remoteStartTime() {
return rst_; }
1507 RspIn &remoteStartTime(
const ETime &rst) { rst_ = rst;
return *
this; }
1513 typedef RspIn *RspInPtr;
1520 class ReqOut :
public InternalMsg
1532 ReqOut(
const ReqOut &ro)
1550 ReqOut &operator=(
const ReqOut &ro)
1552 InternalMsg::operator=(ro);
1561 AppMsgReqPtr appMsg() {
return am_; }
1562 ReqOut &setAppMsg(AppMsgReqPtr am)
1573 Bool okToSnd() {
if (n1_ < 1)
return False; n1_--;
return True; }
1575 Int n1()
const {
return n1_; }
1576 ReqOut &setN1(Int n1) { n1_ = n1;
return *
this; }
1578 LongLong t1()
const {
return t1_; }
1579 ReqOut &setT1(LongLong t1) { t1_ = t1;
return *
this; }
1581 Int rspWnd()
const {
return rw_; }
1582 ReqOut &setRspWnd(Int rw) { rw_ = rw;
return *
this; }
1607 class ReqIn :
public InternalMsg
1614 ReqIn(
const ReqIn &ri)
1619 ReqIn(
const LocalNodeSPtr &ln,
const RemoteNodeSPtr &rn,
const TranslatorMsgInfo &tmi, cpUChar data, UShort len)
1620 : InternalMsg(ln, rn, tmi, data, len)
1627 Seid remoteSeid() {
return rs_; }
1628 ReqIn &remoteSeid(Seid rs) { rs_ = rs;
return *
this; }
1630 const ETime &remoteStartTime() {
return rst_; }
1631 ReqIn &remoteStartTime(
const ETime &rst) { rst_ = rst;
return *
this; }
1636 typedef ReqIn *ReqInPtr;
1650 application structure allocated by EncoderDecoder based on msg type
1674 Snding a Req (ReqOut)
1675 add ReqOut
object local
Node retransmission list (seqnbr is key)
1677 perform
"retransmission timer expiration" procedure
1678 start retransmission timer
1680 retransmission timer expiration
1682 send ReqMsgPtr to application layer indicating rsp timeout
1683 remove SentReq from retransmission list
1687 start expiration timer
1690 Lookup seqNbr in ReqIn list of remote
Node 1695 create
RcvdReq with seqNbr, rspWnd=0
1697 send EncodedMsg to EcDc layer to decoding
1700 Lookup sequence in ReqIn list of the remote node
1702 update rspWnd in ReqIn to the current wnd
1708 lookup ReqOut in local
Node retransmission list (seqNbr)
1710 set ReqOut rspWnd to current wnd
1711 create RspIn and send to EcDc layer to decode
1718 perform partial header parsing (seqNbr, isReq)
1720 go to Receiving a Req
1722 go to Receiving a Reponse
1731 inline TeidRangeManager_InvalidRangeBits::TeidRangeManager_InvalidRangeBits() {
1732 setText(
"The number of range bits must be between 0 and 7");
1735 class TeidRangeManager
1738 TeidRangeManager(Int rangeBits=0);
1739 ~TeidRangeManager();
1741 Bool assign(RemoteNodeSPtr &n);
1742 Void release(RemoteNodeSPtr &n);
1746 std::list<Int> free_;
1747 std::unordered_map<Int,RemoteNodeSPtr> used_;
1755 class TranslatorMsgInfo
1767 Seid seid()
const {
return seid_; }
1768 MsgType msgType()
const {
return mt_; }
1769 MsgClass msgClass()
const {
return mc_; }
1770 ULong seqNbr()
const {
return sn_; }
1771 UChar version()
const {
return ver_; }
1772 Bool isReq()
const {
return rqst_; }
1773 Bool createSession()
const {
return create_; }
1775 TranslatorMsgInfo &setSeid(
const Seid seid) { seid_ = seid;
return *
this; }
1776 TranslatorMsgInfo &setMsgType(
const MsgType mt) { mt_ = mt;
return *
this; }
1777 TranslatorMsgInfo &setMsgClass(
const MsgClass mc) { mc_ = mc;
return *
this; }
1778 TranslatorMsgInfo &setSeqNbr(
const ULong sn) { sn_ = sn;
return *
this; }
1779 TranslatorMsgInfo &setVersion(UChar ver) { ver_ = ver;
return *
this; }
1780 TranslatorMsgInfo &setReq(Bool rqst) { rqst_ = rqst;
return *
this; }
1781 TranslatorMsgInfo &setCreateSession(Bool create) { create_ = create;
return *
this; }
1811 virtual ReqOutPtr encodeHeartbeatReq(SndHeartbeatReqData &hb) = 0;
1815 virtual RspOutPtr encodeHeartbeatRsp(SndHeartbeatRspData &hb) = 0;
1819 virtual RspOutPtr encodeVersionNotSupportedRsp(ReqInPtr msg) = 0;
1825 virtual ReqOutPtr encodeReq(AppMsgReqPtr msg) = 0;
1830 virtual RspOutPtr encodeRsp(AppMsgRspPtr msg) = 0;
1835 virtual AppMsgReqPtr decodeReq(ReqInPtr msg) = 0;
1839 virtual AppMsgRspPtr decodeRsp(RspInPtr msg) = 0;
1844 virtual RcvdHeartbeatReqDataPtr decodeHeartbeatReq(ReqInPtr msg) = 0;
1848 virtual RcvdHeartbeatRspDataPtr decodeHeartbeatRsp(RspInPtr msg) = 0;
1854 virtual Void getMsgInfo(TranslatorMsgInfo &info, cpUChar msg, Int len) = 0;
1857 virtual Bool isVersionSupported(UChar ver) = 0;
1860 virtual MsgClass messageClass(MsgType mt) = 0;
1864 virtual MsgType pfcpHeartbeatReq() = 0;
1867 virtual MsgType pfcpHeartbeatRsp() = 0;
1870 virtual MsgType pfcpSessionEstablishmentReq() = 0;
1873 virtual MsgType pfcpSessionEstablishmentRsp() = 0;
1876 virtual MsgType pfcpAssociationSetupReq() = 0;
1879 virtual MsgType pfcpAssociationSetupRsp() = 0;
1883 pUChar data() {
return data_; }
1887 UChar data_[ESocket::UPD_MAX_MSG_LENGTH];
1895 struct SndReqExceptionData
1898 SndReqException err;
1900 typedef SndReqExceptionData *SndReqExceptionDataPtr;
1903 struct SndRspExceptionData
1906 SndRspException err;
1908 typedef SndRspExceptionData *SndRspExceptionDataPtr;
1911 struct SndHeartbeatReqExceptionData
1913 SndHeartbeatReqDataPtr req;
1914 SndHeartbeatReqException err;
1916 typedef SndHeartbeatReqExceptionData *SndHeartbeatReqExceptionDataPtr;
1919 struct SndHeartbeatRspExceptionData
1921 SndHeartbeatRspDataPtr rsp;
1922 SndHeartbeatRspException err;
1924 typedef SndHeartbeatRspExceptionData *SndHeartbeatRspExceptionDataPtr;
1927 struct RcvdReqExceptionData
1930 RcvdReqException err;
1932 typedef RcvdReqExceptionData *RcvdReqExceptionDataPtr;
1935 struct RcvdRspExceptionData
1938 RcvdRspException err;
1940 typedef RcvdRspExceptionData *RcvdRspExceptionDataPtr;
1943 struct EncodeReqExceptionData
1946 EncodeReqException err;
1948 typedef EncodeReqExceptionData *EncodeReqExceptionDataPtr;
1951 struct EncodeRspExceptionData
1954 EncodeRspException err;
1956 typedef EncodeRspExceptionData *EncodeRspExceptionDataPtr;
1963 #define APPLICATION_BASE_EVENT (EM_USER + 10000) 1970 RcvdReq = (APPLICATION_BASE_EVENT + 1),
1972 RcvdRsp = (APPLICATION_BASE_EVENT + 2),
1999 DECLARE_ERROR(ApplicationWorkGroup_UnrecognizedAddressFamily);
2005 friend CommunicationThread;
2009 virtual LocalNodeSPtr _createLocalNode() = 0;
2013 virtual RemoteNodeSPtr _createRemoteNode() = 0;
2017 virtual SessionBaseSPtr _createSession(LocalNodeSPtr &ln, RemoteNodeSPtr &rn) = 0;
2022 template <
class TWorker>
2025 friend CommunicationThread;
2035 return createLocalNode(addr, start);
2046 throw ApplicationWorkGroup_UnrecognizedAddressFamily();
2049 return createLocalNode(addr, start);
2060 Void startLocalNode(LocalNodeSPtr &ln);
2063 Void stopLocalNode(LocalNodeSPtr &ln);
2079 virtual Void onInit();
2083 virtual Void onQuit();
2087 virtual Void onRcvdReq(AppMsgReqPtr req);
2090 virtual Void onRcvdRsp(AppMsgRspPtr rsp);
2095 virtual Void onReqTimeout(AppMsgReqPtr req);
2108 virtual Void onRemoteNodeRestart(RemoteNodeSPtr &rn,
const ETime &restartTime);
2112 virtual Void onSndReqError(AppMsgReqPtr req, SndReqException &err);
2117 virtual Void onSndRspError(AppMsgRspPtr rsp, SndRspException &err);
2122 virtual Void onEncodeReqError(AppMsgReqPtr req, EncodeReqException &err);
2127 virtual Void onEncodeRspError(AppMsgRspPtr rsp, EncodeRspException &err);
2165 #define TRANSLATION_BASE_EVENT (EM_USER + 20000) 2173 enum class Events : UInt
2175 SndMsg = (TRANSLATION_BASE_EVENT + 1),
2176 RcvdReq = (TRANSLATION_BASE_EVENT + 2),
2177 RcvdRsp = (TRANSLATION_BASE_EVENT + 3),
2178 SndHeartbeatReq = (TRANSLATION_BASE_EVENT + 4),
2179 SndHeartbeatRsp = (TRANSLATION_BASE_EVENT + 5)
2182 ~TranslationThread();
2184 static TranslationThread &Instance()
2186 if (this_ ==
nullptr)
2187 this_ =
new TranslationThread();
2215 static Void cleanup()
2222 static TranslationThread *this_;
2223 TranslationThread();
2232 #define COMMUNICATION_BASE_EVENT (EM_USER + 30000) 2237 friend TranslationThread;
2239 enum class Events : UInt
2241 SndReq = (COMMUNICATION_BASE_EVENT + 1),
2242 SndRsp = (COMMUNICATION_BASE_EVENT + 2),
2243 HeartbeatReq = (COMMUNICATION_BASE_EVENT + 3),
2244 HeartbeatRsp = (COMMUNICATION_BASE_EVENT + 4),
2245 SndHeartbeatReqError = (COMMUNICATION_BASE_EVENT + 5),
2246 SndHeartbeatRspError = (COMMUNICATION_BASE_EVENT + 6),
2247 RcvdReqError = (COMMUNICATION_BASE_EVENT + 7),
2248 RcvdRspError = (COMMUNICATION_BASE_EVENT + 8),
2250 AddSession = (COMMUNICATION_BASE_EVENT + 10),
2251 DelSession = (COMMUNICATION_BASE_EVENT + 11),
2252 DelNxtRmtSession = (COMMUNICATION_BASE_EVENT + 12)
2255 ~CommunicationThread();
2257 static CommunicationThread &Instance()
2259 if (this_ ==
nullptr)
2260 this_ =
new CommunicationThread();
2271 CommunicationThread &setAddress(
const ESocket::Address &address) { address_ = address;
return *
this; }
2274 Bool addLocalNode(LocalNodeSPtr &ln)
2277 return lns_.insert(std::make_pair(ln->ipAddress(), ln)).second;
2280 Bool assignTeidRangeValue(RemoteNodeSPtr &rn)
2282 return trm_.assign(rn);
2285 Void releaseTeidRangeValue(RemoteNodeSPtr &rn)
2290 Void startLocalNode(LocalNodeSPtr &ln);
2291 Void stopLocalNode(LocalNodeSPtr &ln);
2295 LocalNodeUMap &localNodes() {
return lns_; }
2297 Void setNbrActivityWnds(
size_t nbr);
2298 Void nextActivityWnd();
2299 size_t currentActivityWnd()
const {
return caw_; }
2301 Int currentRspWnd()
const {
return crw_; }
2306 Void releaseLocalNodes();
2321 Void onHeartbeatReqTimtout(AppMsgReqPtr am);
2323 static Void cleanup()
2330 static const Int rwOne_ = 1;
2331 static const Int rwTwo_ = 2;
2332 static const Int rwToggle_ = (rwOne_ ^ rwTwo_);
2333 static CommunicationThread *this_;
2335 CommunicationThread();
2336 Void addSession(SessionBaseSPtr &s);
2337 Void delSession(SessionBaseSPtr &s);
2340 TeidRangeManager trm_;
2356 static EString __method__ = __METHOD_NAME__;
2369 throw SessionBase_LocalSeidAlreadySet();
2375 throw SessionBase_RemoteSeidAlreadySet();
2381 SEND_TO_COMMUNICATION(AddSession, s2);
2389 SEND_TO_COMMUNICATION(DelSession, s2);
2392 inline InternalMsg::InternalMsg(
const LocalNodeSPtr &ln,
const RemoteNodeSPtr &rn,
const TranslatorMsgInfo &tmi, cpUChar data, UShort len)
2397 mc_(tmi.msgClass()),
2399 ver_(tmi.version()),
2406 inline Void ReqOut::startT1()
2410 static_cast<UInt>(CommunicationThread::Events::ReqTimeout),
2411 static_cast<pVoid>(
this));
2415 inline Bool RemoteNode::setRcvdReqRspWnd(ULong sn)
2417 return setRcvdReqRspWnd(sn, PFCP::CommunicationThread::Instance().currentRspWnd());
2420 template<
class TWorker>
2423 return CommunicationThread::Instance().createLocalNode(addr, start);
2426 template<
class TWorker>
2429 CommunicationThread::Instance().startLocalNode(ln);
2432 template<
class TWorker>
2435 CommunicationThread::Instance().stopLocalNode(ln);
2438 inline void* InternalMsg::operator
new(
size_t sz)
2440 if (pool_.allocSize() == 0)
2443 if (
sizeof(RspOut) > as) as =
sizeof(RspOut);
2444 if (
sizeof(RspIn) > as) as =
sizeof(RspIn);
2445 if (
sizeof(ReqOut) > as) as =
sizeof(ReqOut);
2446 if (
sizeof(ReqIn) > as) as =
sizeof(ReqIn);
2450 bs += bs %
sizeof(pVoid);
2451 size_t bc = ns / bs;
2453 pool_.setSize(as, ns);
2455 if (sz > pool_.allocSize())
2459 ex.
setText(
"internal message allocation size is larger than memory pool block size");
2462 return pool_.allocate();
2465 inline void InternalMsg::operator
delete(
void* m)
2467 pool_.deallocate(m);
2476 struct hash<PFCP::RemoteNodeSPtr>
2478 std::size_t operator()(
const PFCP::RemoteNodeSPtr &rn)
const noexcept
2487 #endif // #ifndef __EPFCP_H LocalNodeStateChange - CommunicationThread –> ApplicationWorkGroup - *LocalNodeStateChangeEvent.
LocalNode::State oldState() const
Definition: epfcp.h:872
static LongLong setT1(LongLong t1)
Definition: epfcp.h:133
AppMsgSessionRsp()
Default construtor.
Definition: epfcp.h:1158
static Int setMaxApplicationWorkers(Int w)
Definition: epfcp.h:168
const EIpAddress & address() const
Retrieves the IP address object associated with the FqSeid.
Definition: epfcp.h:303
std::unordered_map< EIpAddress, LocalNodeSPtr > LocalNodeUMap
Definition: epfcp.h:857
const struct sockaddr_storage & getSockAddrStorage() const
Retrieves a sockaddr pointer to the socket address.
Definition: esocket.h:214
LocalNodeSPtr & localNode()
Returns a reference to the local node object for this message.
Definition: epfcp.h:1091
RemoteNode::State oldState() const
Definition: epfcp.h:706
Node & setAddress(const ESocket::Address &addr)
Assigns the ESocket::Address object representing the IP address for this node.
Definition: epfcp.h:550
static Int setHeartbeatN1(Int hbn1)
Definition: epfcp.h:142
virtual ~AppMsgNodeReq()
Class destructor.
Definition: epfcp.h:1015
#define True
True.
Definition: ebase.h:25
static Long setLenActivityWnd(Long law)
Definition: epfcp.h:150
AppMsgNodeRsp * AppMsgNodeRspPtr
Definition: epfcp.h:1148
static LongLong t1()
Definition: epfcp.h:132
AppMsgRsp()
Default construtor.
Definition: epfcp.h:1066
Void stopLocalNode(LocalNodeSPtr &ln)
Stops the local node.
DecodeReqError - TranslationThread –> ApplicationWorkGroup - DecodeReqExceptionDataPtr.
ApplicationEvents
The events that will be received by the application work group.
Definition: epfcp.h:1967
Work group template definition. The work group contains the event queue that all of the associated wo...
Definition: etevent.h:1704
RemoteNodeSPtr & remoteNode()
Returns a reference to the remote node object for this message.
Definition: epfcp.h:967
static ETime Now()
Retrieves the current time.
Definition: etime.cpp:1147
EncodeRspError - TranslationThread –> ApplicationWorkGroup - EncodeRspExceptionDataPtr.
SndRspError - CommunicationThread –> ApplicationWorkGroup - SndRspExceptionDataPtr.
State
Definition: epfcp.h:627
SessionBase(LocalNodeSPtr &ln, RemoteNodeSPtr &rn)
Class constructor.
Definition: epfcp.h:413
static Int teidRangeBits()
Definition: epfcp.h:158
The PFCP Translator is used to encode and decode PFCP messages. This is a pure virtual base class tha...
Definition: epfcp.h:1800
std::pair< EIpAddress, LocalNodeSPtr > LocalNodeUMapEIpAddressPair
Definition: epfcp.h:858
std::shared_ptr< Node > NodeSPtr
Definition: epfcp.h:612
base class for EThreadPrivate and EThreadPublic
Definition: etevent.h:1062
const ETime & startTime() const
Returns the Node start time.
Definition: epfcp.h:559
RemoteNodeRestartEvent(RemoteNodeSPtr &rn, RemoteNode::State oldst, RemoteNode::State newst, const ETime &restartTime)
Definition: epfcp.h:719
static Long lenActivityWnd()
Definition: epfcp.h:149
static ULongLong nodesCreated()
Definition: epfcp.h:576
LocalNode::State newState() const
Definition: epfcp.h:873
PFCP stack namespace.
Definition: epfcp.h:35
virtual ~AppMsgRsp()
Class destructor.
Definition: epfcp.h:1080
static Void setApplication(ApplicationWorkGroup< TWorker > &app)
Definition: epfcp.h:177
static ApplicationWorkGroupBase & baseApplication()
Definition: epfcp.h:188
LocalNodeSPtr createLocalNode(const EIpAddress &ipaddr, UShort port=PFCP::Configuration::port(), Bool start=True)
Definition: epfcp.h:2037
AppMsgSessionRsp * AppMsgSessionRspPtr
Definition: epfcp.h:1185
AppMsgReq(LocalNodeSPtr &ln, RemoteNodeSPtr &rn, Bool allocSeqNbr)
Class constructor.
Definition: epfcp.h:978
Void setSevere()
Sets the severity level of this error object to "Error".
Definition: eerror.h:237
EncodeReqError - TranslationThread –> ApplicationWorkGroup - EncodeReqExceptionDataPtr.
AppMsgNodeRsp & setReq(AppMsgNodeReqPtr req)
Sets the request message that this response is associated with.
Definition: epfcp.h:1145
MsgClass msgClass() const
Returns the message class for this message (Node or Session).
Definition: epfcp.h:901
const ETime & restartTime() const
Definition: epfcp.h:731
static Int minApplicationWorkers()
Definition: epfcp.h:164
Void setText(cpStr pszText)
Sets the text associated with this error.
Definition: eerror.h:208
Request a write lock for the specified read-write lock object.
Definition: esynch.h:574
ULong alloc()
Assigns the next available sequence number. This operation is thread safe.
Definition: epfcp.h:223
static size_t setNnbrActivityWnds(size_t naw)
Definition: epfcp.h:147
static Int setTeidRangeBits(Int trb)
Definition: epfcp.h:159
static Long maxRspWait()
Definition: epfcp.h:144
static MsgType pfcpHeartbeatReq
Definition: epfcp.h:179
AppMsgRsp(AppMsgReqPtr amrq)
Class constructor.
Definition: epfcp.h:1074
LocalNodeSPtr createLocalNode(cpStr ipaddr, UShort port=PFCP::Configuration::port(), Bool start=True)
Creates a local node.
Definition: epfcp.h:2032
static Bool assignTeidRange()
Definition: epfcp.h:155
AppMsgReqPtr req()
Returns a shared pointer to the request application message.
Definition: epfcp.h:1088
Contains the base functionality for all aplication messages.
Definition: epfcp.h:885
static Int setMinApplicationWorkers(Int w)
Definition: epfcp.h:165
State state()
Gets the state of the local node.
Definition: epfcp.h:764
EIpAddress & setAddress()
Returns a modifiable reference to the IP address.
Definition: epfcp.h:306
AppMsg & setMsgClass(const MsgClass mc)
Definition: epfcp.h:938
SessionBaseSPtr getSession(Seid seid)
Returns the session object for the specified SEID.
Definition: epfcp.h:568
RemoteNodeStateChangeEvent(RemoteNodeSPtr &rn, RemoteNode::State oldst, RemoteNode::State newst)
Definition: epfcp.h:698
static Int setMinTranslatorWorkers(Int w)
Definition: epfcp.h:171
const Seid seid() const
Returns the SEID.
Definition: epfcp.h:310
static ULongLong sessionsDeleted()
Definition: epfcp.h:466
Seid alloc()
Assigns the next available SEID. This operation is thread safe.
Definition: epfcp.h:252
LocalNodeStateChangeEvent(LocalNodeSPtr &ln, LocalNode::State oldst, LocalNode::State newst)
Definition: epfcp.h:864
RcvdReq - TranslationThread –> ApplicationWorkGroup - AppMsgReqPtr.
static _EThreadEventNotification & threadApplication()
Definition: epfcp.h:187
RemoteNode::State oldState() const
Definition: epfcp.h:729
AppMsg(const AppMsg &dm)
Definition: epfcp.h:929
static Int socketBufferSize()
Definition: epfcp.h:129
virtual const EString & className()
Returns the class name for this object.
Definition: epfcp.h:911
Int teidRangeValue() const
Returns the currently configured TEID range value.
Definition: epfcp.h:636
SessionBase & setLocalSeid(SessionBaseSPtr &s, Seid ls)
Sets the local SEID for this session.
Definition: epfcp.h:456
Encapsulates the UDP Socket functionality used to communicate with a PFCP peer.
Definition: epfcp.h:362
SeidManager()
Default constructor.
Definition: epfcp.h:250
Contains the basic Node functionality common to both a LocalNode and a RemoteNode.
Definition: epfcp.h:525
The application worker thread class. The various virtual methods should be overridden to implement ap...
Definition: epfcp.h:2073
static ETimerPool & Instance()
Retrieves the single instance of the ETimerPool object.
Definition: etimerpool.h:70
Represents a request application message.
Definition: epfcp.h:954
static ELogger & setLogger(ELogger &log)
Definition: epfcp.h:153
Represents a response application message.
Definition: epfcp.h:1154
#define False
False.
Definition: ebase.h:27
RemoteNodeSPtr & remoteNode()
Returns a reference to the remote node object for this message.
Definition: epfcp.h:1094
Void free(ULong sn)
Releases a previously allocated sequence number.
Definition: epfcp.h:231
Class for manipulating date and time of day values.
Definition: etime.h:199
Node & setIpAddress(const EIpAddress &ipaddr)
Assigns the IP address for this node.
Definition: epfcp.h:539
RcvdRsp - TranslationThread –> ApplicationWorkGroup - AppMsgRspPtr.
static ULongLong sessionsCreated()
Definition: epfcp.h:465
FqSeid()
Default constructor.
Definition: epfcp.h:279
RemoteNodeStateChange - CommunicationThread –> ApplicationWorkGroup - *RemoteNodeStateChangeEvent.
AppMsgSessionReq * AppMsgSessionReqPtr
Definition: epfcp.h:1056
static Int maxApplicationWorkers()
Definition: epfcp.h:167
SequenceManager()
Default constructor.
Definition: epfcp.h:220
Allocates and deallocates SEID's (PFCP session ID's). Each "slice" should have it's own instance of t...
Definition: epfcp.h:246
Represents a worker thread that is part of a work group.
Definition: etevent.h:1444
AppMsgRsp * AppMsgRspPtr
Definition: epfcp.h:1109
AppMsgReq()
Default constructor.
Definition: epfcp.h:971
static Translator & setTranslator(Translator &xlator)
Definition: epfcp.h:162
static Int heartbeatN1()
Definition: epfcp.h:141
std::pair< EIpAddress, RemoteNodeSPtr > RemoteNodeUMapPair
Definition: epfcp.h:693
The PFCP application work group template. This template contains the common event queue for the appli...
Definition: epfcp.h:2023
Defines the EIpAddress and EIpFilterRule classes.
AppMsgNodeReq()
Default constructor.
Definition: epfcp.h:1002
virtual ~AppMsgReq()
Class destructor.
Definition: epfcp.h:958
static UShort setPort(UShort port)
Definition: epfcp.h:127
static MsgType pfcpAssociationSetupRsp
Definition: epfcp.h:184
AppMsgNodeRsp(AppMsgNodeReqPtr &amrq)
Class constructor.
Definition: epfcp.h:1128
virtual ~Node()
Class destructor.
Definition: epfcp.h:531
static Int minTranslatorWorkers()
Definition: epfcp.h:170
ULong seqNbr() const
Returns the sequence number associated wtih this message.
Definition: epfcp.h:895
Thread timer class.
Definition: etevent.h:828
SndReqError - CommunicationThread –> ApplicationWorkGroup - SndReqExceptionDataPtr.
virtual ~AppMsgSessionReq()
Class destructor.
Definition: epfcp.h:1044
AppMsgNodeRsp()
Default construtor.
Definition: epfcp.h:1119
AppMsg()
Definition: epfcp.h:922
AppMsg * AppMsgPtr
Definition: epfcp.h:948
AppMsgRsp & setReq(AppMsgReq *req)
Sets the request message that this response is associated with.
Definition: epfcp.h:1098
std::shared_ptr< SessionBase > SessionBaseSPtr
Definition: epfcp.h:401
std::unordered_map< Seid, SessionBaseSPtr > SessionBaseSPtrUMap
Definition: epfcp.h:518
A UDP socket class capabile of sending and receiving data.
Definition: esocket.h:1204
Void Uninitialize()
Uninitializes/stops the PFCP stack.
Definition: epfcp.cpp:145
static LongLong heartbeatT1()
Definition: epfcp.h:135
An event message that is to be sent to a thread.
Definition: etevent.h:264
The socket thread base class. An event based thread class capable of surfacing socket events...
Definition: esocket.h:1656
FqSeid & setSeid(Seid seid)
Assigns the SEID value.
Definition: epfcp.h:314
Represents the local PFCP node.
Definition: epfcp.h:750
AppMsg & setSeqNbr(const ULong sn)
Assigns the sequence number for this message.
Definition: epfcp.h:907
#define END_MESSAGE_MAP2()
Ends the message map declaration.
Definition: etevent.h:1433
AppMsgNodeReq * AppMsgNodeReqPtr
Definition: epfcp.h:1020
static Translator & translator()
Definition: epfcp.h:161
LocalNodeSPtr & localNode()
Definition: epfcp.h:871
Void startLocalNode(LocalNodeSPtr &ln)
Startes an externally constructed local node.
AppMsg & setMsgType(const MsgType mt)
Definition: epfcp.h:937
DecodeRspError - TranslationThread –> ApplicationWorkGroup - EncodeRspExceptionDataPtr.
EIpAddress & ipAddress()
Returns the IP address associated with this node.
Definition: epfcp.h:535
LocalNodeSPtr & localNode()
Returns a reference to the local node object for this message.
Definition: epfcp.h:964
Bool isReq() const
Returns True if this message is a request message, otherwise False.
Definition: epfcp.h:903
AppMsgSessionReq()
Default constructor.
Definition: epfcp.h:1030
The base class for exceptions derived from std::exception.
Definition: eerror.h:94
static MsgType pfcpAssociationSetupReq
Definition: epfcp.h:183
Represents an IP address with mask.
Definition: eip.h:40
static MsgType pfcpHeartbeatRsp
Definition: epfcp.h:180
std::pair< ULong, LocalNodeSPtr > LocalNodeUMapULongPair
Definition: epfcp.h:859
State state() const
Returns the current state of the local node.
Definition: epfcp.h:660
RemoteNodeSPtr createRemoteNode(cpStr addr, UShort port)
Creates a remote Node that this local node will "talk" to.
Definition: epfcp.h:786
MsgType msgType() const
Returns the message type for this message.
Definition: epfcp.h:898
Represents a remote or peer PFCP node or host.
Definition: epfcp.h:622
std::unordered_map< EIpAddress, RemoteNodeSPtr > RemoteNodeUMap
Definition: epfcp.h:692
Represents a PFCP session. It is expected that a developer utilizing this library will derive their o...
Definition: epfcp.h:407
Represents a response application message.
Definition: epfcp.h:1115
static Bool setAssignTeidRange(Bool atr)
Definition: epfcp.h:156
const in_addr & ipv4Address() const
Returns a reference to the in_addr structure that represents an IPv4 address.
Definition: eip.h:225
RemoteNodeSPtr & remoteNode()
Returns the RemoteNode object associated with this session.
Definition: epfcp.h:439
virtual ~AppMsgSessionRsp()
Class destructor.
Definition: epfcp.h:1172
const sa_family_t family() const
Returns the address family associated with this address object.
Definition: eip.h:231
static LongLong setHeartbeatT1(LongLong hbt1)
Definition: epfcp.h:136
AppMsgReq * AppMsgReqPtr
Definition: epfcp.h:991
virtual ~SessionBase()
Class destructor.
virtual Void destroy(SessionBaseSPtr &s)
Starts the destruction process for the session.
static Int setN1(Int n1)
Definition: epfcp.h:139
LocalNodeSPtr & localNode()
Returns the LocalNode object associated with this session.
Definition: epfcp.h:436
ETimerPool & unregisterTimer(ULong timerid)
Unregisters an expiration timer.
Definition: etimerpool.cpp:143
static size_t nbrActivityWnds()
Definition: epfcp.h:146
AppMsgSessionReq(SessionBaseSPtr &ses, Bool allocSeqNbr)
Class constructor.
Definition: epfcp.h:1037
ULong registerTimer(LongLong ms, _EThreadEventMessageBase *msg, _EThreadEventNotification ¬ify)
Registers an expiration timer.
Definition: etimerpool.cpp:68
DECLARE_ERROR(SessionBase_LocalSeidAlreadySet)
#define DECLARE_MESSAGE_MAP()
Inserts message map declarations into the thread class.
Definition: etevent.h:1015
static ULongLong nodesDeleted()
Definition: epfcp.h:577
Represents a Fully Qualified SEID. This combines an IP address with a SEID.
Definition: epfcp.h:275
virtual ~AppMsgNodeRsp()
Class destructor.
Definition: epfcp.h:1135
The base socket class.
Definition: esocket.h:441
FqSeid(const FqSeid &fqseid)
Copy constructor.
Definition: epfcp.h:286
static ELogger & logger()
Definition: epfcp.h:152
SessionBase & setRemoteSeid(SessionBaseSPtr &s, Seid rs)
Sets the remote SEID for this session.
Definition: epfcp.h:461
AppMsgNodeReqPtr req()
Returns a shared pointer to the request application message.
Definition: epfcp.h:1141
Represents a request application node message (not associated with a session).
Definition: epfcp.h:998
AppMsg & setIsReq(const Bool rqst)
Definition: epfcp.h:939
Defines a logger.
Definition: elogger.h:76
Allocates and deallocates sequence numbers used in PFCP request messages. Each "slice" should have it...
Definition: epfcp.h:216
static UShort port()
Definition: epfcp.h:126
Contains all of the configuration values used in the PFCP stack.
Definition: epfcp.h:119
State
Definition: epfcp.h:755
NodeSocket & socket()
Returns a reference to the underlying socket object for this local host.
Definition: epfcp.h:806
State state() const
Returns the current state of the local node.
Definition: epfcp.h:810
RemoteNodeRestart - CommunicationThread –> ApplicationWorkGroup - *RemoteNodeRestartEvent.
RemoteNode & setTeidRangeValue(Int trv)
Sets the TEID range value.
Definition: epfcp.h:640
Definition: esocket.h:2205
const Seid remoteSeid() const
Returns the remote SEID associated with this session.
Definition: epfcp.h:445
NodeSocket & clearLocalNode()
Clears the assigned LocalNode.
Definition: epfcp.h:377
Contains the class definitions to support the pool based memory allocation.
#define ON_MESSAGE2(id, memberFxn)
Defines an invidual event handler.
Definition: etevent.h:1429
RemoteNode::State newState() const
Definition: epfcp.h:707
RemoteNode::State newState() const
Definition: epfcp.h:730
AppMsgSessionReqPtr req()
Returns a shared pointer to the request application message.
Definition: epfcp.h:1178
const Seid localSeid() const
Returns the SEID associated with this session.
Definition: epfcp.h:442
AppMsgSessionRsp(AppMsgSessionReqPtr &amrq)
Class constructor.
Definition: epfcp.h:1166
virtual ~AppMsg()
Class destructor.
Definition: epfcp.h:889
SessionBase & setSeid(SessionBaseSPtr &s, Seid ls, Seid rs, Bool notify=True)
Sets the local and remote SEID for this session.
Node()
Default constructor.
Definition: epfcp.h:529
ESocket::Address & address()
Returns the ESocket::Address object representing the IP address for this node.
Definition: epfcp.h:545
RemoteNodeSPtr & remoteNode()
Definition: epfcp.h:705
ReqTimeout - CommunicationThread –> ApplicationWorkGroup - AppMsgReqPtr.
#define DECLARE_ERROR_ADVANCED(__e__)
Declares exception class derived from EError with no constructor parameters and developer defined con...
Definition: eerror.h:61
static Int setMaxTranslatorWorkers(Int w)
Definition: epfcp.h:174
NodeSocket & setLocalNode(LocalNodeSPtr &ln)
Assigns the LocalNode that this socket is associated with.
Definition: epfcp.h:374
const in6_addr & ipv6Address() const
Returns a reference to the in6_addr structure that represents an IPv6 address.
Definition: eip.h:228
SessionBase(const SessionBase &s)
Copy constructor.
Definition: epfcp.h:423
#define BEGIN_MESSAGE_MAP2(theClass, baseClass)
Definition: etevent.h:1415
String class.
Definition: estring.h:31
Encapsulates a sockaddr_storage structure that represents a socket address.
Definition: esocket.h:148
Encapsulates a read-write lock object.
Definition: esynch.h:507
Node & setStartTime(const ETime &st=ETime::Now())
Assigns the Node start time.
Definition: epfcp.h:563
SessionBaseSPtr & session()
Returs a reference to the session shaerd pointer.
Definition: epfcp.h:1050
Void Initialize()
Initializes/starts the PFCP stack. This should be called after setting the initial configuration valu...
Definition: epfcp.cpp:120
static Int n1()
Definition: epfcp.h:138
Represents a response application message.
Definition: epfcp.h:1062
RemoteNodeSPtr & remoteNode()
Definition: epfcp.h:728
static MsgType pfcpSessionEstablishmentReq
Definition: epfcp.h:181
Represents a request application session message.
Definition: epfcp.h:1026
AppMsgSessionRsp & setReq(AppMsgSessionReqPtr req)
Sets the request message that this response is associated with.
Definition: epfcp.h:1182
FqSeid & operator=(const FqSeid &fqseid)
Assignment operator.
Definition: epfcp.h:294
Address & setAddress(cpStr addr, UShort port)
Assigns the socket address.
Definition: esocket.h:307
static Int setSocketBufferSize(Int sz)
Definition: epfcp.h:130
static Int maxTranslatorWorkers()
Definition: epfcp.h:173
static MsgType pfcpSessionEstablishmentRsp
Definition: epfcp.h:182
AppMsgNodeReq(LocalNodeSPtr &ln, RemoteNodeSPtr &rn, Bool allocSeqNbr)
Class constructor.
Definition: epfcp.h:1009
Void free(Seid seid)
Releases a previously allocated SEID.
Definition: epfcp.h:261