MCPcopy Create free account
hub / github.com/secdev/scapy / receive_data

Method receive_data

scapy/layers/inet.py:2273–2284  ·  view source on GitHub ↗
(self, pkt)

Source from the content-addressed store, hash-verified

2271
2272 @ATMT.action(incoming_data_received)
2273 def receive_data(self, pkt):
2274 data = raw(pkt[TCP].payload)
2275 if data and self.l4[TCP].ack == pkt[TCP].seq:
2276 self.sack = self.l4[TCP].ack
2277 self.l4[TCP].ack += len(data)
2278 self.l4[TCP].flags = "A"
2279 # Answer with an Ack
2280 self.send(self.l4)
2281 # Process data - will be sent to the SuperSocket through this
2282 pkt = self.rcvbuf.process(pkt)
2283 if pkt:
2284 self._transmit_packet(pkt)
2285
2286 @ATMT.ioevent(ESTABLISHED, name="tcp", as_supersocket="tcplink")
2287 def outgoing_data_received(self, fd):

Callers

nothing calls this directly

Calls 4

_transmit_packetMethod · 0.95
rawFunction · 0.90
sendMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected