• Re: wrangling packets... need to learn to wrangle Type-2 msg

    From Rushfan #1@513.Wwivnet@11:1/101 to Xenos #1 on Tue Sep 10 22:58:28 2024


    i need a nudge in the right direction for grappling with reading/writing type-2
    messages... maybe sample code for a stand-alone util that just reads
    from one
    sub, or posts to a sub.


    I can't find anything I wrote up about it unfortunately, but the basics of the gat stuff is the message text file (.dat) is a repeating series of:
    header (aka gat)
    text blocks

    The text blocks are a linked list of the next block or -1 for the last block, it's much like the FAT filesystem.

    msg.stored_as is the way to find that first block. You need to jump to the section and then offset. To find the section, it's basically

    sectiuon = msg.stored_as / GAT_NUMBER_ELEMENTS (which is 2048)
    offset = msg.stored_as % GAT_NUMBER_ELEMENTS

    So you seek to the gat section + (512 /* block size */ * offset)
    The start of the gat section is: section * GATSECLEN + GAT_SECTION_SIZE

    (all of these constants are in https://github.com/wwivbbs/wwiv/blob/main/sdk/msg api/type2_text.h).

    Let me know if this high level info is helpful.
    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Xenos #1@60.Wwivnet@11:1/101 to Rushfan #1 on Sun Sep 15 11:29:26 2024

    On Wednesday,September 11, 2024 at 10:58 AM, Rushfan wrote:

    (all of these constants are in https://github.com/wwivbbs/wwiv/blob/main/sdk/msg api/type2_text.h).

    Let me know if this high level info is helpful.

    It helped a bit. I'm gonna shelve implementing reading type-2 messages in Python for now. Maybe I'll make better progress after I've let it simmer.

    I ended up trying to re-write my python interbbs lastcaller scripts in C/C++ to see if I can make any headway in that direction. I've been using apam's ibol for WWIV and wwivutil as source references.

    -x

    A .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
    /*\ | /\liens' /\lcove! WWIV on Linux, Taguig, Metro Manila, Philippines |
    / v \`-=-=-=-=-=-=-=-=-=-=-=-[ WWIV Development ]-=-=--=-=-=-=-=-=-=-=-=-=-'

               
    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)
  • From Rushfan #1@513.Wwivnet@11:1/101 to Xenos #1 on Tue Sep 17 21:43:25 2024


    It helped a bit. I'm gonna shelve implementing reading type-2 messages
    in
    Python for now. Maybe I'll make better progress after I've let it
    simmer.

    I ended up trying to re-write my python interbbs lastcaller scripts in
    C/C++ to
    see if I can make any headway in that direction. I've been using apam's
    ibol
    for WWIV and wwivutil as source references.

    Cool, happy to review any code or answer questions if needed.

    rushfan



    --- WWIVToss v.1.52
    * Origin: http://www.weather-station.org * Bel Air, MD -USA (11:1/101.0)