@@ -1346,6 +1367,9 @@ static int qrtr_getsockopt(struct socket *sock, int level, int optname,
case QRTR_REPORT_ENDPOINT:
val = test_bit(QRTR_F_REPORT_ENDPOINT, &ipc->flags);
break;
+ case QRTR_BIND_ENDPOINT:
+ val = ipc->bound_endpoint;
+ break;
In the case where an endpoint goes away and a client has bound their socket to an endpoint, would there be any notification to unbind the socket?
Is the expectation that the client would get notified through ECONNRESET on the next sendmsg() or receive the BYE/DEL_CLIENT/DEL_SERVER control message.
On that cleanup, I guess the client would either re-bind the socket back to 0 or wait for the mhi sysfs to come back and get the new endpoint id?