wiKon
wiKon

Reputation: 35

Missing linux kernel header file

I'm currently developing a kernel module which should make use of regex to filter some input.

Since the standard user-mode library regex.h should not be used in kernel-mode programs, I've decided to have a look at the regex functionality of trace.h from the kernel see here.

The implementation was't quite a problem but when I was trying to include the header file my IDE displayed an error that it could not find any header with the name trace.h in the respective folder. So I've search the /usr/src/ directory for trace.h but couldn't find in neither linux-headers-4.9.0-3-amd64/ nor linux-headers-4.9.0-3-common/

I'm developing on Debian 9 with kernel version 4.9.0-3. Does anyone have me a clue how to include this header file?

Upvotes: 1

Views: 2972

Answers (1)

Tsyvarev
Tsyvarev

Reputation: 65928

Because path to the header is trace/trace.h, the header cannot be used by kernel
modules - it is internal for trace utility. This is not surprising that the header is absent in linux-headers package - that package is intended for build kernel modules.

Upvotes: 1

Related Questions