On 7/27/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote: [snip] > > > > You won't require the code, since I have just added printk(KERN_ALERT > > "RAJENDRA in get_stats\n") after the declaration of int i in > > static struct net_device_stats* get_stats(struct net_device *dev), which > is > > standard function in source code /drivers/net/loopback.c > > I built it. I get a loopback.o > > My objective in adding this printk statement was trying to see whether > this > > gets called, by executing ifconfig or netstat -i. > > I checked in /var/log/messages and the output of printk statement didn't > get > > logged. > > What might have gone wrong? How am I supposed to test it. > > However the most important question is since it being a driver, shouldn't > > this be a loopback.ko? > How did you compile BTW? > Didn't you compile the whole kernel? > Yeah I did compile the whole kernel. loopback.o also got generated(checked > the timestamp), however since it is in drivers/net, shouldn't the files > within be modules(loopback.ko), which isn't the case, but they are just the > object files. > May I know the reason? loopback is bulit into the kernel i guess, that why .ko is not getting generated. Anyway on the part of printk, did you also check the dmesg? I hope you did. thanks > > TIA. > > > > > TIA. > > > > On 7/26/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote: > > > > > > > > > > > > > > > Hi, > > > > > > I just put in a printk statement in getstats function in loopback.c and > > when > > > I tried doing a ping 127.0.0.1 or ifconfig, it does not log the message > in > > > the /var/log/messages. > > > > > > I have built it , after making the changes. > > > > > > Any idea what's going wrong here. > > > > > > > > > > > > Regards, > > > > > > Rajendra Stalekar(extn 2016) > > > > > > Location:- Akruti > > > > > > Mobile no:- +91 9860501143 > > > > > > > > > > > > > > > > > > -- > > play the game > > > > > > > > > -- > play the game > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > > -- play the game -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ