Skip to content

Commit

Permalink
name is a reserved Field name
Browse files Browse the repository at this point in the history
  • Loading branch information
guedou authored and gpotter2 committed Sep 12, 2021
1 parent 2d11ff1 commit 23ff728
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/scapy/build_dissect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ Field naming convention
-----------------------
The goal is to keep the writing of packets fluent and intuitive. The basic instructions are the following :

* Do not use any value from the ``Packet.__slots__``` list as a field name (such as name, time or original), as they are reserved for Scapy internals
* Use inverted camel case and common abbreviations (e.g. len, src, dst, dstPort, srcIp).
* Wherever it is either possible or relevant, prefer using the names from the specifications. This aims to help newcomers to easily forge packets.

Expand Down

0 comments on commit 23ff728

Please sign in to comment.