Skip to contentSkip to conversation

Easy question, how to use stdio.h

DISCUSSION [email protected] 3 participants 3 messages Apr 22, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hello:

Maybe my question is very easy, but I'm new developing in Linux. I'm trying to use fopen, fprintf and fclose in a match, so I'm writting #include <stdio.h>
but when I compile the kernel and I do
make modules
the system doesn't recognize any of these functions
How can I use them???

Thank you very much.

Juan.

#1 lore raw

Hallo,

Quoted 7 lines · "[email protected]" <[email protected]> schrieb:

Maybe my question is very easy, but I'm new developing in Linux. I'm trying to use fopen, fprintf and fclose in a match, so I'm
writting #include <stdio.h>
but when I compile the kernel and I do
make modules
the system doesn't recognize any of these functions How can I use them???

Basically, you can't.

As matches are kernel modules, they run in kernel space. They don't have the usual application infrastructure (as it is the kernel's task to provide the fundament of this infrastructure, and the libc's task to provide the rest.)

Maybe you could tell us what you want to achieve, so we can possibly tell you how to do it.

Gruß,
Markus

Signature · 4 lines
Schabi's Flohmarkt: http://schabi.de/flohmarkt/

Der Dienstweg ist die Verbindung der Sackgasse mit dem Holzweg!
[DoLi in unibwm.studium]
#2 lore raw
In reply to [email protected]
Quoted 2 lines

I'm trying to use fopen, fprintf and fclose in a match How can I use them???

You can't. The kernel does not support the userlevel C library. Note that this is not a mailing list for learning about how to program the kernel.

best regards
Patrick