net: Add FIOC_FILEPATH ioctl support for ICMP(v6)/RPMsg/Usrsock sockets

Example of /proc/PID/group/fd in this case:

FD  OFLAGS  TYPE POS       PATH
3   3       9    0         icmp:[dev eth0, id 1, flg 1]
4   3       9    0         icmp6:[dev eth0, id 2, flg 1]
5   3       9    0         rpmsg:[ap:[test:0]<->remote] # server side
5   3       9    0         rpmsg:[remote<->ap:[test:0]] # client side

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2023-08-02 16:58:46 +08:00
committed by Xiang Xiao
parent 8e8d86a7bb
commit d3bca3c2cf
7 changed files with 40 additions and 3 deletions
+3
View File
@@ -1591,6 +1591,9 @@ ssize_t net_ioctl_arglen(int cmd)
case FIONREAD:
return sizeof(int);
case FIOC_FILEPATH:
return PATH_MAX;
case SIOCGIFCONF:
return sizeof(struct ifconf);