This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Generic netlink support on ARM devices

We are using python script to create generic netlink socket in ARM device, we are seeing following error.

while trying to set the setsockopt(270,1,4) it is failing with "error: [Errno 2] No such file or directory"

[hostname1 ~]# uname -a
Linux hostname1 4.9.124+ #1 SMP PREEMPT Mon Mar 29 05:54:12 EDT 2021 aarch64 aarch64 aarch64 GNU/Linux
[hostname1 ~]#

below is the code that we are using in our python script for creating socket for g-netlink(This works fine in Intel devices,but failing in ARM devices)

sock = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, 16)
sock.bind((os.getpid(), 4))
sock.setsockopt(270,1,4)

we tried above commands like below and failing with NameError global name "t_socket" not defined.
sock = t_socket.t_socket(t_socket.AF_NETLINK,t_socket.SOCK_RAW, 16)
sock.t_bind((os.getpid(), 4))
sock.t_setsockopt(270,1,4)

can you please help me on this?

Looking for working generic netlink socket code using python.

Parents Reply Children
No data