Philippe Biondi | 11 Mar 2006 00:17

Re: AVS Prism Header

On Fri, 10 Mar 2006, Georg Lukas wrote:

> Hi Philippe, scapy users,
>
> * Philippe Biondi <phil <at> secdev.org> [2006-03-10 12:14]:
>>> It would be nice to get a more flexible way of checking the appropriate
>>> header format for a link layer type.
>> You can work arround those kind of problems using a function :
>>
>> def Prism_or_AVS_header(x):
>>     if x.startswith("\x01\x10\x21\x80"):
>>         return AVSHeader(x)
>>     else:
>>         return PrismHeader(x)
>
> I fear I'm not sure how or if at all to integrate such a function in the
> sniff() code.

Use it instead of the PrismHeader into the LLTypes declaration !

> P.S: Is there any HOWTO on the usage of FieldListField / FieldLenField,
> I'm trying to create a packet which contains two count values x and y
> followed by x MAC addresses of type X and y MAC addresses of type Y.

AFAIR, I did not finish FieldListField correctly :(

--

-- 
Philippe Biondi <phil <at>  secdev.org>      SecDev.org
Computer Security/R&D                   http://www.secdev.org
PGP KeyID:3D9A43E2  FingerPrint:C40A772533730E39330DC0985EE8FF5F3D9A43E2

---------------------------------------------------------------------
Desinscription: envoyez un message a: scapy.ml-unsubscribe <at> secdev.org
Pour obtenir de l'aide, ecrivez a: scapy.ml-help <at> secdev.org


Gmane