FreeBSD/sys/netpfil/ipfw/ip_fw_sockopt.c
/*
 * Finds sopt handler based on @code and @version.
 *
 * Returns pointer to handler or NULL.
 */
Finds sopt handler based on @code and @version.
Returns pointer to handler or NULL.
Finds sopt handler based on @code and @version . Returns pointer to handler or NULL .
static struct ipfw_sopt_handler *
find_sh(uint16_t code, uint8_t version, sopt_handler_f *handler)
{
	struct ipfw_sopt_handler *sh, h;
	memset(&h, 0, sizeof(h));
	h.opcode = code;
	h.version = version;
	h.handler = handler;
	sh = (struct ipfw_sopt_handler *)bsearch(&h, ctl3_handlers,
	    ctl3_hsize, sizeof(h), compare_sh);
	return (sh);
}
static struct ipfw_sopt_handler * find_sh ( uint16_t code , uint8_t version , sopt_handler_f * handler ) { struct ipfw_sopt_handler * sh , h ; memset ( & h , 0 , sizeof ( h ) ) ; h . opcode = code ; h . version = version ; h . handler = handler ; sh = ( struct ipfw_sopt_handler * ) bsearch ( & h , ctl3_handlers , ctl3_hsize , sizeof ( h ) , compare_sh ) ; return ( sh ) ; }
Finds sopt handler based on @code and @version.
Finds sopt handler based on @code and @version .