Skip to contentSkip to conversation

[email protected]

DISCUSSION omit_ECE 3 participants 3 messages Sep 30, 2002

lore
Share & tools
lore

omit_ECE

author
#0 lore raw

Hi,

I want to know the one-way trip time in TCP header.
In tcp_input.c , I found many functions under which include rcv_tsval and rcv_tsecr . I don't know which two are right. So, I put many "printf" and fprintf in functions and compile the kernel. But when compiling it, some errors happen,

net/network.o: In function `tcp_parse_options':
net/network.o: In function `tcp_rcv_established':
net/network.o: In function `tcp_rcv_synsent_state_process':
net/network.o: In function `tcp_rcv_state_process':
net/network.o(.text+0x2807b): undefined reference to printf' net/network.o(.text+0x2808c): undefined reference to printf' net/network.o(.text+0x2631d): undefined reference to fopen' net/network.o(.text+0x26334): undefined reference to fprintf' net/network.o(.text+0x2634e): undefined reference to fprintf' net/network.o(.text+0x2635a): undefined reference to fclose'

Aren't "printf" and "fprintf" standard outputs? I also put #include <stdio.h> and "FILE *in_file", but they didn't work. Please give me suggestions. Thank you.

#1 lore raw

From: "omit_ECE" <[email protected]>
Date: Sun, 29 Sep 2002 20:13:56 -0500

Aren't "printf" and "fprintf" standard outputs?

There is not standard output in the kernel, and you can't assume libc facilities are all available.

Use "printk" available from linux/kernel.h instead.

#2 lore raw
In reply to omit_ECE
Quoted 3 lines · omit_ECE

Aren't "printf" and "fprintf" standard outputs? I also put #include <stdio.h> and "FILE *in_file", but they didn't work. Please give me suggestions.

try printk instead.

Jeff