MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / sendClientInfo

Method sendClientInfo

src/decrypt/dvbapi/Client.cpp:235–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233 }
234
235 void Client::sendClientInfo() {
236 std::string name = "SatPI ";
237 name += satpi_version;
238
239 const int len = name.size() - 1; // ignoring null termination
240 unsigned char buff[7 + len];
241
242 const uint32_t request = htonl(DVBAPI_CLIENT_INFO);
243 std::memcpy(&buff[0], &request, 4);
244
245 const uint16_t version = htons(DVBAPI_PROTOCOL_VERSION);
246 std::memcpy(&buff[4], &version, 2);
247
248 buff[6] = len;
249 std::memcpy(&buff[7], name.c_str(), len);
250
251 if (!_client.sendData(buff, sizeof(buff), MSG_DONTWAIT)) {
252 SI_LOG_ERROR("write failed");
253 }
254 }
255
256 void Client::cleanPMT(unsigned char *data) {
257 const unsigned char options = (data[1] & 0xE0);

Callers

nothing calls this directly

Calls 1

sendDataMethod · 0.80

Tested by

no test coverage detected