How do I check that packet socket support has been compiled into my kernel? I'm running Crunchbang, a Debian-based distribution.
Asked
Active
Viewed 4,047 times
1 Answers
5
Most Linux distributions include the config parameters used to compile the kernel in /boot/config-<kernel-version>.
So
grep -x 'CONFIG_PACKET=[ym]' "/boot/config-$(uname -r)"
Should tell you if AF_PACKET socket support is included (m for as a module).
Otherwise, you can just try and create a socket (using socket(2), see packet(7) for how to do it) in the AF_PACKET family and check if reports an error.
Stéphane Chazelas
- 522,931
- 91
- 1,010
- 1,501