| 99 | } |
| 100 | |
| 101 | static 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 | |
| 115 | static BOOL VerifyPacket(IPHeader *ip) { |
| 116 | if(ip->verlen >> 4 != 4 || ip->len < ((ip->verlen & 0xf) << 2)) { |
no outgoing calls
no test coverage detected