()
| 72 | } |
| 73 | |
| 74 | func newTCPGROTable() *tcpGROTable { |
| 75 | t := &tcpGROTable{ |
| 76 | itemsByFlow: make(map[tcpFlowKey][]tcpGROItem, conn.IdealBatchSize), |
| 77 | itemsPool: make([][]tcpGROItem, conn.IdealBatchSize), |
| 78 | } |
| 79 | for i := range t.itemsPool { |
| 80 | t.itemsPool[i] = make([]tcpGROItem, 0, conn.IdealBatchSize) |
| 81 | } |
| 82 | return t |
| 83 | } |
| 84 | |
| 85 | func newTCPFlowKey(pkt []byte, srcAddrOffset, dstAddrOffset, tcphOffset int) tcpFlowKey { |
| 86 | key := tcpFlowKey{} |
no outgoing calls