* Wrapper for Socket established helper hook. * Parameters: socket, context of the hook point, hook id. */
| 2918 | * Parameters: socket, context of the hook point, hook id. |
| 2919 | */ |
| 2920 | static int inline |
| 2921 | hhook_run_socket(struct socket *so, void *hctx, int32_t h_id) |
| 2922 | { |
| 2923 | struct socket_hhook_data hhook_data = { |
| 2924 | .so = so, |
| 2925 | .hctx = hctx, |
| 2926 | .m = NULL, |
| 2927 | .status = 0 |
| 2928 | }; |
| 2929 | |
| 2930 | CURVNET_SET(so->so_vnet); |
| 2931 | HHOOKS_RUN_IF(V_socket_hhh[h_id], &hhook_data, &so->osd); |
| 2932 | CURVNET_RESTORE(); |
| 2933 | |
| 2934 | /* Ugly but needed, since hhooks return void for now */ |
| 2935 | return (hhook_data.status); |
| 2936 | } |
| 2937 | |
| 2938 | /* |
| 2939 | * Perhaps this routine, and sooptcopyout(), below, ought to come in an |
no outgoing calls
no test coverage detected