* Return cached socket options. */
| 941 | * Return cached socket options. |
| 942 | */ |
| 943 | int |
| 944 | inp_so_options(const struct inpcb *inp) |
| 945 | { |
| 946 | int so_options; |
| 947 | |
| 948 | so_options = 0; |
| 949 | |
| 950 | if ((inp->inp_flags2 & INP_REUSEPORT_LB) != 0) |
| 951 | so_options |= SO_REUSEPORT_LB; |
| 952 | if ((inp->inp_flags2 & INP_REUSEPORT) != 0) |
| 953 | so_options |= SO_REUSEPORT; |
| 954 | if ((inp->inp_flags2 & INP_REUSEADDR) != 0) |
| 955 | so_options |= SO_REUSEADDR; |
| 956 | return (so_options); |
| 957 | } |
| 958 | #endif /* INET || INET6 */ |
| 959 | |
| 960 | /* |
no outgoing calls
no test coverage detected