Skip to content
Snippets Groups Projects
  • Phil's avatar
    1e59ef63
    Simplified the build mecanism · 1e59ef63
    Phil authored
    Packet.build() is called only on the first layer. It will call
    Packet.do_build() which will recurse through all layers. For each layer,
    it will call Packet.self_build() which will do the job for each layer.
    Packet.do_build() will call Packet.post_build() and transform on them,
    and concatenate them. Then Packet.build() will call Packet.build_padding()
    and Packet.build_done().
    
    Note that this undetermined case will have a different behavior:
    Raw("ABC")/Padding("abc")/Raw("DEF")/Padding("def")
    
    It was "ABCabcDEFdef"
    Now it is "ABCDEFabcdef"
    1e59ef63
    History
    Simplified the build mecanism
    Phil authored
    Packet.build() is called only on the first layer. It will call
    Packet.do_build() which will recurse through all layers. For each layer,
    it will call Packet.self_build() which will do the job for each layer.
    Packet.do_build() will call Packet.post_build() and transform on them,
    and concatenate them. Then Packet.build() will call Packet.build_padding()
    and Packet.build_done().
    
    Note that this undetermined case will have a different behavior:
    Raw("ABC")/Padding("abc")/Raw("DEF")/Padding("def")
    
    It was "ABCabcDEFdef"
    Now it is "ABCDEFabcdef"