Jayasankar Bandaru
New Member
Hello Folks,
I have an issue in my implementation of socket CAN. The design is like,
Receive Thread:
register start,shutdown descriptor in epoll_ctrl
epoll_wait
----if start descriptor
-------register socket CAN descriptor to epoll
----if shutdown descriptor
------close socket descriptor
User control interfaces:
Start Interface()
----If the network interface is not UP
--------up the interface using ioctl
----write into start handler descriptor using write API
Issue:
A call to Start Interface(), it enables (UP) the network interface.
epoll wait comes out with an event EPOLLIN with start descriptor then it register the socket descriptor in epoll.
epoll wait keep returning with EPOLLERR event with socket descriptor. When the error number read using getsocketopt API, it says "Network is Down".
Query:
Why the network interface state in socket descriptor is not updated while waiting for an event in the epoll-wait and always returns error event EPOLLERR even though It had enabled in start interface.
I have an issue in my implementation of socket CAN. The design is like,
Receive Thread:
register start,shutdown descriptor in epoll_ctrl
epoll_wait
----if start descriptor
-------register socket CAN descriptor to epoll
----if shutdown descriptor
------close socket descriptor
User control interfaces:
Start Interface()
----If the network interface is not UP
--------up the interface using ioctl
----write into start handler descriptor using write API
Issue:
A call to Start Interface(), it enables (UP) the network interface.
epoll wait comes out with an event EPOLLIN with start descriptor then it register the socket descriptor in epoll.
epoll wait keep returning with EPOLLERR event with socket descriptor. When the error number read using getsocketopt API, it says "Network is Down".
Query:
Why the network interface state in socket descriptor is not updated while waiting for an event in the epoll-wait and always returns error event EPOLLERR even though It had enabled in start interface.
Last edited: