title: Binding custom layers in scapy
body: <p>I have a python script which assembles and sends AVB (IEEE) packets into a network.
  The packets will be captured by wireshark.
  With an other python script I iterate through the capture file.
  But I can't access a few parameters in a few layers because scapy doesn't know them. 
  So I have to add those layers to scapy.</p>
  
  <p>Here's the packet in wireshark:
  <a href="https://i.stack.imgur.com/uiuru.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uiuru.png" alt="enter image description here"></a></p>
  
  <p>I added the following code to the file "python2.7/dist-packages/scapy/layers/l2.py"</p>
  
  <pre><code>class ieee(Packet):
    name = "IEEE 1722 Packet"
    fields_desc=[ XByteField("subtype", 0x00),
                  XByteField("svfield", 0x81),
                  XByteField("verfield", 0x81)]
  
  bind_layers(Dot1Q, ieee1722, type=0x22f0)
  </code></pre>
  
  <p>When I execute the python script which should grab the parameters in the new layer (IEEE 1722 Protocol), the following error occurs:
  "IndexError: Layer [ieee1722] not found"</p>
  
  <p>What's wrong?</p>