I know the question is very outdated, but I ran into the same problem, and only for the following, who will be:
Now you can register and get a unique descriptor for calling the kev_vendor_code_find function of the filter from sys / kern_event.h, passing the packet identifier and a pointer to the uint32 variable.
After that, in user space, you can get this SIOCGKEVVENDOR ioctl descriptor by passing a pointer to the kev_vendor_code structure with the same package identifier in the vendor_string field.
You should not do anything to βunregisterβ this descriptor (but you must unregister the filter with this descriptor in the :: stop () driver)
source share