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

Class _ESPPlain

scapy/layers/ipsec.py:178–198  ·  view source on GitHub ↗

Internal class to represent unencrypted ESP packets.

Source from the content-addressed store, hash-verified

176
177
178class _ESPPlain(Packet):
179 """
180 Internal class to represent unencrypted ESP packets.
181 """
182 name = 'ESP'
183
184 fields_desc = [
185 XIntField('spi', 0x0),
186 IntField('seq', 0),
187
188 StrField('iv', ''),
189 PacketField('data', '', Raw),
190 StrField('padding', ''),
191
192 ByteField('padlen', 0),
193 ByteEnumField('nh', 0, IP_PROTOS),
194 StrField('icv', ''),
195 ]
196
197 def data_for_encryption(self):
198 return raw(self.data) + self.padding + struct.pack("BB", self.padlen, self.nh) # noqa: E501
199
200
201###############################################################################

Callers 2

decryptMethod · 0.85
_encrypt_espMethod · 0.85

Calls 6

XIntFieldClass · 0.90
IntFieldClass · 0.90
StrFieldClass · 0.90
PacketFieldClass · 0.90
ByteFieldClass · 0.90
ByteEnumFieldClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…