Changeset 1246
- Timestamp:
- 08/03/08 21:21:53 (20 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 11 modified
-
common_startup.cc (modified) (2 diffs)
-
dynlistener.cc (modified) (13 diffs)
-
dynlistener.hh (modified) (5 diffs)
-
dynloader.cc (modified) (6 diffs)
-
dynmessenger.cc (modified) (4 diffs)
-
dynmessenger.hh (modified) (3 diffs)
-
misc.cc (modified) (2 diffs)
-
misc.hh (modified) (2 diffs)
-
receiver.cc (modified) (4 diffs)
-
win32_dynlistener.cc (modified) (2 diffs)
-
win32_receiver.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/common_startup.cc
r1232 r1246 36 36 return theArg; 37 37 } 38 39 38 40 39 void declareArguments() … … 82 81 ::arg().set("allow-axfr-ips","Allow zonetransfers only to these subnets")="0.0.0.0/0"; 83 82 ::arg().set("slave-cycle-interval","Reschedule failed SOA serial checks once every .. seconds")="60"; 83 84 ::arg().set("tcp-control-address","If set, PowerDNS can be controlled over TCP on this address")=""; 85 ::arg().set("tcp-control-port","If set, PowerDNS can be controlled over TCP on this address")="53000"; 86 ::arg().set("tcp-control-secret","If set, PowerDNS can be controlled over TCP after passing this secret")=""; 87 ::arg().set("tcp-control-range","If set, remote control of PowerDNS is possible over these networks only")="127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10"; 84 88 85 89 ::arg().setSwitch("slave","Act as a slave")="no"; -
trunk/pdns/pdns/dynlistener.cc
r1226 r1246 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 - 200 6PowerDNS.COM BV3 Copyright (C) 2002 - 2008 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 24 24 #include <pthread.h> 25 25 #include <unistd.h> 26 26 #include <boost/algorithm/string.hpp> 27 #include <boost/shared_ptr.hpp> 27 28 #include <sys/socket.h> 28 29 #include <netinet/in.h> … … 36 37 #include <fcntl.h> 37 38 #include <unistd.h> 38 39 #include <boost/algorithm/string.hpp> 39 40 #include "misc.hh" 40 41 #include "dns.hh" … … 46 47 #include "statbag.hh" 47 48 48 49 50 49 extern StatBag S; 50 51 DynListener::g_funkdb_t DynListener::s_funcdb; 52 DynListener::g_funk_t* DynListener::s_restfunc; 51 53 52 54 DynListener::~DynListener() … … 56 58 } 57 59 58 DynListener::DynListener(const string &pname) 59 { 60 d_restfunc=0; 61 string programname(pname); 62 63 if(!programname.empty()) { 64 struct sockaddr_un local; 65 d_s=socket(AF_UNIX,SOCK_STREAM,0); 66 67 if(d_s<0) { 68 L<<Logger::Error<<"Creating socket for dynlistener: "<<strerror(errno)<<endl;; 69 exit(1); 70 } 71 72 int tmp=1; 73 if(setsockopt(d_s,SOL_SOCKET,SO_REUSEADDR,(char*)&tmp,sizeof tmp)<0) 74 throw AhuException(string("Setsockopt failed: ")+strerror(errno)); 60 void DynListener::createSocketAndBind(int family, struct sockaddr*local, size_t len) 61 { 62 d_s=socket(family, SOCK_STREAM,0); 63 64 if(d_s < 0) { 65 L<<Logger::Error<<"Creating socket for dynlistener: "<<strerror(errno)<<endl;; 66 exit(1); 67 } 68 69 int tmp=1; 70 if(setsockopt(d_s,SOL_SOCKET,SO_REUSEADDR,(char*)&tmp,sizeof tmp)<0) 71 throw AhuException(string("Setsockopt failed: ")+strerror(errno)); 75 72 73 if(bind(d_s, local, len) < 0) { 74 L<<Logger::Critical<<"Binding to dynlistener: "<<strerror(errno)<<endl; 75 exit(1); 76 } 77 78 listen(d_s,10); 79 } 80 81 void DynListener::listenOnUnixDomain(const string& fname) 82 { 83 int err=unlink(fname.c_str()); 84 if(err < 0 && errno!=ENOENT) { 85 L<<Logger::Critical<<"Unable to remove (previous) controlsocket: "<<strerror(errno)<<endl; 86 exit(1); 87 } 88 89 struct sockaddr_un local; 90 memset(&local,0,sizeof(local)); 91 local.sun_family=AF_UNIX; 92 strncpy(local.sun_path, fname.c_str(), fname.length()); 93 94 createSocketAndBind(AF_UNIX, (struct sockaddr*)& local, sizeof(local)); 95 d_socketname=fname; 96 if(!arg()["setgid"].empty()) { 97 if(chown(fname.c_str(),static_cast<uid_t>(-1),Utility::makeGidNumeric(arg()["setgid"]))<0) 98 L<<Logger::Error<<"Unable to change group ownership of controlsocket: "<<strerror(errno)<<endl; 99 if(chmod(fname.c_str(),0660)<0) 100 L<<Logger::Error<<"Unable to change group access mode of controlsocket: "<<strerror(errno)<<endl; 101 } 102 103 104 L<<Logger::Warning<<"Listening on controlsocket in '"<<fname<<"'"<<endl; 105 d_nonlocal=true; 106 } 107 108 void DynListener::listenOnTCP(const ComboAddress& local) 109 { 110 createSocketAndBind(AF_INET, (struct sockaddr*)& local, local.getSocklen()); 111 d_socketaddress=local; 112 L<<Logger::Warning<<"Listening on controlsocket on '"<<local.toStringWithPort()<<"'"<<endl; 113 d_nonlocal=true; 114 115 if(!::arg()["tcp-control-range"].empty()) { 116 vector<string> ips; 117 stringtok(ips, ::arg()["tcp-control-range"], ", "); 118 L<<Logger::Warning<<"Only allowing TCP control from: "; 119 for(vector<string>::const_iterator i = ips.begin(); i!= ips.end(); ++i) { 120 d_tcprange.addMask(*i); 121 if(i!=ips.begin()) 122 L<<Logger::Warning<<", "; 123 L<<Logger::Warning<<*i; 124 } 125 L<<Logger::Warning<<endl; 126 } 127 } 128 129 130 DynListener::DynListener(const ComboAddress& local) 131 { 132 listenOnTCP(local); 133 d_tcp=true; 134 } 135 136 DynListener::DynListener(const string &progname) 137 { 138 if(!progname.empty()) { 76 139 string socketname=arg()["socket-dir"]+"/"; 77 140 cleanSlashes(socketname); … … 84 147 } 85 148 86 socketname+=programname+".controlsocket"; 87 int err=unlink(socketname.c_str()); 88 if(err < 0 && errno!=ENOENT) { 89 L<<Logger::Critical<<"Unable to remove (previous) controlsocket: "<<strerror(errno)<<endl; 90 exit(1); 91 } 92 memset(&local,0,sizeof(local)); 93 local.sun_family=AF_UNIX; 94 strcpy(local.sun_path,socketname.c_str()); 95 96 if(bind(d_s, (sockaddr*)&local,sizeof(local))<0) { 97 L<<Logger::Critical<<"Binding to dynlistener '"<<socketname<<"': "<<strerror(errno)<<endl; 98 exit(1); 99 } 100 d_socketname=socketname; 101 if(!arg()["setgid"].empty()) { 102 if(chown(socketname.c_str(),static_cast<uid_t>(-1),Utility::makeGidNumeric(arg()["setgid"]))<0) 103 L<<Logger::Error<<"Unable to change group ownership of controlsocket: "<<strerror(errno)<<endl; 104 if(chmod(socketname.c_str(),0660)<0) 105 L<<Logger::Error<<"Unable to change group access mode of controlsocket: "<<strerror(errno)<<endl; 106 } 107 108 109 L<<Logger::Warning<<"Listening on controlsocket in '"<<socketname<<"'"<<endl; 110 d_udp=true; 111 listen(d_s,10); 149 socketname+=progname+".controlsocket"; 150 listenOnUnixDomain(socketname); 112 151 } 113 152 else 114 d_udp=false; 115 116 153 d_nonlocal=false; // we listen on stdin! 154 d_tcp=false; 117 155 } 118 156 … … 136 174 137 175 int len; 138 139 sockaddr_unremote;140 socklen_t remlen= sizeof(remote);141 142 if(d_ udp) {176 177 ComboAddress remote; 178 socklen_t remlen=remote.getSocklen(); 179 180 if(d_nonlocal) { 143 181 for(;;) { 144 182 d_client=accept(d_s,(sockaddr*)&remote,&remlen); … … 148 186 continue; 149 187 } 150 if((len=recv(d_client, &mesg[0], mesg.size(),0))<0) { 151 L<<Logger::Error<<"Unable to receive packet from controlsocket ("<<d_client<<"): "<<strerror(errno)<<endl; 188 189 boost::shared_ptr<FILE> fp=boost::shared_ptr<FILE>(fdopen(dup(d_client), "r"), fclose); 190 if(d_tcp) { 191 if(!fgets(&mesg[0], mesg.size(), fp.get())) { 192 L<<Logger::Error<<"Unable to receive password from controlsocket ("<<d_client<<"): "<<strerror(errno)<<endl; 193 close(d_client); 194 continue; 195 } 196 string password(&mesg[0]); 197 boost::trim(password); 198 if(password.empty() || password!=arg()["tcp-control-secret"]) { 199 L<<Logger::Error<<"Wrong password on TCP control socket"<<endl; 200 writen2(d_client, "Wrong password"); 201 202 close(d_client); 203 continue; 204 } 205 } 206 if(!fgets(&mesg[0], mesg.size(), fp.get())) { 207 L<<Logger::Error<<"Unable to receive line from controlsocket ("<<d_client<<"): "<<strerror(errno)<<endl; 152 208 close(d_client); 153 209 continue; 154 210 } 155 211 156 if( len == (int)mesg.size()) {212 if(strlen(&mesg[0]) == mesg.size()) { 157 213 L<<Logger::Error<<"Line on controlsocket ("<<d_client<<") was too long"<<endl; 158 214 close(d_client); 159 215 continue; 160 216 } 161 162 mesg[len]=0;163 217 break; 164 218 } … … 183 237 void DynListener::sendLine(const string &l) 184 238 { 185 if(d_ udp) {239 if(d_nonlocal) { 186 240 unsigned int sent=0; 187 241 int ret; 188 while(sent<l.length()) { 189 ret=send(d_client,l.c_str()+sent,l.length()-sent,0); 242 while(sent < l.length()) { 243 ret=send(d_client, l.c_str()+sent, l.length()-sent, 0); 244 190 245 if(ret<0 || !ret) { 191 246 L<<Logger::Error<<"Error sending data to pdns_control: "<<stringerror()<<endl; … … 207 262 void DynListener::registerFunc(const string &name, g_funk_t *gf) 208 263 { 209 d_funcdb[name]=gf;264 s_funcdb[name]=gf; 210 265 } 211 266 212 267 void DynListener::registerRestFunc(g_funk_t *gf) 213 268 { 214 d_restfunc=gf;269 s_restfunc=gf; 215 270 } 216 271 … … 220 275 map<string,string> parameters; 221 276 222 for(;;) { 277 for(int n=0;;++n) { 278 // cerr<<"Reading new line, "<<d_client<<endl; 223 279 string line=getLine(); 224 chomp(line,"\n");280 boost::trim_right(line); 225 281 226 282 vector<string>parts; … … 231 287 } 232 288 parts[0] = toUpper( parts[0] ); 233 if(! d_funcdb[parts[0]]) {234 if( d_restfunc)235 sendLine((* d_restfunc)(parts,d_ppid));289 if(!s_funcdb[parts[0]]) { 290 if(s_restfunc) 291 sendLine((*s_restfunc)(parts,d_ppid)); 236 292 else 237 293 sendLine("Unknown command: '"+parts[0]+"'"); … … 239 295 } 240 296 241 sendLine((* d_funcdb[parts[0]])(parts,d_ppid));297 sendLine((*s_funcdb[parts[0]])(parts,d_ppid)); 242 298 } 243 299 } -
trunk/pdns/pdns/dynlistener.hh
r681 r1246 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 PowerDNS.COM BV3 Copyright (C) 2002 - 2008 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 27 27 #include <iostream> 28 28 #include <sstream> 29 29 #include "iputils.hh" 30 #include <boost/utility.hpp> 30 31 #ifndef WIN32 31 32 #include <unistd.h> … … 39 40 using namespace std; 40 41 41 class DynListener 42 class DynListener : public boost::noncopyable 42 43 { 43 44 public: 44 DynListener(const string &pname=""); 45 explicit DynListener(const string &pname=""); 46 explicit DynListener(const ComboAddress& addr); 45 47 ~DynListener(); 46 48 void go(); … … 51 53 typedef map<string,g_funk_t *> g_funkdb_t; 52 54 53 void registerFunc(const string &name, g_funk_t *gf);54 void registerRestFunc(g_funk_t *gf);55 static void registerFunc(const string &name, g_funk_t *gf); 56 static void registerRestFunc(g_funk_t *gf); 55 57 private: 56 DynListener(const DynListener &);57 DynListener& operator=(const DynListener &);58 58 void sendLine(const string &line); 59 59 string getLine(); 60 61 void listenOnUnixDomain(const std::string& fname); 62 void listenOnTCP(const ComboAddress&); 63 void createSocketAndBind(int family, struct sockaddr*local, size_t len); 60 64 61 65 #ifndef WIN32 … … 66 70 67 71 Utility::socklen_t d_addrlen; 68 72 NetmaskGroup d_tcprange; 69 73 int d_s; 70 74 int d_client; 71 75 pthread_t d_tid; 72 bool d_udp; 76 bool d_nonlocal; 77 bool d_tcp; 73 78 pid_t d_ppid; 74 79 75 80 string d_socketname; 76 g_funkdb_t d_funcdb;77 g_funk_t* d_restfunc;78 81 ComboAddress d_socketaddress; 82 static g_funkdb_t s_funcdb; 83 static g_funk_t* s_restfunc; 79 84 }; 80 85 #endif /* PDNS_DYNLISTENER */ -
trunk/pdns/pdns/dynloader.cc
r680 r1246 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 - 200 5PowerDNS.COM BV3 Copyright (C) 2002 - 2008 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 28 28 #include <fcntl.h> 29 29 #include <sys/types.h> 30 #include <boost/shared_ptr.hpp> 30 31 31 32 #include <sys/stat.h> … … 38 39 #include "misc.hh" 39 40 using namespace std; 41 using namespace boost; 40 42 41 43 ArgvMap &arg() … … 57 59 58 60 arg().set("socket-dir","Where the controlsocket will live")=LOCALSTATEDIR; 61 arg().set("remote-address","Remote address to query"); 62 arg().set("remote-port","Remote port to query")="53000"; 63 arg().set("secret","Secret needed to connect to remote PowerDNS"); 64 59 65 arg().set("config-name","Name of this virtual configuration - will rename the binary image")=""; 60 66 arg().set("chroot","")=""; … … 91 97 string command=commands[0]; 92 98 93 DynMessenger D(localdir,socketname); 99 shared_ptr<DynMessenger> D; 100 if(arg()["remote-address"].empty()) 101 D=shared_ptr<DynMessenger>(new DynMessenger(localdir,socketname)); 102 else { 103 uint16_t port; 104 try { 105 port = lexical_cast<uint16_t>(arg()["remote-port"]); 106 } 107 catch(...) { 108 cerr<<"Unable to convert '"<<port<<"' to a port number for connecting to remote PowerDNS\n"; 109 exit(99); 110 } 111 112 D=shared_ptr<DynMessenger>(new DynMessenger(ComboAddress(arg()["remote-address"], port), arg()["secret"])); 113 } 94 114 95 115 string message; … … 122 142 123 143 124 if(D .send(message)<0) {144 if(D->send(message)<0) { 125 145 cerr<<"Error sending command"<<endl; 126 146 return 1; 127 147 } 128 148 129 string resp=D .receive();149 string resp=D->receive(); 130 150 131 151 cout<<resp<<endl; -
trunk/pdns/pdns/dynmessenger.cc
r1094 r1246 1 1 /* 2 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 PowerDNS.COM BV3 Copyright (C) 2002 - 2008 PowerDNS.COM BV 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 69 69 } 70 70 71 DynMessenger::DynMessenger(const ComboAddress& remote, const string &secret) 72 { 73 *d_local.sun_path=0; 74 d_s=socket(AF_INET, SOCK_STREAM,0); 75 76 if(d_s<0) { 77 throw AhuException(string("socket")+strerror(errno)); 78 } 79 80 if(connect(d_s, (sockaddr*)&remote, remote.getSocklen())<0) { 81 close(d_s); 82 throw AhuException("Unable to connect to remote '"+remote.toStringWithPort()+"': "+string(strerror(errno))); 83 } 84 85 string login=secret+"\n"; 86 writen2(d_s, login); 87 } 88 71 89 DynMessenger::~DynMessenger() 72 90 { 73 if( unlink(d_local.sun_path)<0)91 if(*d_local.sun_path && unlink(d_local.sun_path)<0) 74 92 cerr<<"Warning: unable to unlink local unix domain endpoint: "<<strerror(errno)<<endl; 75 93 close(d_s); … … 78 96 int DynMessenger::send(const string &msg) const 79 97 { 80 if( ::send(d_s,msg.c_str(),msg.size()+1,0)<0) {98 if(writen2(d_s, msg+"\n") < 0) { // sue me 81 99 perror("sendto"); 82 100 return -1; … … 84 102 return 0; 85 103 } 86 87 /*88 int recvfrom(int s, void *buf, size_t len, int flags,89 struct sockaddr *from, socklen_t *fromlen);90 */91 104 92 105 string DynMessenger::receive() const -
trunk/pdns/pdns/dynmessenger.hh
r681 r1246 36 36 37 37 #include <errno.h> 38 #include "iputils.hh" 38 39 #include "ahuexception.hh" 39 40 40 41 using namespace std; 41 42 42 //! The DynMessenger can send messages to UNIX domain sockets 43 //! The DynMessenger can send messages to UNIX domain sockets and TCP sockets 43 44 class DynMessenger 44 45 { … … 53 54 54 55 #endif // WIN32 55 56 57 56 DynMessenger(const DynMessenger &); // NOT IMPLEMENTED 58 57 … … 61 60 62 61 DynMessenger(const string &ldir, const string &filename); //!< Create a DynMessenger sending to this file 62 DynMessenger(const ComboAddress& remote, const string &password); //!< Create a DynMessenger sending to this file 63 63 ~DynMessenger(); 64 64 -
trunk/pdns/pdns/misc.cc
r1088 r1246 43 43 #include <sys/types.h> 44 44 #include "utility.hh" 45 #include <boost/algorithm/string.hpp> 46 47 int writen2(int fd, const void *buf, size_t count) 48 { 49 const char *ptr = (char*)buf; 50 const char *eptr = ptr + count; 51 52 int res; 53 while(ptr != eptr) { 54 res = ::write(fd, ptr, eptr - ptr); 55 if(res < 0) { 56 if (errno == EAGAIN) 57 throw std::runtime_error("used writen2 on non-blocking socket, got EAGAIN"); 58 else 59 unixDie("failed in writen2"); 60 } 61 else if (res == 0) 62 throw std::runtime_error("could not write all bytes, got eof in writen2"); 63 64 ptr += res; 65 } 66 67 return count; 68 } 69 45 70 46 71 string nowTime() … … 48 73 time_t now=time(0); 49 74 string t=ctime(&now); 50 chomp(t,"\n");75 boost::trim_right(t); 51 76 return t; 52 77 } -
trunk/pdns/pdns/misc.hh
r1234 r1246 178 178 } 179 179 180 int writen2(int fd, const void *buf, size_t count); 181 inline int writen2(int fd, const std::string &s) { return writen2(fd, s.data(), s.size()); } 182 183 180 184 const string toLower(const string &upper); 181 185 const string toLowerCanonic(const string &upper); … … 293 297 } 294 298 295 296 inline void chomp( string& line, const string& delim )297 {298 string::size_type pos;299 300 if( ( pos = line.find_last_not_of( delim ) ) != string::npos )301 {302 line.resize( pos + 1 );303 }304 }305 306 299 inline void unixDie(const string &why) 307 300 { -
trunk/pdns/pdns/receiver.cc
r1232 r1246 40 40 #include <fcntl.h> 41 41 #include <fstream> 42 #include <boost/algorithm/string.hpp> 42 43 43 44 #include "config.h" … … 63 64 #include "dnsrecords.hh" 64 65 66 65 67 time_t s_starttime; 66 68 … … 154 156 response+=mesg; 155 157 } 156 chomp(response,"\n");158 boost::trim_right(response); 157 159 return response; 158 160 } … … 519 521 writePid(); 520 522 } 521 dl->registerFunc("SHOW",&DLShowHandler); 522 dl->registerFunc("RPING",&DLPingHandler); 523 dl->registerFunc("QUIT",&DLRQuitHandler); 524 dl->registerFunc("UPTIME",&DLUptimeHandler); 525 dl->registerFunc("NOTIFY-HOST",&DLNotifyHostHandler); 526 dl->registerFunc("NOTIFY",&DLNotifyHandler); 527 dl->registerFunc("RELOAD",&DLReloadHandler); 528 dl->registerFunc("REDISCOVER",&DLRediscoverHandler); 529 dl->registerFunc("VERSION",&DLVersionHandler); 530 dl->registerFunc("PURGE",&DLPurgeHandler); 531 dl->registerFunc("CCOUNTS",&DLCCHandler); 532 dl->registerFunc("SET",&DLSettingsHandler); 533 dl->registerFunc("RETRIEVE",&DLNotifyRetrieveHandler); 534 535 523 DynListener::registerFunc("SHOW",&DLShowHandler); 524 DynListener::registerFunc("RPING",&DLPingHandler); 525 DynListener::registerFunc("QUIT",&DLRQuitHandler); 526 DynListener::registerFunc("UPTIME",&DLUptimeHandler); 527 DynListener::registerFunc("NOTIFY-HOST",&DLNotifyHostHandler); 528 DynListener::registerFunc("NOTIFY",&DLNotifyHandler); 529 DynListener::registerFunc("RELOAD",&DLReloadHandler); 530 DynListener::registerFunc("REDISCOVER",&DLRediscoverHandler); 531 DynListener::registerFunc("VERSION",&DLVersionHandler); 532 DynListener::registerFunc("PURGE",&DLPurgeHandler); 533 DynListener::registerFunc("CCOUNTS",&DLCCHandler); 534 DynListener::registerFunc("SET",&DLSettingsHandler); 535 DynListener::registerFunc("RETRIEVE",&DLNotifyRetrieveHandler); 536 537 if(!::arg()["tcp-control-address"].empty()) { 538 DynListener* dlTCP=new DynListener(ComboAddress(::arg()["tcp-control-address"], ::arg().asNum("tcp-control-port"))); 539 dlTCP->go(); 540 } 541 536 542 // reparse, with error checking 537 543 if(!::arg().mustDo("no-config")) -
trunk/pdns/pdns/win32_dynlistener.cc
r681 r1246 33 33 #include <sys/stat.h> 34 34 #include <fcntl.h> 35 35 #include <boost/algorithm/string.hpp> 36 36 #include "misc.hh" 37 37 #include "dns.hh" … … 141 141 for(;;) { 142 142 string line=getLine(); 143 chomp(line,"\n");143 boost::trim_right(line); 144 144 145 145 vector<string>parts; -
trunk/pdns/pdns/win32_receiver.cc
r681 r1246 243 243 dl=new DynListener(s_programname); 244 244 245 dl->registerFunc("SHOW",&DLShowHandler);246 dl->registerFunc("RPING",&DLPingHandler);247 dl->registerFunc("QUIT",&DLRQuitHandler);248 dl->registerFunc("UPTIME",&DLUptimeHandler);249 dl->registerFunc("NOTIFY-HOST",&DLNotifyHostHandler);250 dl->registerFunc("NOTIFY",&DLNotifyHandler);251 dl->registerFunc("RELOAD",&DLReloadHandler);252 dl->registerFunc("REDISCOVER",&DLRediscoverHandler);253 dl->registerFunc("VERSION",&DLVersionHandler);254 dl->registerFunc("PURGE",&DLPurgeHandler);255 dl->registerFunc("CCOUNTS",&DLCCHandler);256 dl->registerFunc("SET",&DLSettingsHandler);257 dl->registerFunc("RETRIEVE",&DLNotifyRetrieveHandler);245 DynListener::registerFunc("SHOW",&DLShowHandler); 246 DynListener::registerFunc("RPING",&DLPingHandler); 247 DynListener::registerFunc("QUIT",&DLRQuitHandler); 248 DynListener::registerFunc("UPTIME",&DLUptimeHandler); 249 DynListener::registerFunc("NOTIFY-HOST",&DLNotifyHostHandler); 250 DynListener::registerFunc("NOTIFY",&DLNotifyHandler); 251 DynListener::registerFunc("RELOAD",&DLReloadHandler); 252 DynListener::registerFunc("REDISCOVER",&DLRediscoverHandler); 253 DynListener::registerFunc("VERSION",&DLVersionHandler); 254 DynListener::registerFunc("PURGE",&DLPurgeHandler); 255 DynListener::registerFunc("CCOUNTS",&DLCCHandler); 256 DynListener::registerFunc("SET",&DLSettingsHandler); 257 DynListener::registerFunc("RETRIEVE",&DLNotifyRetrieveHandler); 258 258 259 259