00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef DNSLookUp_h_DEFINED
00013 #define DNSLookUp_h_DEFINED
00014
00015 #include <OPENR/OObject.h>
00016 #include <OPENR/OSubject.h>
00017 #include <OPENR/OObserver.h>
00018 #include <ant.h>
00019 #include "def.h"
00020
00021 class DNSLookUp : public OObject {
00022 public:
00023 DNSLookUp();
00024 virtual ~DNSLookUp() {}
00025
00026 OSubject* subject[numOfSubject];
00027 OObserver* observer[numOfObserver];
00028
00029 virtual OStatus DoInit (const OSystemEvent& event);
00030 virtual OStatus DoStart (const OSystemEvent& event);
00031 virtual OStatus DoStop (const OSystemEvent& event);
00032 virtual OStatus DoDestroy(const OSystemEvent& event);
00033
00034 void GetDefaultServerByAddrCont(ANTENVMSG msg);
00035 void GetHostByNameCont(ANTENVMSG msg);
00036
00037 private:
00038 void GetDefaultServerByAddr();
00039 void GetHostByName(char* hostname);
00040 void Prompt();
00041
00042 antStackRef ipstackRef;
00043 antModuleRef dnsEndpoint;
00044 };
00045
00046 #endif // DNSLookUp_h_DEFINED