When using TIPC_SOCK_RECVQ_DEPTH for getsockopt(), it returns the number of buffers in receive socket buffer which is not so helpful for user space applications. This commit introduces the new option TIPC_SOCK_RECVQ_USED which returns the current allocated bytes of the receive socket buffer. This helps user space applications dimension its buffer usage to avoid buffer overload issue.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -190,6 +190,7 @@ struct sockaddr_tipc { · 189 unmodified lines | |||
| 190 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ | 190 | #define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */ |
| 191 | #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */ | 191 | #define TIPC_GROUP_JOIN 135 /* Takes struct tipc_group_req* */ |
| 192 | #define TIPC_GROUP_LEAVE 136 /* No argument */ | 192 | #define TIPC_GROUP_LEAVE 136 /* No argument */ |
| 193 | #define TIPC_SOCK_RECVQ_USED 137 /* Default: none (read only) */ | ||
| 193 | 194 | ||
| 194 | /* | 195 | /* |
| 195 | * Flag values | 196 | * Flag values |