I've written a program in Linux that relies heavily on a loadable kernel module. I would like to check for this LKM in my usercode and let the program exit gracefully if it's not found. I'm not sure how to do this though.

The LKM is actually a socket implementation so it would be just as good to check the NET registered protocol for its family number, but I haven't a clue how to do this either.

Any tips would be appreciated
Cheers