1: 2: 3: /************* 4: * * 5: * SENTINEL * 6: * * 7: *************/ 8: 9: 10: #ifndef WWWI_MIND_RESOLVER_H 11: #define WWWI_MIND_RESOLVER_H 12: 13: 14: /********************* 15: * * 16: * PROJECT INCLUDES * 17: * * 18: *********************/ 19: 20: 21: #include "mind.h" 22: #include "dnssocket.h" 23: #include "question.h" 24: #include "response.h" 25: #include "rrcache.h" 26: 27: 28: /********************** 29: * * 30: * TYPE DECLARATIONS * 31: * * 32: **********************/ 33: 34: 35: class RRCache; 36: typedef RRCache* RRCachePtr; 37: 38: 39: /******************* 40: * * 41: * CLASS RESOLVER * 42: * * 43: *******************/ 44: 45: 46: /* 47: * The Resolver class performs all the real work associated with resolving 48: * an unknown DNS name. 49: * 50: * Properties 51: * 52: * RRCachePtr m_cap 53: * This property points to the global cache of RRs. 54: * 55: * Methods 56: * 57: */ 58: 59: class Resolver { 60: public: 61: Resolver(void); 62: ResponsePtr QueryAuthority(QuestionConstPtr ci_qnp, DNSSocketPtr i_dspAuthority, IPAddress i_ipAuthority); 63: ResponsePtr QueryRecursive(const char *i_strName, RRType i_ty, RRClass i_cl, unsigned i_uSteps); 64: ResponsePtr QueryRecursive(QuestionConstPtr ci_qnp, unsigned i_uSteps); 65: inline IPAddress SimpleResolve(const char *i_strName, unsigned i_uSteps); 66: inline IPAddress SimpleResolve(LabelListConstPtr i_llpName, unsigned i_uSteps); 67: 68: protected: 69: RRCachePtr m_cap; 70: unsigned short m_usID; // STUB: should go to random to stop prediction 71: 72: }; 73: typedef Resolver* ResolverPtr; 74: 75: 76: /********************* 77: * * 78: * INLINE FUNCTIONS * 79: * * 80: *********************/ 81: 82: 83: /************ 84: * * 85: * THE END * 86: * * 87: ************/ 88: 89: 90: #endif 91: 92: 93: