Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include kernel headers in a program

I am writing a libnetfilter_queue program. I am new to linux kernel programming. I need to include linux/skbuff.h, net/checksum.h and many related kernel headers which are not present in /usr/include/linux. I get following error on compilation

 fatal error: linux/skbuff.h: No such file or directory
 fatal error: net/checksum.h: No such file or directory
like image 638
adnan kamili Avatar asked Jun 11 '26 04:06

adnan kamili


1 Answers

try this find / -name skbuff.h 2>/dev/null then when it finds the location use the -I/path/to/folder when you compile your program.. If it doesn't find the header you don't have it!

like image 163
pyCthon Avatar answered Jun 13 '26 01:06

pyCthon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!