Re: Received Warnings and errors while compiling the Fedora Linux kernel

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

 





On 3/6/07, Irfan Ahmed <ahm_irf@xxxxxxxxx> wrote:
So how can I handle this issue. I need to write those packets to any file.

Read this article
 http://www.linuxjournal.com/article/8110 ==>

Things You Never Should Do in the Kernel


----- Original Message ----
From: Prasad Joshi <prasadjoshi124@xxxxxxxxx>
To: Irfan Ahmed < ahm_irf@xxxxxxxxx>
Cc: kernelnewbies@xxxxxxxxxxxx
Sent: Tuesday, March 6, 2007 9:27:09 PM
Subject: Re: Received Warnings and errors while compiling the Fedora Linux kernel



On 3/6/07, Irfan Ahmed < ahm_irf@xxxxxxxxx> wrote:
I am using Fedora Linux 2.6.18. I have updated file ~/linux- 2.6.18.2/net/ipv6/tcp_ipv6.c file.
I am working on a project  and at first stage, I need to write the ipsec decrypted packets to disk.
For this reason, I have embeded the following code in "tcp_v6_rcv" function.
    file_desc = open('/testlog.txt',O_WRONLY|O_APPEND);
    file_write_status = write(file_desc,skb->data,skb->len);   
    close(file_desc);

When I compiling the kernel, I received the following warnings and errors
------------------------------------------tcp_ipv6.c---------------------------------------------------------------
[root@localhost linux-2.6.18.2]# make modules
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC [M]  net/ipv6/tcp_ipv6.o
net/ipv6/tcp_ipv6.c: In function 'tcp_v6_rcv':
net/ipv6/tcp_ipv6.c:1224: warning: implicit declaration of function 'open'
net/ipv6/tcp_ipv6.c:1224:19: warning: character constant too long for its type
net/ipv6/tcp_ipv6.c:1225: warning: implicit declaration of function 'write'
net/ipv6/tcp_ipv6.c:1226: warning: implicit declaration of function 'close'
  LD [M]  net/ipv6/ipv6.o
  Building modules, stage 2.
  MODPOST
WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
WARNING: "close" [net/ipv6/ipv6.ko] undefined!
WARNING: "open" [net/ipv6/ipv6.ko] undefined!
WARNING: "write" [net/ipv6/ipv6.ko] undefined!
  CC      net/ipv6/ipv6.mod.o
  LD [M]  net/ipv6/ipv6.ko
------------------------------------------------------------------------------------------------------------------------------------------------

Any one has any idea about it to solve the warnings.

You are not allowed to make system calls in the kernel mode.

Regards,

Send instant messages to your online friends http://uk.messenger.yahoo.com



Send instant messages to your online friends http://uk.messenger.yahoo.com


[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