Re: unable to call ntohs function in kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2004-12-03 at 10:20 +0000, bunty wrote:
> hello,
Hi list...

> What i observed about noths with respect to Fedora core 1 kernel is
> that if i write a simple network C program i can call ntohl,
> ntohs,htonl,htons from netinet/in.h but same if i call from kernel
> module why it gives ntohs unresolved symbol error?
> Also if try to include netinet/in.h it will give me errors at compile
> time.
Sure. When you write a kernel module (or a code running in kernel
space), *you can not* use standard C libraries you use when you write
user space application. You *can not* also include user space header
files... you can use function defined in header files stored
in /usr/src/linux/include...

For more info: http://tldp.org/LDP/lkmpg/2.6/html/x466.html

Ciao ciao
sp0nge
--
$ cd /pub
 
| Paolo Perego - Spike
Reply
<p.perego@xxxxxxxx>
$ more beer
 
| www:
http://www.sikurezza.org/angel

Don't assume that every sad-eyed woman has loved and lost -- she may
have got him.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux