fields_desc = [ShortEnumField('tag_type', None, {(0): 'End-Of-List', (257):
    'Service-Name', (258): 'AC-Name', (259): 'Host-Uniq', (260):
    'AC-Cookie', (261): 'Vendor-Specific', (272): 'Relay-Session-Id', (513):
    'Service-Name-Error', (514): 'AC-System-Error', (515): 'Generic-Error'}
    ), FieldLenField('tag_len', None, length_of='tag_value', fmt='H'),
    StrLenField('tag_value', '', length_from=lambda pkt: pkt.tag_len)]
bind_layers(PPPoED, PPPoE_Tag, type=1)
bind_layers(PPPoE_Tag, Padding, tag_type=0)
Parsing PPPoE Tags with Scapy