Lines Matching defs:readLen
195 ssize_t readLen;
196 if (ReadV6Packet(msgHdr, readLen) != NETMANAGER_SUCCESS) {
211 if (static_cast<size_t>(readLen) < offsetof(ClatdReadV6Buf, payload) + tpNet) {
212 NETNATIVE_LOGW("%{public}zd read packet len shorter than %{public}u L2 header", readLen, tpNet);
216 int packetLen = readLen - offsetof(ClatdReadV6Buf, payload);
219 NETNATIVE_LOGW("skip csum for packet which length is %{public}zd", readLen);
239 ssize_t readLen;
240 if (ReadV4Packet(readBuf, readLen) != NETMANAGER_SUCCESS) {
245 if (readLen < payloadOffset) {
246 NETNATIVE_LOGW("%{public}zd read packet len shorter than %{public}d payload offset", readLen, payloadOffset);
250 const int packetLen = readLen - payloadOffset;
276 int32_t Clatd::ReadV6Packet(msghdr &msgHdr, ssize_t &readLen)
278 readLen = recvmsg(readSock6_, &msgHdr, 0);
279 if (readLen < 0) {
284 } else if (readLen == 0) {
288 } else if (static_cast<size_t>(readLen) >= sizeof(ClatdReadV6Buf)) {
289 NETNATIVE_LOGW("recvmsg failed: packet oversize, readLen: %{public}zu, sizeof(ClatdReadV6Buf): %{public}zu", static_cast<size_t>(readLen), sizeof(ClatdReadV6Buf));
295 int32_t Clatd::ReadV4Packet(ClatdReadTunBuf &readBuf, ssize_t &readLen)
297 readLen = read(tunFd_, reinterpret_cast<iovec *>(&readBuf), sizeof(readBuf));
298 if (readLen < 0) {
301 } else if (readLen == 0) {
305 } else if (static_cast<size_t>(readLen) >= sizeof(readBuf)) {