| 228 | } |
| 229 | |
| 230 | void TCP_Packet::ReComputeHeaderLen() |
| 231 | { |
| 232 | int opOffset = 20; |
| 233 | for (size_t i = 0; i < options.size(); i++) |
| 234 | opOffset += options[i]->GetLength(); |
| 235 | |
| 236 | //needs to be a whole number of 32bits |
| 237 | headerLength = Common::AlignUpPow2(opOffset, 4); |
| 238 | |
| 239 | //Also write into dataOffsetAndNS_Flag |
| 240 | const u8 ns = dataOffsetAndNS_Flag & 1; |
| 241 | dataOffsetAndNS_Flag = (headerLength >> 2) << 4; |
| 242 | dataOffsetAndNS_Flag |= ns; |
| 243 | } |
| 244 | |
| 245 | void TCP_Packet::CalculateChecksum(IP_Address srcIP, IP_Address dstIP) |
| 246 | { |
nothing calls this directly
no test coverage detected