git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Multiple-line parsing of packets dissected over HTTP

From
JSJoey Salazar <jgsal@protonmail.com>
Date
Jan 19, 2021, 04:07 UTC
Message-ID
<s1Sx5qZaXOlypsQCtHxGBayhdqUl1j2vuywQN6cG59KarFM9HZu32n0CEtcje206DeKXAYuqBoNbDOA8bgwXZI3u_3nwPxYFme2GcqV0I3s=@protonmail.com>
Hi all,
In commit 33af2649 [1] we can keep dissecting the contents of the req, adv, and res packets by setting
 while (plen > 0) { }
either in `dissect_git_pdu()` or in `dissect_one_pkt_line()`, but for now in `dissect_git_pdu()` it'd be a bit messy, so wanted to ask for your feedback for getting `dissect_one_pkt_line()` to work properly first.
As you can see in pcap 169 [2], it correctly parses the length of the first line as 0x0014 (20 bytes) until `0x0a`, then it's supposed to get the length of the next line by the first 4 hex bytes in that line, but instead of reading the length as 0x0018 (24 bytes) it's reading it as 0x0010 (16 bytes), and anyways, this particular line's length actually is 59 bytes.
Suggestions on how to approach this?

Thank you all, Joey

[1] gitlab.com/joeysal/wireshark/-/commit/33af2649927cb5660d4aeb64b9a9e9a58a1823aa [2] www.imgur.com/a/91GMo6U

Next: Jonathan Nieder
Message 1 of 3 in “Multiple-line parsing of packets dissected over HTTP”
  1. Joey SalazarJan 19, 2021
  2. Jonathan NiederJan 20, 2021
  3. Joey SalazarJan 20, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.