62 bool open(
const char *ip,
double rx_timeout_sec = 5.0);
64 bool sendRaw(
const void *buf,
size_t len);
80 int ensureMaintenance(
const char *ip,
int max_retries,
int retry_delay_sec, std::ostream &log);
91 struct sockaddr_in dest_;
92 struct sockaddr_in src_;
95 static std::string resolveFirmwareInfoXml();
96 bool recvReplyForIP(uint8_t expected_opc,
int timeout_ms, eOuprot_result_t &out_res);
97 bool findFirmwareForBoard(
const std::string &boardname, std::string &out_hexpath);
98 bool sendPROG_START(eOuprot_partition2prog_t partition, eOuprot_result_t &out_res);
99 bool sendPROG_DATA_chunk(uint32_t address,
const uint8_t *
data,
size_t len, eOuprot_result_t &out_res);
100 bool sendPROG_END(uint16_t numberofpkts, eOuprot_result_t &out_res);
103 static void print_discover_reply(
const eOuprot_cmd_DISCOVER_REPLY_t *reply,
const char *srcip);
104 static void print_legacy_scan_reply(
const eOuprot_cmd_LEGACY_SCAN_REPLY_t *scan,
const char *srcip);
109 static std::vector<std::string> parseIPsFromNetworkFile(
const char *xmlpath);
110 static std::string logname(
const std::string &ip);
111 static pid_t spawn_and_log(
const std::string &exe_path,
const std::vector<std::string> &args,
const std::string &logpath,
bool append);