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

Add UDP layer #2

Closed
vaguue opened this issue Feb 4, 2024 · 4 comments · May be fixed by #7
Closed

Add UDP layer #2

vaguue opened this issue Feb 4, 2024 · 4 comments · May be fixed by #7
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@vaguue
Copy link
Owner

vaguue commented Feb 4, 2024

Feature Request: UDP Layer Support

Objective: Enhance the lib/layers module by introducing an UDP layer that can read and create UDP packets, aligning with the existing layer interface structure.

Detailed Description

The UDP (User Datagram Protocol) layer is one of the core communication protocols of the Internet protocol suite used to send messages (transported as datagrams in packets) to other hosts on an Internet Protocol (IP) network. Within an IP network, UDP does not require prior communication to set up communication or data paths.

Starting Point

For the implementation, please refer to the existing exampleLayer.js in lib/layers as a base structure for the new layer.

Requirements:

  1. UDP Layer Implementation: The UDP layer should be capable of understanding and constructing UDP packets. It should adhere to the specifications outlined for UDP packets, including fields like src, dst, headerLength, checksum.

  2. Interface Compliance: The new UDP layer must comply with the existing layer interface to ensure compatibility with the rest of the library. This includes implementing any required methods and properties defined in the layer interface.

  3. Testing: Comprehensive tests must be written to cover:

    • Parsing UDP packets from a buffer and verifying the accuracy of the parsed data.
    • Creating UDP packets and ensuring the generated buffer is correct as per UDP specifications.
    • Comparison with existing protocol layers and their tests for consistency in implementation and testing approach.

Reference:

Developers should refer to the implementation and tests of adjacent protocols within the lib/layers directory for guidance on structure, coding standards, and testing methodologies.

Outcome: By introducing UDP layer support, the library will be significantly more versatile in handling network traffic, paving the way for more advanced features and use cases.

Next Steps:

  1. Review the UDP protocol specifications.
  2. Design the UDP layer interface in alignment with the existing layer structure.
  3. Implement the UDP layer, followed by the development of unit tests.
  4. Perform thorough testing to ensure reliability and compliance with UDP standards.

Contributions: We welcome contributions for this feature. If you are interested in working on this, please comment below, and let's discuss how we can collaborate effectively. For any questions or to propose implementation details, feel free to reach out or start a discussion in this issue.

@vaguue vaguue added enhancement New feature or request help wanted Extra attention is needed labels Feb 4, 2024
@vaguue vaguue changed the title Add UDP support Add UDP layer Feb 4, 2024
@vaguue vaguue added the good first issue Good for newcomers label Feb 4, 2024
@kajeli7
Copy link

kajeli7 commented Jul 23, 2024

Hello, really interesting project. I would like to contribute to this issue. Please let me know if I can start right away.

@vaguue
Copy link
Owner Author

vaguue commented Jul 24, 2024

@kajeli7 Hi! It would be very good, I can provide you with a guide on how to setup a new layer:

  1. Have a look at example layer and other layers as well (TCP for example)
  2. I use my little module struct-compile for parsing raw binary data, but it's not necessary
  3. Have a look at test module for layers, example for TCP

If you have any questions or suggestions feel free to tell me, I can give you my discord/telegram/email.
Also I'm actually looking for collaborators, because I have a lot of plans for this projects which are impossible to do by myself in a reasonable amount of time :)

@kajeli7
Copy link

kajeli7 commented Jul 24, 2024

@vaguue
Thanks for the info!
It would be great if you could share your Discord account with me where we can chat while I am working on this issue this week.

@vaguue
Copy link
Owner Author

vaguue commented Jul 24, 2024

@kajeli7 seva0075 - my Discord ID
UPD: Just made a discord server too in case we have more people collaborating: https://discord.gg/KythtrMx

@kajeli7 kajeli7 mentioned this issue Jul 28, 2024
2 tasks
@vaguue vaguue closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants