|
@@ -213,34 +213,18 @@ int pkt4_send(CalloutHandle& handle) {
|
|
|
|
|
|
std::map<std::string,std::string>::iterator it = option122_map.find(mac);
|
|
|
|
|
|
- //if (it != option122_map.end()){
|
|
|
- // std::string file = mac + ".mta.bin";
|
|
|
- // isc::util::str::lowercase(file);
|
|
|
-
|
|
|
- // LOG_INFO(runscript_logger, FLOWDAT_DEBUG_STRING).arg("file : " + file);
|
|
|
- // strcpy((char*)ufile_name, file.c_str());
|
|
|
- // response->setFile(ufile_name, strlen((char *)ufile_name));
|
|
|
- // response->setSiaddr(isc::asiolink::IOAddress(option122_map[mac]));
|
|
|
-
|
|
|
- // OptionStringPtr tftp_server(new OptionString(Option::V4, DOCSIS3_V4_TFTP_SERVERS,option122_map[mac]));
|
|
|
-
|
|
|
- // OptionPtr option1(new Option(Option::V4, 122));
|
|
|
-
|
|
|
- // Option4AddrLstPtr opt_server(new Option4AddrLst(3)); //SubOption 1
|
|
|
- // opt_server->setAddress(isc::asiolink::IOAddress(option122_map[mac]));
|
|
|
-
|
|
|
-
|
|
|
- // OptionStringPtr opt_basic1(new OptionString(Option::V4, 6, "BASIC.1"));
|
|
|
-
|
|
|
- // option1->addOption(opt_server);
|
|
|
- // option1->addOption(opt_basic1);
|
|
|
-
|
|
|
- // response->addOption(option1);
|
|
|
-
|
|
|
+ if (it != option122_map.end()){
|
|
|
+ std::string file = mac + ".mta.bin";
|
|
|
+ isc::util::str::lowercase(file);
|
|
|
|
|
|
- // response->addOption(tftp_server);
|
|
|
+ LOG_INFO(runscript_logger, FLOWDAT_DEBUG_STRING).arg("file : " + file);
|
|
|
+ strcpy((char*)ufile_name, file.c_str());
|
|
|
+ response->setFile(ufile_name, strlen((char *)ufile_name));
|
|
|
|
|
|
- //}
|
|
|
+ isc::util::str::lowercase(mac);
|
|
|
+ OptionStringPtr opt_domain(new OptionString(Option::V4, DHO_HOST_NAME, mac));
|
|
|
+ response->addOption(opt_domain);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return 0;
|