Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Streaming-parser proposal: traceroute-s #576

Open
Mabuchin opened this issue Jun 26, 2024 · 2 comments
Open

New Streaming-parser proposal: traceroute-s #576

Mabuchin opened this issue Jun 26, 2024 · 2 comments

Comments

@Mabuchin
Copy link
Contributor

Overview

Currently, traceroute does not support streaming IO parsing. Given that traceroute can sometimes take a long time to complete, it would be beneficial in many cases to receive data via a stream as it becomes available, rather than waiting for the entire command to finish.

Proposal

I propose implementing a new feature, traceroute-s, which would return data in a streaming format. This would allow for real-time processing of traceroute data as it's generated.

Response Format

The streaming parser would return data in the following JSON format:

{
  "type":                       "string",   # 'header', 'hop', 'error', 
  "destination_ip":             "string",
  "destination_name":           "string",
  "hops": [
    {
      "hop":                "integer",
      "probes": [
        {
          "annotation":     "string",
          "asn":            "integer",
          "ip":             "string",
          "name":           "string",
          "rtt":            "float"
        }
      ]
    }
  ],
  # below object only exists if using -qq or ignore_exceptions=True
  "_jc_meta": {
    "success":                  "boolean",  # false if error parsing
    "error":                    "string",   # exists if "success" is false
    "line":                     "string"    # exists if "success" is false
  }
}

Implementation Status

I have already implemented this feature in a fork of traceroute-s.
If this proposal is accepted, I'm ready to submit it as a Pull Request.

@kellyjonbrazil
Copy link
Owner

Hi there - thank you for the parser suggestion and I look forward to the PR!

@kellyjonbrazil
Copy link
Owner

@Mabuchin did you want to submit a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants