Giter VIP home page Giter VIP logo

Comments (4)

EaseTheWorld avatar EaseTheWorld commented on May 28, 2024

Oh, pkt:get() can handle variable sizes headers.
then add offset for each header in packetResolveLastHeader() will do?
I wanted to add myself but I have not fully understood packet.lua yet(and very new to lua).

from libmoon.

emmericp avatar emmericp commented on May 28, 2024

@scholzd can you upload a preprint/draft of the relevant paper somewhere and link it?

the main problem with pkt:get() is that it is slow. If you want to have it in fast, then you'll have to figure out the variable lengths yourself/have a guard on non-default sized headers and cast them to an instance of the appropriate protocol stack

from libmoon.

EaseTheWorld avatar EaseTheWorld commented on May 28, 2024

ok then I'll try without pkt:get().
To handle 2.5 layer like vlan layer do I always have to make 2 stacks?
eth ip4 udp tunnel...and
eth vlan ip4 udp tunnel...
Any example for this?
What is the easiest way to get tunnel header offset?

from libmoon.

emmericp avatar emmericp commented on May 28, 2024

paper draft with examples: https://www.net.in.tum.de/fileadmin/bibtex/publications/papers/scholz_protocol_stack.pdf

Yes, you'll need two stacks if you also want to handle vlan tagged packets. VLAN tags are annoying, so offload them if you can. Sure, offloading isn't always available, especially if handling the inner packet in a tunnel.... I've implemented Code like this (internal stuff, not public). It basically works by checking the type and casting it to the correct stack; the two stack objects can then be handled by the same code if you used the same name for the fields.

from libmoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.