MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / GetTcpSegLen

Function GetTcpSegLen

src/dolphin/src/eth/ethsec.c:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101static s32 GetTcpSegLen(IPHeader *ip, TCPHeader *tcp) {
102 s32 len = ip->len - ((ip->verlen & 0xf) << 2) - (s32)(((tcp->flag & 0xf000) >> 10));
103
104 if (tcp->flag & 2) {
105 len += 1;
106 }
107
108 if (tcp->flag & 1) {
109 len += 1;
110 }
111
112 return len;
113}
114
115static BOOL VerifyPacket(IPHeader *ip) {
116 if(ip->verlen >> 4 != 4 || ip->len < ((ip->verlen & 0xf) << 2)) {

Callers 2

__ETHFilterFunction · 0.85
__ETHPostSendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected