2

What is the best way to send and receive netlink messages from userspace in C++? I don't want to use C. I'm wanting to connect with the inet_diag module.

  • What do you mean you don't want to use C? See here http://stackoverflow.com/questions/3299386/how-to-use-netlink-socket-to-communicate-with-a-kernel-module – Guy Sirton Apr 07 '12 at 20:02

1 Answers1

1

"There is no best, you pick the one most suitable for the task at hand." Possible ways:

  • DIY construction of NL messages
  • Aided construction with libmnl
  • libnl3, but the API seems more complex than needed
jørgensen
  • 10,149
  • 2
  • 20
  • 27