EpcTools
An event based multi-threaded C++ development framework.
epcdns.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2017 Sprint
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 
17 #ifndef __EPCDNS_H
18 #define __EPCDNS_H
19 
22 
23 #include <stdio.h>
24 
25 #include <algorithm>
26 #include <string>
27 #include <sstream>
28 #include <list>
29 #include <vector>
30 
31 #include "estring.h"
32 #include "dnscache.h"
33 
35 /*
36  MCC digit 1 - low order nibble octet 1
37  MCC digit 2 - high order nibble octet 1
38  MCC digit 3 - low order nibble octet 2
39 
40  MCC = [MCC digit 1][MCC digit 2][MCC digit 3]
41 
42 
43  MNC digit 1 - low order nibble octet 3
44  MNC digit 2 - high order nibble octet 3
45  MNC digit 3 - high order nibble octet 2, nibble set to 1111 if MNC len is 2
46 
47  MNC = [MNC digit 1][MNC digit 2][MNC digit 3]
48 */
49 
50 #define LOW_NIBBLE(a) (((unsigned char)a) & 0x0f)
51 #define HIGH_NIBBLE(a) ((((unsigned char)a) & 0xf0) >> 4)
52 
53 #define PARSE_MNC(a,b) { \
54  if ( HIGH_NIBBLE(b[1]) == 0x0f ) { \
55  a[0] = '0'; \
56  a[1] = LOW_NIBBLE(b[2]) + '0'; \
57  a[2] = HIGH_NIBBLE(b[2]) + '0'; \
58  a[3] = '\0'; \
59  } else { \
60  a[0] = LOW_NIBBLE(b[2]) + '0'; \
61  a[1] = HIGH_NIBBLE(b[2]) + '0'; \
62  a[2] = HIGH_NIBBLE(b[1]) + '0'; \
63  a[3] = '\0'; \
64  } \
65 }
66 
67 #define PARSE_MCC(a,b) { \
68  a[0] = LOW_NIBBLE(b[0]) + '0'; \
69  a[1] = HIGH_NIBBLE(b[0]) + '0'; \
70  a[2] = LOW_NIBBLE(b[1]) + '0'; \
71  a[3] = '\0'; \
72 }
73 
74 #define PARSE_PLMNID(a) \
75  char mnc[4], mcc[4]; \
76  PARSE_MNC(mnc,a); \
77  PARSE_MCC(mcc,a);
78 
79 #define PARSE_PLMNID_MCC(a) \
80  char mcc[4]; \
81  PARSE_MCC(mcc,a);
82 
83 #define APPEND_MNC(a) append("mnc").append(a).append(".")
84 #define APPEND_MCC(a) append("mcc").append(a).append(".")
85 #define APPEND_3GPPNETWORK append("3gppnetwork.org")
86 
90 
92 namespace EPCDNS
93 {
94  /*
95  * Service and Protocol service names for 3GPP
96  * TS 23.003 V15.5.0, Table 19.4.3.1
97  */
100  {
121  };
122 
125  {
184  };
185 
188  {
213  };
214 
217  {
238  };
239 
242  {
247  };
248 
251  {
266  };
267 
270  {
289  };
290 
293  {
296  };
297 
300  {
307  };
308 
311  {
314  };
315 
318  {
321  /*
322  +------------------+----------------------------+
323  | Tag | Diameter Application |
324  +------------------+----------------------------+
325  | aaa+ap1 | NASREQ [RFC3588] |
326  | aaa+ap2 | Mobile IPv4 [RFC4004] |
327  | aaa+ap3 | Base Accounting [RFC3588] |
328  | aaa+ap4 | Credit Control [RFC4006] |
329  | aaa+ap5 | EAP [RFC4072] |
330  | aaa+ap6 | SIP [RFC4740] |
331  | aaa+ap7 | Mobile IPv6 IKE [RFC5778] |
332  | aaa+ap8 | Mobile IPv6 Auth [RFC5778] |
333  | aaa+ap9 | QoS [RFC5866] |
334  | aaa+ap4294967295 | Relay [RFC3588] |
335  +------------------+----------------------------+
336  */
357  /*
358  +----------------+----------------------+
359  | Tag | Diameter Application |
360  +----------------+----------------------+
361  | aaa+ap16777250 | 3GPP STa [TS29.273] |
362  | aaa+ap16777251 | 3GPP S6a [TS29.272] |
363  | aaa+ap16777264 | 3GPP SWm [TS29.273] |
364  | aaa+ap16777267 | 3GPP S9 [TS29.215] |
365  +----------------+----------------------+
366  */
375  /*
376  +----------------+--------------------------------------------------+
377  | Tag | Diameter Application |
378  +----------------+--------------------------------------------------+
379  | aaa+ap16777281 | WiMAX Network Access Authentication and |
380  | | Authorization Diameter Application (WNAAADA) |
381  | | [WiMAX-BASE] |
382  | aaa+ap16777282 | WiMAX Network Accounting Diameter Application |
383  | | (WNADA) [WiMAX-BASE] |
384  | aaa+ap16777283 | WiMAX MIP4 Diameter Application (WM4DA) |
385  | | [WiMAX-BASE] |
386  | aaa+ap16777284 | WiMAX MIP6 Diameter Application (WM6DA) |
387  | | [WiMAX-BASE] |
388  | aaa+ap16777285 | WiMAX DHCP Diameter Application (WDDA) |
389  | | [WiMAX-BASE] |
390  | aaa+ap16777286 | WiMAX Location Authentication Authorization |
391  | | Diameter Application (WLAADA) [WiMAX-LBS] |
392  | aaa+ap16777287 | WiMAX Policy and Charging Control R3 Policies |
393  | | Diameter Application (WiMAX PCC-R3-P) |
394  | | [WiMAX-PCC] |
395  | aaa+ap16777288 | WiMAX Policy and Charging Control R3 Offline |
396  | | Charging Diameter Application (WiMAX PCC-R3-OFC) |
397  | | [WiMAX-PCC] |
398  | aaa+ap16777289 | WiMAX Policy and Charging Control R3 Offline |
399  | | Charging Prime Diameter Application (WiMAX |
400  | | PCC-R3-OFC-PRIME) [WiMAX-PCC] |
401  | aaa+ap16777290 | WiMAX Policy and Charging Control R3 Online |
402  | | Charging Diameter Application (WiMAX PCC-R3-OC) |
403  | | [WiMAX-PCC] |
404  +----------------+--------------------------------------------------+
405  */
426  };
427 
430  {
439  };
440 
443 
445  class Utility
446  {
447  public:
452  static EString home_network( const char *mnc, const char *mcc );
456  static EString home_network( const unsigned char *plmnid );
461  static EString home_network_gprs( const char *mnc, const char *mcc );
465  static EString home_network_gprs( const unsigned char *plmnid );
472  static EString tai_fqdn( const char *lb, const char *hb, const char *mnc, const char *mcc );
478  static EString tai_fqdn( const char *lb, const char *hb, const unsigned char *plmnid );
485  static EString mme_fqdn( const char *mmec, const char *mmegi, const char *mnc, const char *mcc );
491  static EString mme_fqdn( const char *mmec, const char *mmegi, const unsigned char *plmnid );
497  static EString mme_pool_fqdn( const char *mmegi, const char *mnc, const char *mcc );
502  static EString mme_pool_fqdn( const char *mmegi, const unsigned char *plmnid );
509  static EString rai_fqdn( const char *rac, const char *lac, const char *mnc, const char *mcc );
515  static EString rai_fqdn( const char *rac, const char *lac, const unsigned char *plmnid );
521  static EString rnc_fqdn( const char *rnc, const char *mnc, const char *mcc );
526  static EString rnc_fqdn( const char *rnc, const unsigned char *plmnid );
534  static EString sgsn_fqdn( const char *nri, const char *rac, const char *lac, const char *mnc, const char *mcc );
541  static EString sgsn_fqdn( const char *nri, const char *rac, const char *lac, const unsigned char *plmnid );
546  static EString epc_nodes_domain_fqdn( const char *mnc, const char *mcc );
550  static EString epc_nodes_domain_fqdn( const unsigned char *plmnid );
556  static EString epc_node_fqdn( const char *node, const char *mnc, const char *mcc );
561  static EString epc_node_fqdn( const char *node, const unsigned char *plmnid );
566  static EString nonemergency_epdg_oi_fqdn( const char *mnc, const char *mcc );
570  static EString nonemergency_epdg_oi_fqdn( const unsigned char *plmnid );
577  static EString nonemergency_epdg_tai_fqdn( const char *lb, const char *hb, const char *mnc, const char *mcc );
583  static EString nonemergency_epdg_tai_fqdn( const char *lb, const char *hb, const unsigned char *plmnid );
589  static EString nonemergency_epdg_lac_fqdn( const char *lac, const char *mnc, const char *mcc );
594  static EString nonemergency_epdg_lac_fqdn( const char *lac, const unsigned char *plmnid );
598  static EString nonemergency_epdg_visitedcountry_fqdn( const char *mcc );
602  static EString nonemergency_epdg_visitedcountry_fqdn( const unsigned char *plmnid );
607  static EString emergency_epdg_oi_fqdn( const char *mnc, const char *mcc );
611  static EString emergency_epdg_oi_fqdn( const unsigned char *plmnid );
618  static EString emergency_epdg_tai_fqdn( const char *lb, const char *hb, const char *mnc, const char *mcc );
624  static EString emergency_epdg_tai_fqdn( const char *lb, const char *hb, const unsigned char *plmnid );
630  static EString emergency_epdg_lac_fqdn( const char *lac, const char *mnc, const char *mcc );
635  static EString emergency_epdg_lac_fqdn( const char *lac, const unsigned char *plmnid );
639  static EString emergency_epdg_visitedcountry_fqdn( const char *mcc );
643  static EString emergency_epdg_visitedcountry_fqdn( const unsigned char *plmnid );
649  static EString global_enodeb_id_fqdn( const char *enb, const char *mnc, const char *mcc );
654  static EString global_enodeb_id_fqdn( const char *enb, const unsigned char *plmnid );
659  static EString local_homenetwork_fqdn( const char *lhn, const char *mcc );
664  static EString local_homenetwork_fqdn( const char *lhn, const unsigned char *plmnid );
669  static EString epc( const char *mnc, const char *mcc );
673  static EString epc( const unsigned char *plmnid );
679  static EString apn_fqdn( const char *apn, const char *mnc, const char *mcc );
684  static EString apn_fqdn( const char *apn, const unsigned char *plmnid );
690  static EString apn( const char *apn, const char *mnc, const char *mcc );
695  static EString apn( const char *apn, const unsigned char *plmnid );
696 
700  static AppServiceEnum getAppService( const std::string &s );
704  static AppProtocolEnum getAppProtocol( const std::string &p );
705 
709  static const char *getAppService( AppServiceEnum s );
713  static const char *getAppProtocol( AppProtocolEnum proto );
714 
747 
752  static EString diameter_fqdn( const char *mnc, const char *mcc );
756  static EString diameter_fqdn( const unsigned char *plmnid );
757 
761  static uint32_t getDiameterApplication( DiameterApplicationEnum app );
765  static const char *getDiameterProtocol( DiameterProtocolEnum protocol );
766 
772 
773  private:
774  Utility() {}
775  };
776 
779 
781  class CanonicalNodeName : public std::list<std::string>
782  {
783  public:
788  CanonicalNodeName( const std::string &n );
789 
792  Void setName( const std::string &n );
793 
796  Bool getTopon() { return m_topon; }
799  const EString getName() const { return m_name; }
800 
804  int topologicalCompare( const CanonicalNodeName &right );
805 
808  Void dump( const char *prefix )
809  {
810  std::cout << prefix << "Name - " << m_name << std::endl;
811  std::cout << prefix << "topon - " << (m_topon?"true":"false") << std::endl;
812 
813  std::cout << prefix << "Labels" << std::endl;
814  for ( CanonicalNodeName::const_iterator it = begin(); it != end(); ++it )
815  std::cout << prefix << " " << *it << std::endl;
816  }
817 
818  private:
819  Bool m_topon;
820  EString m_name;
821  };
822 
825 
827  typedef int UsageType;
829 
831  class UsageTypeList : public std::list<UsageType>
832  {
833  public:
836 
839  Void dump( const char *prefix )
840  {
841  for (UsageTypeList::const_iterator it = begin();
842  it != end();
843  ++it)
844  {
845  std::cout << prefix << *it << std::endl;
846  }
847  }
848  };
849 
852 
854  typedef std::string NetworkCapability;
856 
858  class NetworkCapabilityList: public std::list<NetworkCapability>
859  {
860  public:
861 
864  Void dump( const char *prefix )
865  {
866  for (NetworkCapabilityList::const_iterator it = begin();
867  it != end();
868  ++it)
869  {
870  std::cout << prefix << *it << std::endl;
871  }
872  }
873  };
874 
877 
879  class StringVector : public std::vector<std::string>
880  {
881  public:
884  Void dump( const char *prefix )
885  {
886  for (StringVector::const_iterator it = begin();
887  it != end();
888  ++it)
889  {
890  std::cout << prefix << *it << std::endl;
891  }
892  }
893 
895  Void shuffle()
896  {
897  std::random_shuffle ( begin(), end() );
898  }
899  };
900 
903 
906  {
907  public:
909  AppProtocol() { m_protocol = x_unknown; }
912 
915  const EString &getRawProtocol() { return m_rawProtocol; }
918  AppProtocolEnum getProtocol() { return m_protocol; }
921  UsageTypeList &getUsageTypes() { return m_usageTypes; }
924  NetworkCapabilityList &getNetworkCapabilities() { return m_networkCapabilities; }
925 
929  AppProtocolEnum setProtocol( AppProtocolEnum ape ) { return m_protocol = ape; }
933  UsageType addUsageType( UsageType ut ) { m_usageTypes.push_back( ut ); return ut; }
937  NetworkCapability &addNetworkCapability( NetworkCapability &nc ) { m_networkCapabilities.push_back(nc); return m_networkCapabilities.back(); }
938 
941  Void parse( const std::string &rp );
942 
946  Bool findUsageType( UsageType ut )
947  {
948  return std::find( m_usageTypes.begin(), m_usageTypes.end(), ut ) != m_usageTypes.end();
949  }
950 
954  Bool findNetworkCapability( const NetworkCapability &nc )
955  {
956  return std::find( m_networkCapabilities.begin(), m_networkCapabilities.end(), nc ) != m_networkCapabilities.end();
957  }
958 
961  Void dump( const char *prefix = "" )
962  {
963  std::cout << prefix << "Protocol [" << Utility::getAppProtocol( m_protocol );
964  if ( !m_rawProtocol.empty() )
965  std::cout << "/" << m_rawProtocol;
966  std::cout << "] - [";
967  Bool first = true;
968  for ( UsageTypeList::const_iterator it = m_usageTypes.begin(); it != m_usageTypes.end(); ++it )
969  {
970  std::cout << (first?"":",") << *it;
971  first = false;
972  }
973  std::cout << "] - [";
974  first = true;
975  for ( NetworkCapabilityList::const_iterator it = m_networkCapabilities.begin(); it != m_networkCapabilities.end(); ++it )
976  {
977  std::cout << (first?"":",") << *it;
978  first = false;
979  }
980  std::cout << "]" << std::endl;
981  }
982 
983  private:
984  EString m_rawProtocol;
985  AppProtocolEnum m_protocol;
986  UsageTypeList m_usageTypes;
987  NetworkCapabilityList m_networkCapabilities;
988  };
989 
992 
994  class AppProtocolList : public std::list<AppProtocol*>
995  {
996  public:
1001  {
1002  while ( !empty() )
1003  {
1004  AppProtocol *ap = *begin();
1005  erase( begin() );
1006  delete ap;
1007  }
1008  }
1009 
1012  Void dump( const char *prefix )
1013  {
1014  for (AppProtocolList::const_iterator it = begin();
1015  it != end();
1016  ++it)
1017  {
1018  (*it)->dump( prefix );
1019  }
1020  }
1021  };
1022 
1025 
1028  {
1029  public:
1031  AppService() { m_service = x_3gpp_unknown; }
1034  AppService( const std::string &ds ) { parse( ds ); }
1037  {
1038  while ( !m_protocols.empty() )
1039  {
1040  AppProtocol *ap = *m_protocols.begin();
1041  m_protocols.pop_front();
1042  delete ap;
1043  }
1044  }
1045 
1048  AppServiceEnum getService() { return m_service; }
1051  AppProtocolList &getProtocols() { return m_protocols; }
1054  EString &getRawService() { return m_rawService; }
1055 
1058  Void parse( const std::string &ds );
1059 
1064  {
1065  for ( AppProtocolList::const_iterator it = m_protocols.begin(); it != m_protocols.end(); ++it )
1066  {
1067  if ( (*it)->getProtocol() == protocol )
1068  return *it;
1069  }
1070 
1071  return NULL;
1072  }
1073 
1075  Void dump()
1076  {
1077  std::cout << m_rawService << std::endl;
1078  std::cout << " Service [" << Utility::getAppService( m_service ) << "]" << std::endl;
1079  for ( AppProtocolList::const_iterator it = m_protocols.begin(); it != m_protocols.end(); ++it )
1080  {
1081  (*it)->dump( " " );
1082  }
1083  }
1084 
1085  private:
1086 
1087  AppServiceEnum m_service;
1088  AppProtocolList m_protocols;
1089  EString m_rawService;
1090  };
1091 
1094 
1097  {
1098  public:
1101  {
1102  m_order = 0;
1103  m_preference = 0;
1104  m_port = 0;
1105  }
1106 
1109  const EString &getHostname() { return m_hostname; }
1112  uint16_t getOrder() { return m_order; }
1115  uint16_t getPreference() { return m_preference; }
1118  uint16_t getPort() { return m_port; }
1121  AppProtocolList &getSupportedProtocols() { return m_supported_protocols; }
1124  StringVector &getIPv4Hosts() { return m_ipv4_hosts; }
1127  StringVector &getIPv6Hosts() { return m_ipv6_hosts; }
1128 
1132  uint16_t setOrder( uint16_t order ) { return m_order = order; }
1136  uint16_t setPreference( uint16_t preference ) { return m_preference = preference; }
1140  uint16_t setPort( uint16_t port ) { return m_port = port; }
1144  const EString &setHostname( const std::string &hostname ) { m_hostname = hostname; return m_hostname; }
1147  Void addSupportedProtocol( AppProtocol *ap ) { m_supported_protocols.push_back( ap ); }
1150  Void addIPv4Host( const std::string &host ) { m_ipv4_hosts.push_back( host ); }
1153  Void addIPv6Host( const std::string &host ) { m_ipv6_hosts.push_back( host ); }
1154 
1157  Void dump( const char *prefix )
1158  {
1159  std::cout << prefix << "HOSTNAME: " << m_hostname << std::endl;
1160  std::cout << prefix << " order - " << m_order << std::endl;
1161  std::cout << prefix << " preference - " << m_preference << std::endl;
1162  std::cout << prefix << " port - " << m_port << std::endl;
1163 
1164  EString pfx( prefix );
1165  std::cout << prefix << " supported protocols" << std::endl;
1166  pfx.append( " " );
1167  m_supported_protocols.dump( pfx.c_str() );
1168 
1169  std::cout << prefix << " IPv4 HOSTS" << std::endl;
1170  m_ipv4_hosts.dump( pfx.c_str() );
1171 
1172  std::cout << prefix << " IPv6 HOSTS" << std::endl;
1173  m_ipv6_hosts.dump( pfx.c_str() );
1174 
1175  //std::cout << prefix << " Canonical Name" << std::endl;
1176  //m_canonicalname.dump( pfx.c_str() );
1177  }
1178 
1179  private:
1180  EString m_hostname;
1181  uint16_t m_order;
1182  uint16_t m_preference;
1183  uint16_t m_port;
1184  AppProtocolList m_supported_protocols;
1185  StringVector m_ipv4_hosts;
1186  StringVector m_ipv6_hosts;
1187  };
1188 
1191 
1193  class NodeSelectorResultList : public std::list<NodeSelectorResult*>
1194  {
1195  public:
1200  {
1201  while ( !empty() )
1202  {
1203  NodeSelectorResult* nsr = *begin();
1204  erase( begin() );
1205  delete nsr;
1206  }
1207  }
1208 
1211  Void dump( const char *prefix )
1212  {
1213  for (NodeSelectorResultList::const_iterator it = begin();
1214  it != end();
1215  ++it)
1216  {
1217  (*it)->dump( prefix );
1218  }
1219  }
1220 
1225  static Bool sort_compare( NodeSelectorResult*& first, NodeSelectorResult*& second );
1226  };
1227 
1230 
1231  class NodeSelector;
1232  extern "C" typedef Void(*AsyncNodeSelectorCallback)(NodeSelector &ns, cpVoid data);
1233 
1236  {
1237  public:
1240  DNS::namedserverid_t getNamedServerID() { return m_nsid; }
1244  DNS::namedserverid_t setNamedServerID(DNS::namedserverid_t nsid) { return m_nsid = nsid; }
1245 
1248  AppServiceEnum getDesiredService() { return m_desiredService; }
1251  AppProtocolList &getDesiredProtocols() { return m_desiredProtocols; }
1254  const EString &getDomainName() { return m_domain; }
1257  NodeSelectorResultList &getResults() { return m_results; }
1258 
1262  UsageType addDesiredUsageType( UsageType ut ) { m_desiredUsageTypes.push_back( ut ); return ut; }
1266  NetworkCapability &addDesiredNetworkCapability( const char *nc ) { EString s(nc); m_desiredNetworkCapabilities.push_back( s ); return m_desiredNetworkCapabilities.back(); }
1270  NetworkCapability &addDesiredNetworkCapability( NetworkCapability &nc ) { m_desiredNetworkCapabilities.push_back( nc ); return nc; }
1271 
1278  Void process(cpVoid data, AsyncNodeSelectorCallback cb);
1279 
1281  Void dump()
1282  {
1283  std::cout << "NodeSelector REQUEST" << std::endl;
1284  std::cout << " domain - " << m_domain << std::endl;
1285  std::cout << " desired service - " << Utility::getAppService( m_desiredService ) << std::endl;
1286  std::cout << " desired protocols" << std::endl;
1287  m_desiredProtocols.dump( " " );
1288  std::cout << " desired usage types" << std::endl;
1289  m_desiredUsageTypes.dump( " " );
1290  std::cout << " desired network capabilities" << std::endl;
1291  m_desiredNetworkCapabilities.dump( " " );
1292  std::cout << " results" << std::endl;
1293  m_results.dump( " " );
1294  }
1295 
1296  protected:
1298  NodeSelector();
1300  ~NodeSelector();
1301 
1305  AppServiceEnum setAppService( AppServiceEnum s ) { return m_desiredService = s; }
1309  const EString &setDomainName( const std::string &d ) { m_domain = d; return m_domain; }
1312  Void addDesiredProtocol( AppProtocol *ap ) { m_desiredProtocols.push_back( ap ); }
1313 
1314  private:
1315  AppServiceEnum parseService( const std::string &service, std::list<AppProtocolEnum> &protocols ) const;
1316  static Bool naptr_compare( DNS::RRecordNAPTR*& first, DNS::RRecordNAPTR*& second );
1317  NodeSelectorResultList &process(DNS::QueryPtr query, Bool cacheHit);
1318  static Void async_callback(DNS::QueryPtr q, Bool cacheHit, const void *data);
1319 
1320  DNS::namedserverid_t m_nsid;
1321  EString m_domain;
1322  AppServiceEnum m_desiredService;
1323  AppProtocolList m_desiredProtocols;
1324  UsageTypeList m_desiredUsageTypes;
1325  NetworkCapabilityList m_desiredNetworkCapabilities;
1326 
1327  NodeSelectorResultList m_results;
1328  DNS::QueryPtr m_query;
1329  AsyncNodeSelectorCallback m_asynccb;
1330  pVoid m_asyncdata;
1331  };
1332 
1335 
1338  {
1339  public:
1342  {
1351  };
1352 
1356  ColocatedCandidate( NodeSelectorResult &candidate1, NodeSelectorResult &candidate2 );
1357 
1360  NodeSelectorResult &getCandidate1() { return m_candidate1; }
1363  NodeSelectorResult &getCandidate2() { return m_candidate2; }
1372  PairType getPairType() { return m_pairtype; }
1375  int getTopologicalMatches() { return m_topologicalMatches; }
1376 
1379  Void dump( const char *prefix )
1380  {
1381  EString pfx( prefix );
1382  pfx.append( " " );
1383 
1384  std::cout << prefix << "canonical name 1 - " << m_cnn1.getName() << std::endl;
1385  m_candidate1.dump( pfx.c_str() );
1386  std::cout << prefix << "canonical name 2 - " << m_cnn2.getName() << std::endl;
1387  m_candidate2.dump( pfx .c_str());
1388  std::cout << prefix << "pair type - " << (
1389  m_pairtype == ptColocated ? "colocated" :
1390  m_pairtype == ptTopologicalDistance ? "topological distance" :
1391  m_pairtype == ptDNSPriority ? "DNS priority" : "unknown") << std::endl;
1392  std::cout << prefix << "topological matches - " << m_topologicalMatches << std::endl;
1393  }
1394 
1395  private:
1397 
1398  NodeSelectorResult &m_candidate1;
1399  NodeSelectorResult &m_candidate2;
1400  CanonicalNodeName m_cnn1;
1401  CanonicalNodeName m_cnn2;
1402  PairType m_pairtype;
1403  int m_topologicalMatches;
1404  };
1405 
1408 
1410  class ColocatedCandidateList : public std::list<ColocatedCandidate*>
1411  {
1412  public:
1419 
1422  Void dump( const char *prefix = "" )
1423  {
1424  EString pfx1( prefix );
1425  pfx1.append( " " );
1426  EString pfx2( pfx1 );
1427  pfx2.append(" ");
1428 
1429  int candidate = 1;
1430  std::cout << prefix << "candidate list" << std::endl;
1431  for ( ColocatedCandidateList::const_iterator it = begin(); it != end(); ++it )
1432  {
1433  std::cout << pfx1 << "candidate " << candidate++ << std::endl;
1434  (*it)->dump( pfx2.c_str() );
1435  }
1436  }
1437 
1438  private:
1440 
1441  static Bool sort_compare( ColocatedCandidate*& first, ColocatedCandidate*& second );
1442 
1443  NodeSelectorResultList &m_nodelist1;
1444  NodeSelectorResultList &m_nodelist2;
1445  };
1446 
1449 
1452  {
1453  public:
1454 
1460  MMENodeSelector( const char *mmec, const char *mmegi, const char *mnc, const char *mcc )
1461  {
1463  setDomainName( Utility::mme_fqdn( mmec, mmegi, mnc, mcc ) );
1464  }
1465 
1470  MMENodeSelector( const char *mmec, const char *mmegi, const unsigned char *plmnid )
1471  {
1473  setDomainName( Utility::mme_fqdn( mmec, mmegi, plmnid ) );
1474  }
1475 
1480  MMENodeSelector( const char *mmegi, const char *mnc, const char *mcc )
1481  {
1483  setDomainName( Utility::mme_pool_fqdn( mmegi, mnc, mcc ) );
1484  }
1485 
1489  MMENodeSelector( const char *mmegi, const unsigned char *plmnid )
1490  {
1492  setDomainName( Utility::mme_pool_fqdn( mmegi, plmnid ) );
1493  }
1494 
1499  {
1500  AppProtocol *ap = new AppProtocol();
1503  return ap;
1504  }
1505 
1506  private:
1507  MMENodeSelector() {}
1508  };
1509 
1512 
1515  {
1516  public:
1521  PGWNodeSelector( const char *apn, const char *mnc, const char *mcc )
1522  {
1524  setDomainName( Utility::apn_fqdn( apn, mnc, mcc ) );
1525  }
1526 
1530  PGWNodeSelector( const char *apn, const unsigned char *plmnid )
1531  {
1533  setDomainName( Utility::apn_fqdn( apn, plmnid ) );
1534  }
1535 
1540  {
1541  AppProtocol *ap = new AppProtocol();
1544  return ap;
1545  }
1546 
1547  private:
1548  PGWNodeSelector() {}
1549  };
1550 
1553 
1556  {
1557  public:
1562  PGWUPFNodeSelector( const char *apn, const char *mnc, const char *mcc )
1563  {
1565  setDomainName( Utility::apn_fqdn( apn, mnc, mcc ) );
1566  }
1567 
1571  PGWUPFNodeSelector( const char *apn, const unsigned char *plmnid )
1572  {
1574  setDomainName( Utility::apn_fqdn( apn, plmnid ) );
1575  }
1576 
1581  {
1582  AppProtocol *ap = new AppProtocol();
1585  return ap;
1586  }
1587 
1588  private:
1589  PGWUPFNodeSelector() {}
1590  };
1591 
1594 
1597  {
1598  public:
1604  SGWNodeSelector( const unsigned char lb, const unsigned char hb, const char *mnc, const char *mcc )
1605  {
1606  char lbbuf[3];
1607  char hbbuf[3];
1608 
1609  sprintf( lbbuf, "%02x", lb );
1610  sprintf( hbbuf, "%02x", hb );
1611 
1613  setDomainName( Utility::tai_fqdn( lbbuf, hbbuf, mnc, mcc ) );
1614  }
1615 
1620  SGWNodeSelector( unsigned char lb, unsigned char hb, const unsigned char *plmnid )
1621  {
1622  char lbbuf[3];
1623  char hbbuf[3];
1624 
1625  sprintf( lbbuf, "%02x", lb );
1626  sprintf( hbbuf, "%02x", hb );
1627 
1629  setDomainName( Utility::tai_fqdn( lbbuf, hbbuf, plmnid ) );
1630  }
1631 
1637  SGWNodeSelector( const char *lb, const char *hb, const char *mnc, const char *mcc )
1638  {
1640  setDomainName( Utility::tai_fqdn( lb, hb, mnc, mcc ) );
1641  }
1642 
1647  SGWNodeSelector( const char *lb, const char *hb, const unsigned char *plmnid )
1648  {
1650  setDomainName( Utility::tai_fqdn( lb, hb, plmnid ) );
1651  }
1652 
1657  SGWNodeSelector( const char *node, const char *mnc, const char *mcc )
1658  {
1660  setDomainName( Utility::epc_node_fqdn( node, mnc, mcc ) );
1661  }
1662 
1666  SGWNodeSelector( const char *node, const unsigned char *plmnid )
1667  {
1669  setDomainName( Utility::epc_node_fqdn( node, plmnid ) );
1670  }
1671 
1676  {
1677  AppProtocol *ap = new AppProtocol();
1680  return ap;
1681  }
1682 
1683  private:
1684  SGWNodeSelector() {}
1685  };
1686 
1689 
1692  {
1693  public:
1699  SGWUPFNodeSelector( const unsigned char lb, const unsigned char hb, const char *mnc, const char *mcc )
1700  {
1701  char lbbuf[3];
1702  char hbbuf[3];
1703 
1704  sprintf( lbbuf, "%02x", lb );
1705  sprintf( hbbuf, "%02x", hb );
1706 
1708  setDomainName( Utility::tai_fqdn( lbbuf, hbbuf, mnc, mcc ) );
1709  }
1710 
1715  SGWUPFNodeSelector( unsigned char lb, unsigned char hb, const unsigned char *plmnid )
1716  {
1717  char lbbuf[3];
1718  char hbbuf[3];
1719 
1720  sprintf( lbbuf, "%02x", lb );
1721  sprintf( hbbuf, "%02x", hb );
1722 
1724  setDomainName( Utility::tai_fqdn( lbbuf, hbbuf, plmnid ) );
1725  }
1726 
1732  SGWUPFNodeSelector( const char *lb, const char *hb, const char *mnc, const char *mcc )
1733  {
1735  setDomainName( Utility::tai_fqdn( lb, hb, mnc, mcc ) );
1736  }
1737 
1742  SGWUPFNodeSelector( const char *lb, const char *hb, const unsigned char *plmnid )
1743  {
1745  setDomainName( Utility::tai_fqdn( lb, hb, plmnid ) );
1746  }
1747 
1752  SGWUPFNodeSelector( const char *node, const char *mnc, const char *mcc )
1753  {
1755  setDomainName( Utility::epc_node_fqdn( node, mnc, mcc ) );
1756  }
1757 
1761  SGWUPFNodeSelector( const char *node, const unsigned char *plmnid )
1762  {
1764  setDomainName( Utility::epc_node_fqdn( node, plmnid ) );
1765  }
1766 
1771  {
1772  AppProtocol *ap = new AppProtocol();
1775  return ap;
1776  }
1777 
1778  private:
1779  SGWUPFNodeSelector() {}
1780  };
1781 
1784 
1787  {
1788  public:
1793  ENodeBUPFNodeSelector( const char *enb, const char *mnc, const char *mcc )
1794  {
1796  setDomainName( Utility::global_enodeb_id_fqdn( enb, mnc, mcc ) );
1797  }
1798 
1802  ENodeBUPFNodeSelector( const char *enb, const unsigned char *plmnid )
1803  {
1806  }
1807 
1812  {
1813  AppProtocol *ap = new AppProtocol();
1816  return ap;
1817  }
1818 
1819  private:
1821  };
1822 
1825 
1828  {
1829  public:
1835  EpcNodeSelector( const char *node, const char *mnc, const char *mcc, AppServiceEnum appsvc = x_3gpp_any )
1836  {
1837  NodeSelector::setAppService( appsvc );
1838  setDomainName( Utility::epc_node_fqdn( node, mnc, mcc ) );
1839  }
1840 
1845  EpcNodeSelector( const char *node, const unsigned char *plmnid, AppServiceEnum appsvc = x_3gpp_any )
1846  {
1847  NodeSelector::setAppService( appsvc );
1848  setDomainName( Utility::epc_node_fqdn( node, plmnid ) );
1849  }
1850 
1854  EpcNodeSelector( const char *fqdn, AppServiceEnum appsvc = x_3gpp_any )
1855  {
1856  NodeSelector::setAppService( appsvc );
1857  setDomainName( fqdn );
1858  }
1859 
1864  {
1865  AppProtocol *ap = new AppProtocol();
1868  return ap;
1869  }
1870 
1875  {
1877  return *this;
1878  }
1879 
1880  private:
1881  EpcNodeSelector() {}
1882  };
1883 
1886 
1889  {
1896  };
1897 
1900 
1903  {
1904  public:
1908  : m_type( drt )
1909  {
1910  }
1911 
1913  virtual ~DiameterNaptr()
1914  {
1915  }
1916 
1919  DiameterNaptrTypeEnum getType() { return m_type; }
1920 
1923  uint16_t getOrder() { return m_order; }
1927  uint16_t setOrder( uint16_t order ) { return m_order = order; }
1928 
1931  uint16_t getPreference() { return m_order; }
1935  uint16_t setPreference( uint16_t pref ) { return m_preference = pref; }
1936 
1939  const EString &getService() { return m_service; }
1943  const EString &setService( const char *service ) { return m_service = service; }
1947  const EString &setService( const std::string &service ) { return setService( service.c_str() ); }
1948 
1951  const EString &getReplacement() { return m_replacement; }
1955  const EString &setReplacement( const char *replacement ) { return m_replacement = replacement; }
1959  const EString &setReplacement( const std::string &replacement ) { return setReplacement( replacement.c_str() ); }
1960 
1963  Void dump( const char *prefix )
1964  {
1965  std::cout << prefix << "Flags: " << (
1966  m_type == dnt_hostname ? "hostname" :
1967  m_type == dnt_service ? "service" : "unknown") << std::endl;
1968  std::cout << prefix << "Order: " << m_order << std::endl;
1969  std::cout << prefix << "Preference: " << m_preference << std::endl;
1970  std::cout << prefix << "Service: " << m_service << std::endl;
1971  std::cout << prefix << "Replacement: " << m_replacement << std::endl;
1972  }
1973 
1974  private:
1975  DiameterNaptr();
1976 
1977  DiameterNaptrTypeEnum m_type;
1978  uint16_t m_order;
1979  uint16_t m_preference;
1980  EString m_service;
1981  EString m_replacement;
1982  };
1983 
1986 
1989  {
1990  public:
1995  DiameterHost( const char *name ) : m_name( name ) {}
1998  DiameterHost( const std::string &name ) : m_name( name ) {}
1999 
2002  const EString &getName() const { return m_name; }
2006  const EString &setName( const char *name ) { return m_name = name; }
2010  const EString &setName( const std::string &name ) { return setName( name.c_str() ); }
2011 
2014  StringVector &getIPv4Addresses() { return m_ipv4_addrs; }
2017  StringVector &getIPv6Addresses() { return m_ipv6_addrs; }
2018 
2021  Void addIPv4Address( const std::string &addr ) { m_ipv4_addrs.push_back( addr ); }
2024  Void addIPv6Address( const std::string &addr ) { m_ipv6_addrs.push_back( addr ); }
2025 
2028  Void dump( const char *prefix )
2029  {
2030  EString pfx( prefix );
2031  pfx.append( " " );
2032 
2033  std::cout << prefix << "Name: " << m_name << std::endl;
2034  std::cout << prefix << "IPv4 addresses" << std::endl;
2035  m_ipv4_addrs.dump( pfx.c_str() );
2036  std::cout << prefix << "IPv6 addresses" << std::endl;
2037  m_ipv6_addrs.dump( pfx.c_str() );
2038  }
2039 
2040  private:
2041  EString m_name;
2042  StringVector m_ipv4_addrs;
2043  StringVector m_ipv6_addrs;
2044  };
2045 
2048 
2051  {
2052  public:
2057 
2060  uint16_t getPriority() { return m_priority; }
2064  uint16_t setPriority( uint16_t priority ) { return m_priority = priority; }
2065 
2068  uint16_t getWeight() { return m_weight; }
2072  uint16_t setWeight( uint16_t weight ) { return m_weight = weight; }
2073 
2076  uint16_t getPort() { return m_port; }
2080  uint16_t setPort( uint16_t port ) { return m_port = port; }
2081 
2084  DiameterHost &getHost() { return m_host; }
2085 
2088  Void dump( const char *prefix )
2089  {
2090  EString pfx( prefix );
2091 
2092  std::cout << prefix << "Priority: " << m_priority << std::endl;
2093  std::cout << prefix << "Weight: " << m_weight << std::endl;
2094  std::cout << prefix << "Port: " << m_port << std::endl;
2095 
2096  std::cout << prefix << "Diameter Host" << std::endl;
2097  m_host.dump( pfx.c_str() );
2098  }
2099 
2100  private:
2101  uint16_t m_priority;
2102  uint16_t m_weight;
2103  uint16_t m_port;
2104  DiameterHost m_host;
2105  };
2106 
2109 
2111  class DiameterSrvVector : public std::vector<DiameterSrv*>
2112  {
2113  public:
2116  {
2117  while ( !empty() )
2118  {
2119  DiameterSrv *ds = *begin();
2120  erase( begin() );
2121  delete ds;
2122  }
2123  }
2124 
2127  Void dump( const char *prefix )
2128  {
2129  EString pfx( prefix );
2130  pfx.append( " " );
2131 
2132  int cnt = 0;
2133  for (DiameterSrvVector::const_iterator it = begin();
2134  it != end();
2135  ++it)
2136  {
2137  std::cout << prefix << "Diameter SRV " << ++cnt << std::endl;
2138  (*it)->dump( pfx.c_str() );
2139  }
2140  }
2141 
2143  Void sort_vector();
2144 
2145  private:
2146  static Bool sort_compare( DiameterSrv* first, DiameterSrv* second );
2147  };
2148 
2151 
2154  {
2155  public:
2158 
2161  DiameterHost &getHost() { return m_host; }
2162 
2165  Void dump( const char *prefix )
2166  {
2167  EString pfx( prefix );
2168  pfx.append( " " );
2169  DiameterNaptr::dump( prefix );
2170  std::cout << prefix << "Host Information" << std::endl;
2171  m_host.dump( pfx.c_str() );
2172  }
2173 
2174  private:
2175  DiameterHost m_host;
2176  };
2177 
2180 
2183  {
2184  public:
2187 
2190  DiameterSrvVector &getSrvs() { return m_srv; }
2191 
2194  Void dump( const char *prefix )
2195  {
2196  EString pfx( prefix );
2197  pfx.append( " " );
2198  DiameterNaptr::dump( prefix );
2199  std::cout << prefix << "Service Information" << std::endl;
2200  m_srv.dump( pfx.c_str() );
2201  }
2202 
2203  private:
2204  DiameterSrvVector m_srv;
2205  };
2206 
2209 
2211  class DiameterNaptrList : public std::list<DiameterNaptr*>
2212  {
2213  public:
2216  {
2217  while ( !empty() )
2218  {
2219  DiameterNaptr *n = *begin();
2220  erase( begin() );
2221  delete n;
2222  }
2223  }
2224 
2227  Void dump( const char *prefix = "" )
2228  {
2229  for (DiameterNaptrList::const_iterator it = begin();
2230  it != end();
2231  ++it)
2232  {
2233  if ( (*it)->getType() == dnt_hostname )
2234  ((DiameterNaptrA*)*it)->dump( prefix );
2235  if ( (*it)->getType() == dnt_service )
2236  ((DiameterNaptrS*)*it)->dump( prefix );
2237  }
2238  }
2239  };
2240 
2243 
2246  {
2247  public:
2249  DiameterSelector();
2250 
2253  const EString &getRealm() { return m_realm; }
2257  const EString &setRealm( const char *realm ) { return m_realm = realm; }
2262  const EString &setRealm( const char *mnc, const char *mcc ) { return m_realm = Utility::diameter_fqdn( mnc, mcc ); }
2266  const EString &setRealm( const unsigned char *plmnid ) { return m_realm = Utility::diameter_fqdn( plmnid ); }
2267 
2270  DiameterApplicationEnum getApplicataion() { return m_application; }
2274  DiameterApplicationEnum setApplication( DiameterApplicationEnum app ) { return m_application = app; }
2275 
2278  DiameterProtocolEnum getProtocol() { return m_protocol; }
2282  DiameterProtocolEnum setProtocol( DiameterProtocolEnum proto ) { return m_protocol = proto; }
2283 
2286 
2287  private:
2288  EString m_realm;
2289  DiameterApplicationEnum m_application;
2290  DiameterProtocolEnum m_protocol;
2291 
2292  DNS::QueryPtr m_query;
2293  DiameterNaptrList m_results;
2294  };
2295 
2296 } // namespace EPCDNS
2297 
2298 #endif // #ifndef __EPCDNS_H
EPCDNS::x_s2a_pmip
x_s2a_pmip
Definition: epcdns.h:155
EPCDNS::Utility::mme_pool_fqdn
static EString mme_pool_fqdn(const char *mmegi, const char *mnc, const char *mcc)
Constructs the MME pool FQDN.
Definition: epcdns.cpp:106
EPCDNS::ColocatedCandidate::ptColocated
colocated
Definition: epcdns.h:1346
EPCDNS::sgw_x_s8_gtp
x-s8-gtp
Definition: epcdns.h:235
EPCDNS::AppService::getService
AppServiceEnum getService()
Retrieves the application service type.
Definition: epcdns.h:1048
EPCDNS::ColocatedCandidate::PairType
PairType
Pair type.
Definition: epcdns.h:1341
EPCDNS::Utility::diameter_fqdn
static EString diameter_fqdn(const char *mnc, const char *mcc)
Constructs the Diameter FQDN.
Definition: epcdns.cpp:683
EPCDNS::DiameterNaptrList::~DiameterNaptrList
~DiameterNaptrList()
Class destructor.
Definition: epcdns.h:2215
EPCDNS::DiameterNaptrList::dump
Void dump(const char *prefix="")
Prints the contents of this object.
Definition: epcdns.h:2227
EPCDNS::ENodeBUPFNodeSelector
An eNodeB user plane node selector.
Definition: epcdns.h:1786
EPCDNS::NodeSelectorResult::setHostname
const EString & setHostname(const std::string &hostname)
Assigns the host name.
Definition: epcdns.h:1144
dnscache.h
Defines classes related to the DNS cache.
EPCDNS::DiameterNaptrA::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:2165
EPCDNS::DiameterProtocolEnum
DiameterProtocolEnum
The Diameter transport protocols.
Definition: epcdns.h:429
EPCDNS::UsageTypeList::UsageTypeList
UsageTypeList()
Default constructor.
Definition: epcdns.h:835
EPCDNS::AsyncNodeSelectorCallback
Void(* AsyncNodeSelectorCallback)(NodeSelector &ns, cpVoid data)
Definition: epcdns.h:1232
EPCDNS::x_nq
x-nq
Definition: epcdns.h:135
EPCDNS::NodeSelector
contains the information to select a node.
Definition: epcdns.h:1235
EPCDNS::x_s6a
x-s6a
Definition: epcdns.h:171
EPCDNS::NodeSelector::setNamedServerID
DNS::namedserverid_t setNamedServerID(DNS::namedserverid_t nsid)
Assigns the named server ID.
Definition: epcdns.h:1244
EPCDNS::NodeSelector::addDesiredNetworkCapability
NetworkCapability & addDesiredNetworkCapability(NetworkCapability &nc)
Adds a desired network capability to the list of desired network capabilities.
Definition: epcdns.h:1270
EPCDNS::GGSNAppProtocolEnum
GGSNAppProtocolEnum
the GGSN related protocols.
Definition: epcdns.h:241
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(const char *node, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1752
EPCDNS::AppService::AppService
AppService(const std::string &ds)
Class constructor.
Definition: epcdns.h:1034
EPCDNS::AppProtocol::~AppProtocol
~AppProtocol()
Class destructor.
Definition: epcdns.h:911
EPCDNS::x_3gpp_amf
AMF.
Definition: epcdns.h:120
EPCDNS::NodeSelectorResult::addSupportedProtocol
Void addSupportedProtocol(AppProtocol *ap)
Adds the application object to the list.
Definition: epcdns.h:1147
EPCDNS::NodeSelector::NodeSelector
NodeSelector()
Default constructor.
Definition: epcdns.cpp:1057
EPCDNS::AppService::parse
Void parse(const std::string &ds)
Parses an application service string.
Definition: epcdns.cpp:1090
EPCDNS
The namespace for the TS 29.303 related DNS functions.
Definition: epcdns.h:92
EPCDNS::mme_x_s6a
x-s6a
Definition: epcdns.h:286
EPCDNS::CanonicalNodeName::getTopon
Bool getTopon()
Determines if the "topon" feature is enabled for this object.
Definition: epcdns.h:796
EPCDNS::Utility::epc
static EString epc(const char *mnc, const char *mcc)
Constructs the home network realm/domain name.
Definition: epcdns.cpp:447
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(const char *node, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1761
EPCDNS::x_sxa
x-sxa
Definition: epcdns.h:179
EPCDNS::DiameterNaptr::getType
DiameterNaptrTypeEnum getType()
Retrieves the NAPTR type.
Definition: epcdns.h:1919
EPCDNS::x_3gpp_sgsn
SGSN.
Definition: epcdns.h:112
EPCDNS::x_s2c_dsmip
x-s2c-dsmip
Definition: epcdns.h:161
EPCDNS::DiameterSelector
Represents a Diameter selector.
Definition: epcdns.h:2245
EPCDNS::PGWNodeSelector::PGWNodeSelector
PGWNodeSelector(const char *apn, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1530
EPCDNS::DiameterNaptr::getPreference
uint16_t getPreference()
Retrieves the preference value.
Definition: epcdns.h:1931
EPCDNS::Utility::getAppService
static AppServiceEnum getAppService(const std::string &s)
Retrieves the AppServiceEnum value for a given string.
Definition: epcdns.cpp:506
EPCDNS::SGWAppProtocolEnum
SGWAppProtocolEnum
the SGW related protocols.
Definition: epcdns.h:216
EPCDNS::x_s8_gtp
x-s8-gtp
Definition: epcdns.h:173
EPCDNS::DiameterNaptr::setPreference
uint16_t setPreference(uint16_t pref)
Assigns the preference value.
Definition: epcdns.h:1935
EPCDNS::sgw_x_s1_u
x-s1_u
Definition: epcdns.h:219
EPCDNS::sgsn_x_s4
x-s4
Definition: epcdns.h:263
EPCDNS::DiameterSelector::setRealm
const EString & setRealm(const char *mnc, const char *mcc)
Assigns the realm.
Definition: epcdns.h:2262
EPCDNS::AppService::getRawService
EString & getRawService()
Retrieves the raw application service string.
Definition: epcdns.h:1054
EPCDNS::DiameterNaptr::getService
const EString & getService()
Retrieves the service value.
Definition: epcdns.h:1939
EPCDNS::DiameterHost::setName
const EString & setName(const char *name)
Assigns the Diameter host name.
Definition: epcdns.h:2006
EPCDNS::NodeSelector::getDesiredProtocols
AppProtocolList & getDesiredProtocols()
Retrieves the list of application protocols.
Definition: epcdns.h:1251
EPCDNS::x_3gpp_sgw
SGW.
Definition: epcdns.h:108
EPCDNS::mme_x_s1_mme
x-s1-mme
Definition: epcdns.h:282
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(const char *node, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1657
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(unsigned char lb, unsigned char hb, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1715
EPCDNS::EpcNodeSelector::EpcNodeSelector
EpcNodeSelector(const char *node, const unsigned char *plmnid, AppServiceEnum appsvc=x_3gpp_any)
Class constructor.
Definition: epcdns.h:1845
EPCDNS::x_unknown
Unknown.
Definition: epcdns.h:127
EPCDNS::dia_protocol_tcp
TCP.
Definition: epcdns.h:434
EPCDNS::DiameterHost::getName
const EString & getName() const
Retrieves the Diameter host name.
Definition: epcdns.h:2002
EPCDNS::AMFAppProtocolEnum
AMFAppProtocolEnum
the AMF related protocols.
Definition: epcdns.h:310
EPCDNS::sgw_x_s2b_pmip
x-s2b-pmip
Definition: epcdns.h:227
EPCDNS::NodeSelector::dump
Void dump()
Prints the contents of this object.
Definition: epcdns.h:1281
EPCDNS::dia_app_3gpp_swm
3GPP SWm
Definition: epcdns.h:372
EPCDNS::dia_app_sip6
SIP.
Definition: epcdns.h:348
EPCDNS::AppService::~AppService
~AppService()
Class destructor.
Definition: epcdns.h:1036
EPCDNS::NodeSelectorResult::setOrder
uint16_t setOrder(uint16_t order)
Assigns the order value.
Definition: epcdns.h:1132
EPCDNS::ColocatedCandidate::getTopologicalMatches
int getTopologicalMatches()
Retrieves the number of topological matches.
Definition: epcdns.h:1375
EPCDNS::AppProtocol::addUsageType
UsageType addUsageType(UsageType ut)
Adds a usage type object to the usage type list.
Definition: epcdns.h:933
EPCDNS::pgw_x_s8_pmip
x-s8-pmip
Definition: epcdns.h:212
EPCDNS::x_sxb
x-sxb
Definition: epcdns.h:181
EPCDNS::DiameterNaptrA
A Diameter NAPTR A record object.
Definition: epcdns.h:2153
EPCDNS::Utility::apn
static EString apn(const char *apn, const char *mnc, const char *mcc)
Constructs the APN.
Definition: epcdns.cpp:486
EPCDNS::MMEAppProtocolEnum
MMEAppProtocolEnum
the SGSN related protocols.
Definition: epcdns.h:269
EPCDNS::NodeSelectorResult::addIPv4Host
Void addIPv4Host(const std::string &host)
Adds an IPv4 host to the list of IPv4 hosts.
Definition: epcdns.h:1150
EPCDNS::Utility::rnc_fqdn
static EString rnc_fqdn(const char *rnc, const char *mnc, const char *mcc)
Constructs the radio network controller (RNC) FQDN.
Definition: epcdns.cpp:150
EPCDNS::CanonicalNodeName
Canonical node name.
Definition: epcdns.h:781
EPCDNS::DiameterNaptr::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:1963
EPCDNS::Utility::emergency_epdg_oi_fqdn
static EString emergency_epdg_oi_fqdn(const char *mnc, const char *mcc)
Constructs the operator identifier (OI) based emergency ePDG FQDN.
Definition: epcdns.cpp:320
EPCDNS::AppProtocolList::AppProtocolList
AppProtocolList()
Default constructor.
Definition: epcdns.h:998
EPCDNS::MMENodeSelector::MMENodeSelector
MMENodeSelector(const char *mmegi, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1489
EPCDNS::dia_app_wimax_wdda
WiMAX DHCP Diameter Application (WDDA)
Definition: epcdns.h:415
EPCDNS::NodeSelector::addDesiredUsageType
UsageType addDesiredUsageType(UsageType ut)
Adds a desired usage type to the list of desired usage types.
Definition: epcdns.h:1262
EPCDNS::NodeSelectorResult::addIPv6Host
Void addIPv6Host(const std::string &host)
Adds an IPv6 host to the list of IPv6 hosts.
Definition: epcdns.h:1153
EPCDNS::AppProtocolEnum
AppProtocolEnum
3GPP protocols defined in 23.003 v15.5.0, table 19.4.3.1.
Definition: epcdns.h:124
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(const char *lb, const char *hb, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1732
EPCDNS::x_s12
x-s12
Definition: epcdns.h:147
EPCDNS::DiameterSrv::getPort
uint16_t getPort()
Retrieves the IP port.
Definition: epcdns.h:2076
EPCDNS::x_gn
x-gn
Definition: epcdns.h:129
EPCDNS::x_sv
x-sv
Definition: epcdns.h:177
EPCDNS::DiameterHost::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:2028
DNS::RRecordNAPTR
Represents an NAPTR resource record.
Definition: dnsrecord.h:429
EPCDNS::x_sxc
x-sxc
Definition: epcdns.h:183
EPCDNS::pgw_x_s2b_gtp
x-s2b-gtp
Definition: epcdns.h:200
EPCDNS::PGWAppProtocolEnum
PGWAppProtocolEnum
the PGW related protocols.
Definition: epcdns.h:187
EPCDNS::pgw_x_s2a_gtp
x-s2a-gtp
Definition: epcdns.h:194
EPCDNS::Utility::global_enodeb_id_fqdn
static EString global_enodeb_id_fqdn(const char *enb, const char *mnc, const char *mcc)
Constructs the global eNodeB ID.
Definition: epcdns.cpp:405
EPCDNS::Utility::nonemergency_epdg_visitedcountry_fqdn
static EString nonemergency_epdg_visitedcountry_fqdn(const char *mcc)
Constructs the visited country FQDN.
Definition: epcdns.cpp:301
EPCDNS::pgw_x_s2a_mipv4
x-s2a-mipv4
Definition: epcdns.h:196
EPCDNS::EpcNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(PGWAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1863
EPCDNS::MSCAppProtocolEnum
MSCAppProtocolEnum
the MSC related protocols.
Definition: epcdns.h:292
EPCDNS::AppProtocol::AppProtocol
AppProtocol()
Default constructor.
Definition: epcdns.h:909
EPCDNS::ENodeBUPFNodeSelector::ENodeBUPFNodeSelector
ENodeBUPFNodeSelector(const char *enb, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1793
EPCDNS::mme_x_s3
x-s3
Definition: epcdns.h:284
EPCDNS::ColocatedCandidate::ptTopologicalDistance
topological distance
Definition: epcdns.h:1348
EPCDNS::dnt_service
service
Definition: epcdns.h:1895
EPCDNS::dia_app_wimax_pcc_r3_oc
WiMAX Policy and Charging Control R3 Online Charging Diameter Application (WiMAX PCC-R3-OC)
Definition: epcdns.h:425
EPCDNS::AppService::findProtocol
AppProtocol * findProtocol(AppProtocolEnum protocol)
Searches for a specific application protocol object.
Definition: epcdns.h:1063
EPCDNS::DiameterHost::setName
const EString & setName(const std::string &name)
Assigns the Diameter host name.
Definition: epcdns.h:2010
EPCDNS::x_s1_mme
x-s1-mme
Definition: epcdns.h:139
EPCDNS::NodeSelector::getDomainName
const EString & getDomainName()
Retrieves the domain name.
Definition: epcdns.h:1254
EPCDNS::DiameterHost
Represents a diameter host.
Definition: epcdns.h:1988
EPCDNS::DiameterSelector::setRealm
const EString & setRealm(const char *realm)
Assigns the realm.
Definition: epcdns.h:2257
EPCDNS::pgw_x_gp
x-gp
Definition: epcdns.h:192
EPCDNS::DiameterHost::DiameterHost
DiameterHost()
Default constructor.
Definition: epcdns.h:1992
EPCDNS::CanonicalNodeName::topologicalCompare
int topologicalCompare(const CanonicalNodeName &right)
Performs a topological comparison with another CanonicalNodeName object.
Definition: epcdns.cpp:866
EPCDNS::NetworkCapabilityList::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:864
EPCDNS::DiameterSrv::~DiameterSrv
~DiameterSrv()
Class destructor.
Definition: epcdns.h:2056
EPCDNS::dia_app_mobile_ipv4
Mobile IPv4.
Definition: epcdns.h:340
EPCDNS::dnt_hostname
host name
Definition: epcdns.h:1893
EPCDNS::EpcNodeSelector
A EPC node selector.
Definition: epcdns.h:1827
EPCDNS::dia_protocol_tls_tcp
TCP with TLS.
Definition: epcdns.h:438
EPCDNS::NodeSelectorResultList::NodeSelectorResultList
NodeSelectorResultList()
Default constructor.
Definition: epcdns.h:1197
EPCDNS::UsageTypeList::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:839
EPCDNS::dia_app_wimax_pcc_r3_ofc
WiMAX Policy and Charging Control R3 Offline Charging Diameter Application (WiMAX PCC-R3-OFC)
Definition: epcdns.h:421
EPCDNS::NetworkCapabilityList
Represents a list of network capabilities.
Definition: epcdns.h:858
EPCDNS::AppServiceEnum
AppServiceEnum
Service names defined in 23.003 v15.5.0, table 19.4.3.1.
Definition: epcdns.h:99
EPCDNS::DiameterNaptr::setService
const EString & setService(const char *service)
Assigns the service value.
Definition: epcdns.h:1943
EPCDNS::mme_x_sv
x-sv
Definition: epcdns.h:288
EPCDNS::ColocatedCandidate::getCanonicalNodeName2
CanonicalNodeName & getCanonicalNodeName2()
Retrieves the second canonical node name.
Definition: epcdns.h:1369
EPCDNS::ColocatedCandidate::ptUnknown
unknown
Definition: epcdns.h:1344
EPCDNS::x_3gpp_upf
UPF.
Definition: epcdns.h:118
EPCDNS::x_gp
x-gp
Definition: epcdns.h:131
EPCDNS::dia_protocol_unknown
Unknown.
Definition: epcdns.h:432
EPCDNS::Utility::getAppProtocol
static AppProtocolEnum getAppProtocol(const std::string &p)
Retrieves the AppProtocolEnum value for a given string.
Definition: epcdns.cpp:519
EPCDNS::mme_x_s10
x-s10
Definition: epcdns.h:278
EPCDNS::Utility::mme_fqdn
static EString mme_fqdn(const char *mmec, const char *mmegi, const char *mnc, const char *mcc)
Constructs the mobile management entity (MME) FQDN.
Definition: epcdns.cpp:83
EPCDNS::PGWUPFNodeSelector
A PGW user plane node selector.
Definition: epcdns.h:1555
EPCDNS::DiameterNaptr
Diameter name pointer (NAPTR) object.
Definition: epcdns.h:1902
EPCDNS::ColocatedCandidate::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:1379
EPCDNS::NodeSelectorResult
Contains the node selector results.
Definition: epcdns.h:1096
EPCDNS::NodeSelectorResultList
A list of node selector result objects.
Definition: epcdns.h:1193
EPCDNS::upf_x_sxc
x-sxc
Definition: epcdns.h:306
EPCDNS::Utility::nonemergency_epdg_lac_fqdn
static EString nonemergency_epdg_lac_fqdn(const char *lac, const char *mnc, const char *mcc)
Constructs the location area code based ePDG FQDN.
Definition: epcdns.cpp:279
EPCDNS::DiameterNaptrTypeEnum
DiameterNaptrTypeEnum
Diameter name pointer (NAPTR) type.
Definition: epcdns.h:1888
EPCDNS::EpcNodeSelector::EpcNodeSelector
EpcNodeSelector(const char *fqdn, AppServiceEnum appsvc=x_3gpp_any)
Class constructor.
Definition: epcdns.h:1854
EPCDNS::sgw_x_s4
x-s4
Definition: epcdns.h:229
EPCDNS::msc_x_sv
x-sv
Definition: epcdns.h:295
EPCDNS::MMENodeSelector::MMENodeSelector
MMENodeSelector(const char *mmec, const char *mmegi, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1470
EPCDNS::dia_app_wimax_pcc_r3_ofc_prime
WiMAX Policy and Charging Control R3 Offline Charging Prime Diameter Application (WiMAX PCC-R3-OFC-PR...
Definition: epcdns.h:423
EPCDNS::DiameterSrvVector::~DiameterSrvVector
~DiameterSrvVector()
Class destructor.
Definition: epcdns.h:2115
EPCDNS::DiameterSrvVector
Represents a vector (array) of Diameter servers.
Definition: epcdns.h:2111
EPCDNS::DiameterSelector::setApplication
DiameterApplicationEnum setApplication(DiameterApplicationEnum app)
Assigns the applciation type.
Definition: epcdns.h:2274
EPCDNS::ColocatedCandidateList::~ColocatedCandidateList
~ColocatedCandidateList()
Class destructor.
Definition: epcdns.cpp:1184
EPCDNS::DiameterHost::addIPv4Address
Void addIPv4Address(const std::string &addr)
Adds an IPv4 address for this Diameter host.
Definition: epcdns.h:2021
EPCDNS::MMENodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(MMEAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1498
EPCDNS::dnt_unknown
unknown
Definition: epcdns.h:1891
EPCDNS::dia_app_3gpp_s6a
3GPP S6a
Definition: epcdns.h:370
EPCDNS::dia_app_wimax_wnada
WiMAX Network Accounting Diameter Application (WNADA)
Definition: epcdns.h:409
EPCDNS::DiameterNaptrS
A Diameter NAPTR S record object.
Definition: epcdns.h:2182
EPCDNS::ColocatedCandidate::getCandidate2
NodeSelectorResult & getCandidate2()
Retrieves the second candidate node selector result object.
Definition: epcdns.h:1363
EPCDNS::DiameterSrvVector::sort_vector
Void sort_vector()
Sorts the vector (array) of Diameter servers.
Definition: epcdns.cpp:1381
EPCDNS::DiameterNaptr::DiameterNaptr
DiameterNaptr(DiameterNaptrTypeEnum drt)
Class constructor.
Definition: epcdns.h:1907
EPCDNS::x_3gpp_pgw
PGW.
Definition: epcdns.h:106
EPCDNS::NodeSelector::getResults
NodeSelectorResultList & getResults()
Retrieves the node selector results list.
Definition: epcdns.h:1257
EPCDNS::dia_app_relay
Relay.
Definition: epcdns.h:356
EPCDNS::DiameterSelector::getRealm
const EString & getRealm()
Retrieves the realm.
Definition: epcdns.h:2253
EPCDNS::DiameterSelector::getProtocol
DiameterProtocolEnum getProtocol()
Retrieves the protocol type.
Definition: epcdns.h:2278
EPCDNS::NodeSelectorResult::setPort
uint16_t setPort(uint16_t port)
Assigns the IP port.
Definition: epcdns.h:1140
EPCDNS::DiameterHost::getIPv6Addresses
StringVector & getIPv6Addresses()
Retrieves the list of IPv6 addresses for this Diameter host.
Definition: epcdns.h:2017
EPCDNS::sgsn_x_gp
x-gp
Definition: epcdns.h:255
EPCDNS::DiameterNaptr::~DiameterNaptr
virtual ~DiameterNaptr()
Class destructor.
Definition: epcdns.h:1913
EPCDNS::DiameterNaptrS::getSrvs
DiameterSrvVector & getSrvs()
Retrieves the Diameter server.
Definition: epcdns.h:2190
EPCDNS::mme_x_s11
x-s11
Definition: epcdns.h:280
EPCDNS::DiameterNaptrList
A list of Diameter NAPTR objects.
Definition: epcdns.h:2211
EPCDNS::DiameterApplicationEnum
DiameterApplicationEnum
the Diameter application ID's.
Definition: epcdns.h:317
EPCDNS::ColocatedCandidate::ptDNSPriority
DNS priority.
Definition: epcdns.h:1350
EPCDNS::NodeSelector::getNamedServerID
DNS::namedserverid_t getNamedServerID()
Retrieves the named server ID.
Definition: epcdns.h:1240
EPCDNS::pgw_x_s2a_pmip
x-s2a-pmip
Definition: epcdns.h:198
EPCDNS::dia_app_wimax_pcc_r3_p
WiMAX Policy and Charging Control R3 Policies Diameter Application (WiMAX PCC-R3-P)
Definition: epcdns.h:419
EPCDNS::PGWNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(PGWAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1539
EPCDNS::x_3gpp_ggsn
GGSN.
Definition: epcdns.h:110
EPCDNS::Utility::getDiameterService
static EString getDiameterService(DiameterApplicationEnum app, DiameterProtocolEnum protocol)
Constructs the Diameter service string.
Definition: epcdns.cpp:702
EPCDNS::NodeSelectorResultList::~NodeSelectorResultList
~NodeSelectorResultList()
Class destructor.
Definition: epcdns.h:1199
EPCDNS::sgsn_x_sv
x-sv
Definition: epcdns.h:265
EPCDNS::dia_app_3gpp_s9
3GPP S9
Definition: epcdns.h:374
EPCDNS::x_s1_u
x-s1-u
Definition: epcdns.h:141
EPCDNS::Utility::rai_fqdn
static EString rai_fqdn(const char *rac, const char *lac, const char *mnc, const char *mcc)
Constructs the routing area identity (RAI) FQDN.
Definition: epcdns.cpp:127
EPCDNS::x_s3
x-s3
Definition: epcdns.h:163
EPCDNS::ColocatedCandidate::getPairType
PairType getPairType()
Retrieves the pair type.
Definition: epcdns.h:1372
EPCDNS::x_s4
x-s4
Definition: epcdns.h:165
EPCDNS::dia_app_wimax_wlaada
WiMAX Location Authentication Authorization Diameter Application (WLAADA)
Definition: epcdns.h:417
EPCDNS::DiameterHost::addIPv6Address
Void addIPv6Address(const std::string &addr)
Adds an IPv6 address for this Diameter host.
Definition: epcdns.h:2024
EPCDNS::ColocatedCandidateList::dump
Void dump(const char *prefix="")
Prints the contents of this object.
Definition: epcdns.h:1422
EPCDNS::MMENodeSelector::MMENodeSelector
MMENodeSelector(const char *mmegi, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1480
EPCDNS::x_n2
x-n2
Definition: epcdns.h:133
EPCDNS::mme_x_gp
x-gp
Definition: epcdns.h:274
EPCDNS::AppProtocol::getUsageTypes
UsageTypeList & getUsageTypes()
Retrieves the list of usage types.
Definition: epcdns.h:921
EPCDNS::Utility::nonemergency_epdg_tai_fqdn
static EString nonemergency_epdg_tai_fqdn(const char *lb, const char *hb, const char *mnc, const char *mcc)
Constructs the tracking area identity based ePDG FQDN.
Definition: epcdns.cpp:255
EPCDNS::dia_app_base_accounting
Base Accounting.
Definition: epcdns.h:342
EPCDNS::ColocatedCandidateList
A list of colocated candidates.
Definition: epcdns.h:1410
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(const char *node, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1666
EPCDNS::SGSNAppProtocolEnum
SGSNAppProtocolEnum
the SGSN related protocols.
Definition: epcdns.h:250
EPCDNS::ggsn_x_gn
x-gn
Definition: epcdns.h:244
EPCDNS::DiameterHost::DiameterHost
DiameterHost(const char *name)
Class constructor.
Definition: epcdns.h:1995
EPCDNS::DiameterNaptrA::getHost
DiameterHost & getHost()
Retrieves the Diameter host.
Definition: epcdns.h:2161
EPCDNS::DiameterSelector::process
DiameterNaptrList & process()
Performs the lookup of the Diameter hosts.
Definition: epcdns.cpp:1221
EPCDNS::NodeSelectorResult::getIPv6Hosts
StringVector & getIPv6Hosts()
Retrieves the list of IPv6 hosts.
Definition: epcdns.h:1127
EPCDNS::DiameterNaptr::getReplacement
const EString & getReplacement()
Retrieves the replacement value.
Definition: epcdns.h:1951
EPCDNS::SGWNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(SGWAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1675
EPCDNS::NodeSelector::getDesiredService
AppServiceEnum getDesiredService()
Retrieves the desired application service type.
Definition: epcdns.h:1248
EPCDNS::DiameterNaptrA::DiameterNaptrA
DiameterNaptrA()
Default constructor.
Definition: epcdns.h:2157
EPCDNS::NodeSelectorResult::setPreference
uint16_t setPreference(uint16_t preference)
Assigns the preference value.
Definition: epcdns.h:1136
EPCDNS::pgw_x_s8_gtp
x-s8-gtp
Definition: epcdns.h:210
EPCDNS::NodeSelectorResult::getHostname
const EString & getHostname()
Retrieves the host name.
Definition: epcdns.h:1109
EPCDNS::sgw_x_s12
x-s12
Definition: epcdns.h:223
EPCDNS::NodeSelectorResult::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:1157
EPCDNS::dia_app_unknown
unknown
Definition: epcdns.h:320
EPCDNS::DiameterNaptrS::DiameterNaptrS
DiameterNaptrS()
Default constructor.
Definition: epcdns.h:2186
EPCDNS::dia_app_wimax_wm4da
WiMAX MIP4 Diameter Application (WM4DA)
Definition: epcdns.h:411
EPCDNS::MMENodeSelector
A MME node selector.
Definition: epcdns.h:1451
EPCDNS::AppProtocol::parse
Void parse(const std::string &rp)
Parses any usage types and network capabilities.
Definition: epcdns.cpp:1113
EPCDNS::x_s10
x-s10
Definition: epcdns.h:143
EPCDNS::sgsn_x_nqprime
x-nqprime
Definition: epcdns.h:257
EPCDNS::Utility
Provides several utilities for manipulating names, services and protocols.
Definition: epcdns.h:445
EPCDNS::CanonicalNodeName::setName
Void setName(const std::string &n)
Assigns the canonical node name.
Definition: epcdns.cpp:817
EPCDNS::sgw_x_s11
x-s11
Definition: epcdns.h:221
EPCDNS::Utility::epc_nodes_domain_fqdn
static EString epc_nodes_domain_fqdn(const char *mnc, const char *mcc)
Constructs the EPC nodes subdomain (DNS zone).
Definition: epcdns.cpp:196
EPCDNS::NodeSelectorResultList::sort_compare
static Bool sort_compare(NodeSelectorResult *&first, NodeSelectorResult *&second)
A comparison function used to sort the members of the list.
Definition: epcdns.cpp:1076
EPCDNS::dia_app_eap
EAP.
Definition: epcdns.h:346
EPCDNS::Utility::home_network_gprs
static EString home_network_gprs(const char *mnc, const char *mcc)
Constructs the APN operator identifier.
Definition: epcdns.cpp:42
EPCDNS::DiameterHost::getIPv4Addresses
StringVector & getIPv4Addresses()
Retrieves the list of IPv4 addresses for this Diameter host.
Definition: epcdns.h:2014
EPCDNS::x_3gpp_msc
MSC.
Definition: epcdns.h:116
EPCDNS::DiameterSrv::getWeight
uint16_t getWeight()
Retrieves the weight value.
Definition: epcdns.h:2068
EPCDNS::mme_x_gn
x-gn
Definition: epcdns.h:272
EPCDNS::DiameterSelector::DiameterSelector
DiameterSelector()
Default constructor.
Definition: epcdns.cpp:1215
EPCDNS::sgsn_x_s16
x-s16
Definition: epcdns.h:259
EPCDNS::StringVector
Represents a vector (array) of strings.
Definition: epcdns.h:879
EPCDNS::DiameterSrv
Represents a Diameter server.
Definition: epcdns.h:2050
EPCDNS::sgsn_x_gn
x-gn
Definition: epcdns.h:253
EPCDNS::NodeSelectorResultList::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:1211
EPCDNS::DiameterSrvVector::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:2127
EPCDNS::x_s2a_mipv4
x-s2a-mipv4
Definition: epcdns.h:153
EPCDNS::AppProtocol::getProtocol
AppProtocolEnum getProtocol()
Retrieves the protocol enumeration.
Definition: epcdns.h:918
EPCDNS::NodeSelectorResult::NodeSelectorResult
NodeSelectorResult()
Default constructor.
Definition: epcdns.h:1100
EPCDNS::mme_x_nq
x-nq
Definition: epcdns.h:276
EPCDNS::x_3gpp_unknown
Unknown.
Definition: epcdns.h:102
EPCDNS::x_nqprime
x-nqprime
Definition: epcdns.h:137
EPCDNS::DiameterHost::DiameterHost
DiameterHost(const std::string &name)
Class constructor.
Definition: epcdns.h:1998
EPCDNS::AppProtocol::getRawProtocol
const EString & getRawProtocol()
Retrieves the raw protocol string.
Definition: epcdns.h:915
EPCDNS::x_s5_gtp
x-s5-gtp
Definition: epcdns.h:167
EPCDNS::Utility::emergency_epdg_tai_fqdn
static EString emergency_epdg_tai_fqdn(const char *lb, const char *hb, const char *mnc, const char *mcc)
Constructs the tracking area identity based emergency ePDG FQDN.
Definition: epcdns.cpp:340
EPCDNS::UsageTypeList
Represents a list of usage types.
Definition: epcdns.h:831
EPCDNS::AppService::dump
Void dump()
Prints the contents of this object.
Definition: epcdns.h:1075
EPCDNS::PGWUPFNodeSelector::PGWUPFNodeSelector
PGWUPFNodeSelector(const char *apn, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1571
EPCDNS::DiameterNaptr::setService
const EString & setService(const std::string &service)
Assigns the service value.
Definition: epcdns.h:1947
EPCDNS::EpcNodeSelector::setAppService
EpcNodeSelector & setAppService(AppServiceEnum s)
Assigns the required application service type.
Definition: epcdns.h:1874
EPCDNS::DiameterSelector::setRealm
const EString & setRealm(const unsigned char *plmnid)
Assigns the realm.
Definition: epcdns.h:2266
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(const unsigned char lb, const unsigned char hb, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1604
EPCDNS::NodeSelector::addDesiredNetworkCapability
NetworkCapability & addDesiredNetworkCapability(const char *nc)
Adds a desired network capability to the list of desired network capabilities.
Definition: epcdns.h:1266
EPCDNS::Utility::epc_node_fqdn
static EString epc_node_fqdn(const char *node, const char *mnc, const char *mcc)
Constructs the EPC node FQDN.
Definition: epcdns.cpp:215
EPCDNS::x_s5_pmip
x-s5-pmip
Definition: epcdns.h:169
EPCDNS::dia_app_nasreq
NASREQ.
Definition: epcdns.h:338
EPCDNS::StringVector::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:884
EPCDNS::sgw_x_s8_pmip
x-s8-pmip
Definition: epcdns.h:237
EPCDNS::Utility::getDiameterProtocol
static const char * getDiameterProtocol(DiameterProtocolEnum protocol)
Converts a DiameterProtocolEnum to the corresponding Diameter protocol string.
Definition: epcdns.cpp:795
EPCDNS::AppService::getProtocols
AppProtocolList & getProtocols()
Retrieves the list of application protocols.
Definition: epcdns.h:1051
EPCDNS::dia_app_wimax_wm6da
WiMAX MIP6 Diameter Application (WM6DA)
Definition: epcdns.h:413
EPCDNS::AppProtocol
Application protocol object.
Definition: epcdns.h:905
EPCDNS::ENodeBUPFNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(UPFAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1811
EPCDNS::x_s2b_pmip
x-s2b-pmip
Definition: epcdns.h:159
EPCDNS::DiameterNaptr::setReplacement
const EString & setReplacement(const std::string &replacement)
Assigns the replacement value.
Definition: epcdns.h:1959
EPCDNS::CanonicalNodeName::CanonicalNodeName
CanonicalNodeName()
Default constructor.
Definition: epcdns.cpp:806
EPCDNS::AppService::AppService
AppService()
Default constructor.
Definition: epcdns.h:1031
EPCDNS::SGWNodeSelector
A SGW node selector.
Definition: epcdns.h:1596
EPCDNS::PGWNodeSelector
A PGW node selector.
Definition: epcdns.h:1514
EPCDNS::x_s16
x-16
Definition: epcdns.h:149
EPCDNS::AppProtocol::addNetworkCapability
NetworkCapability & addNetworkCapability(NetworkCapability &nc)
Adds a network capability to the network capability list.
Definition: epcdns.h:937
EPCDNS::sgw_x_s5_gtp
x-s5-gtp
Definition: epcdns.h:231
EPCDNS::sgw_x_s5_pmip
x-s5-pmip
Definition: epcdns.h:233
EPCDNS::Utility::nonemergency_epdg_oi_fqdn
static EString nonemergency_epdg_oi_fqdn(const char *mnc, const char *mcc)
Constructs the operator identifier (OI) based ePDG FQDN.
Definition: epcdns.cpp:235
EPCDNS::CanonicalNodeName::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:808
EPCDNS::ENodeBUPFNodeSelector::ENodeBUPFNodeSelector
ENodeBUPFNodeSelector(const char *enb, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1802
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(const char *lb, const char *hb, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1637
EPCDNS::DiameterNaptr::setReplacement
const EString & setReplacement(const char *replacement)
Assigns the replacement value.
Definition: epcdns.h:1955
EPCDNS::dia_protocol_sctp
SCTP.
Definition: epcdns.h:436
EString
String class.
Definition: estring.h:30
EPCDNS::Utility::emergency_epdg_visitedcountry_fqdn
static EString emergency_epdg_visitedcountry_fqdn(const char *mcc)
Constructs the visited country emergency FQDN.
Definition: epcdns.cpp:386
EPCDNS::DiameterNaptrS::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:2194
EPCDNS::upf_x_sxa
x-sxa
Definition: epcdns.h:302
EPCDNS::AppProtocolList::~AppProtocolList
~AppProtocolList()
Class destructor.
Definition: epcdns.h:1000
EPCDNS::AppProtocolList::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:1012
EPCDNS::AppProtocolList
Manages a list of application protocols.
Definition: epcdns.h:994
EPCDNS::SGWUPFNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(UPFAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1770
EPCDNS::Utility::tai_fqdn
static EString tai_fqdn(const char *lb, const char *hb, const char *mnc, const char *mcc)
Constructs the tracking area identity FQDN.
Definition: epcdns.cpp:60
EPCDNS::pgw_x_gn
x-gn
Definition: epcdns.h:190
EPCDNS::NodeSelectorResult::getPreference
uint16_t getPreference()
Retrieves the preference value.
Definition: epcdns.h:1115
EPCDNS::ggsn_x_gp
x-gp
Definition: epcdns.h:246
EPCDNS::pgw_x_s2c_dsmip
x-s2c-dsmip
Definition: epcdns.h:204
EPCDNS::PGWNodeSelector::PGWNodeSelector
PGWNodeSelector(const char *apn, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1521
EPCDNS::pgw_x_s5_gtp
x-s5-gtp
Definition: epcdns.h:206
EPCDNS::dia_app_mobile_ipv6_auth
Mobile IPv6 Auth.
Definition: epcdns.h:352
EPCDNS::x_3gpp_mme
MME.
Definition: epcdns.h:114
EPCDNS::dia_app_mobile_ipv6_ike
Mobile IPv6 IKE.
Definition: epcdns.h:350
EPCDNS::pgw_x_s2b_pmip
x-s2b-pmip
Definition: epcdns.h:202
EPCDNS::dia_app_credit_control
Credit Control.
Definition: epcdns.h:344
EPCDNS::StringVector::shuffle
Void shuffle()
Randomizes the list of strings.
Definition: epcdns.h:895
EPCDNS::AppProtocol::getNetworkCapabilities
NetworkCapabilityList & getNetworkCapabilities()
Retrieves the list of network capabilities.
Definition: epcdns.h:924
EPCDNS::x_s2b_gtp
x-s2b-gtp
Definition: epcdns.h:157
EPCDNS::DiameterSrv::dump
Void dump(const char *prefix)
Prints the contents of this object.
Definition: epcdns.h:2088
EPCDNS::SGWUPFNodeSelector
A SGW user plane node selector.
Definition: epcdns.h:1691
EPCDNS::x_s2a_gtp
x-s2a-gtp
Definition: epcdns.h:151
EPCDNS::DiameterSrv::getPriority
uint16_t getPriority()
Retrieves the priority value.
Definition: epcdns.h:2060
EPCDNS::NodeSelectorResult::getOrder
uint16_t getOrder()
Retrieves the order value.
Definition: epcdns.h:1112
EPCDNS::EpcNodeSelector::EpcNodeSelector
EpcNodeSelector(const char *node, const char *mnc, const char *mcc, AppServiceEnum appsvc=x_3gpp_any)
Class constructor.
Definition: epcdns.h:1835
EPCDNS::NodeSelector::~NodeSelector
~NodeSelector()
Class destructor.
Definition: epcdns.cpp:1063
EPCDNS::sgw_x_s2a_pmip
x-s2a-pmip
Definition: epcdns.h:225
EPCDNS::PGWUPFNodeSelector::addDesiredProtocol
AppProtocol * addDesiredProtocol(UPFAppProtocolEnum p)
Adds the desired application protocol to the selector.
Definition: epcdns.h:1580
EPCDNS::Utility::home_network
static EString home_network(const char *mnc, const char *mcc)
Constructs the home network domain name.
Definition: epcdns.cpp:24
DNS::QueryPtr
std::shared_ptr< Query > QueryPtr
A typedef to std::shared_ptr<Query>.
Definition: dnsquery.h:40
EPCDNS::DiameterNaptr::getOrder
uint16_t getOrder()
Retrieves the order value.
Definition: epcdns.h:1923
EPCDNS::dia_app_3gpp_sta
3GPP STa
Definition: epcdns.h:368
EPCDNS::pgw_x_s5_pmip
x-s5-pmip
Definition: epcdns.h:208
EPCDNS::PGWUPFNodeSelector::PGWUPFNodeSelector
PGWUPFNodeSelector(const char *apn, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1562
EPCDNS::ColocatedCandidate
Represents a colocated candidate.
Definition: epcdns.h:1337
EPCDNS::x_3gpp_any
Any.
Definition: epcdns.h:104
EPCDNS::DiameterSelector::getApplicataion
DiameterApplicationEnum getApplicataion()
Retrieves the application type.
Definition: epcdns.h:2270
EPCDNS::NodeSelector::setAppService
AppServiceEnum setAppService(AppServiceEnum s)
Assigns the application service type.
Definition: epcdns.h:1305
EPCDNS::amf_x_n2
x-n2
Definition: epcdns.h:313
EPCDNS::Utility::getDiameterApplication
static uint32_t getDiameterApplication(DiameterApplicationEnum app)
Converts a DiameterApplicationEnum to the corresponding Diameter application ID.
Definition: epcdns.cpp:709
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(const char *lb, const char *hb, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1742
EPCDNS::DiameterNaptr::setOrder
uint16_t setOrder(uint16_t order)
Assigns the order value.
Definition: epcdns.h:1927
EPCDNS::DiameterSelector::setProtocol
DiameterProtocolEnum setProtocol(DiameterProtocolEnum proto)
Assigns the protocol type.
Definition: epcdns.h:2282
estring.h
Encapsulates and extends a std::string object.
EPCDNS::UPFAppProtocolEnum
UPFAppProtocolEnum
the UPF related protocols.
Definition: epcdns.h:299
EPCDNS::ColocatedCandidate::getCanonicalNodeName1
CanonicalNodeName & getCanonicalNodeName1()
Retrieves the first canonical node name.
Definition: epcdns.h:1366
EPCDNS::upf_x_sxb
x-sxb
Definition: epcdns.h:304
EPCDNS::Utility::local_homenetwork_fqdn
static EString local_homenetwork_fqdn(const char *lhn, const char *mcc)
Constructs the local home network identifier.
Definition: epcdns.cpp:426
EPCDNS::CanonicalNodeName::getName
const EString getName() const
Retrieves the canonical node name.
Definition: epcdns.h:799
EPCDNS::sgsn_x_s3
x-s3
Definition: epcdns.h:261
EPCDNS::AppProtocol::setProtocol
AppProtocolEnum setProtocol(AppProtocolEnum ape)
Assigns the protocol enumeration.
Definition: epcdns.h:929
EPCDNS::Utility::emergency_epdg_lac_fqdn
static EString emergency_epdg_lac_fqdn(const char *lac, const char *mnc, const char *mcc)
Constructs the location area code based emergency ePDG FQDN.
Definition: epcdns.cpp:364
EPCDNS::AppProtocol::dump
Void dump(const char *prefix="")
Prints the contents of this object.
Definition: epcdns.h:961
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(const char *lb, const char *hb, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1647
EPCDNS::NodeSelectorResult::getPort
uint16_t getPort()
Retrieves the IP port value.
Definition: epcdns.h:1118
EPCDNS::SGWUPFNodeSelector::SGWUPFNodeSelector
SGWUPFNodeSelector(const unsigned char lb, const unsigned char hb, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1699
EPCDNS::SGWNodeSelector::SGWNodeSelector
SGWNodeSelector(unsigned char lb, unsigned char hb, const unsigned char *plmnid)
Class constructor.
Definition: epcdns.h:1620
EPCDNS::NodeSelectorResult::getSupportedProtocols
AppProtocolList & getSupportedProtocols()
Retrieves the list supported protocols.
Definition: epcdns.h:1121
EPCDNS::AppProtocol::findUsageType
Bool findUsageType(UsageType ut)
Determines if a usage type exists in the usage type list.
Definition: epcdns.h:946
EPCDNS::x_s8_pmip
x-s8-pmip
Definition: epcdns.h:175
EPCDNS::DiameterSrv::setPriority
uint16_t setPriority(uint16_t priority)
Assigns the priority value.
Definition: epcdns.h:2064
EPCDNS::dia_app_wimax_wnaaada
iMAX Network Access Authentication and Authorization Diameter Application (WNAAADA)
Definition: epcdns.h:407
EPCDNS::ColocatedCandidate::getCandidate1
NodeSelectorResult & getCandidate1()
Retrieves the first candidate node selector result object.
Definition: epcdns.h:1360
EPCDNS::NodeSelector::process
NodeSelectorResultList & process()
Performs synchronous selection process.
Definition: epcdns.cpp:895
EPCDNS::DiameterSrv::setWeight
uint16_t setWeight(uint16_t weight)
Assigns the weight value.
Definition: epcdns.h:2072
EPCDNS::x_s11
x-s11
Definition: epcdns.h:145
EPCDNS::DiameterSrv::getHost
DiameterHost & getHost()
Retrieves the diameter host.
Definition: epcdns.h:2084
EPCDNS::NodeSelectorResult::getIPv4Hosts
StringVector & getIPv4Hosts()
Retrieves the list of IPv4 hosts.
Definition: epcdns.h:1124
EPCDNS::DiameterSrv::setPort
uint16_t setPort(uint16_t port)
Assigns the IP port.
Definition: epcdns.h:2080
EPCDNS::DiameterSrv::DiameterSrv
DiameterSrv()
Default constructor.
Definition: epcdns.h:2054
EPCDNS::Utility::apn_fqdn
static EString apn_fqdn(const char *apn, const char *mnc, const char *mcc)
Constructs the APN FQDN.
Definition: epcdns.cpp:466
EPCDNS::NodeSelector::setDomainName
const EString & setDomainName(const std::string &d)
Assigns the domain name.
Definition: epcdns.h:1309
EPCDNS::AppService
The application service object.
Definition: epcdns.h:1027
EPCDNS::dia_app_qos
QoS.
Definition: epcdns.h:354
EPCDNS::AppProtocol::findNetworkCapability
Bool findNetworkCapability(const NetworkCapability &nc)
Determines if a network capability exists in the network capabilities list.
Definition: epcdns.h:954
EPCDNS::NodeSelector::addDesiredProtocol
Void addDesiredProtocol(AppProtocol *ap)
Adds a desired application protcol to the desired protocol list.
Definition: epcdns.h:1312
EPCDNS::Utility::sgsn_fqdn
static EString sgsn_fqdn(const char *nri, const char *rac, const char *lac, const char *mnc, const char *mcc)
Constructs the serving GPRS support node (SGSN) FQDN.
Definition: epcdns.cpp:171
EPCDNS::MMENodeSelector::MMENodeSelector
MMENodeSelector(const char *mmec, const char *mmegi, const char *mnc, const char *mcc)
Class constructor.
Definition: epcdns.h:1460