Giter Site home page Giter Site logo

NFQUEUE: payload length C type about libnl HOT 3 CLOSED

thom311 avatar thom311 commented on August 19, 2024
NFQUEUE: payload length C type

from libnl.

Comments (3)

thom311 avatar thom311 commented on August 19, 2024

Yes this is unfortunate. But we cannot break ABI/API.

I think in the library you will find several places where the types mismatch. I close this issue because changing API is much more painful then the type mismatch.

Does this cause you any actual problems, beside being aesthetically wrong? Then please reopen or send a patch/pullrequest (but again, we cannot change API, we can only add new API with fixed behavior).

Thank you!!

from libnl.

socketpair avatar socketpair commented on August 19, 2024

I have changed sources in a way that will NOT break API and ABI. This mean transitions int -> unit32_t and so on, and that will not break something because sizeof() is equal and values are actually positive in normal cases.

Please reopen if you agree.

from libnl.

thom311 avatar thom311 commented on August 19, 2024

I think int -> uint32_t is an ABI change. In C, the size of an int is not fixed and libnl is supposed to work also on systems where an int is not 32 bits -- well, maybe there are bugs and it doesn't work because of lack of testing. But it should work.

While it might work on my system/compiler, I am not confident that it will work on other systems. That's why I rather not change it.

I didn't reject #83 as a whole, but several changes do IMO change ABI/API.

For example, not OK:
int * -> unsigned int *
unsigned int -> uint32_t

OK:
uint8_t * -> const void *
uint8_t * -> const uint8_t *

from libnl.

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.