Bug 76288 - unresolved symbol ntohs
unresolved symbol ntohs
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-19 05:31 EDT by Ali Reza Bahmani
Modified: 2008-08-01 12:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 11:40:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
this file is my source for linux kernel module and netfilter (11.50 KB, patch)
2002-10-19 05:34 EDT, Ali Reza Bahmani
no flags Details | Diff

  None (edit)
Description Ali Reza Bahmani 2002-10-19 05:31:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux; , en_US.UTF-8, en_US, en)

Description of problem:
after compile lilnux kernel module this error occurd . 


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1- i wrote this example from this link
 http://www.sikurezza.org/ml/12_99/msg00063.html
2- and i worte Makefile 
 Makefile  : 

CC=gcc
MODCFLAGS := -Wall -DMODULE -D__KERNEL__ -DLINUX -I/lib/modules/`uname -r`/build/include

hello.o:        nfexample.c /usr/include/linux/version.h
                $(CC) $(MODCFLAGS) -c nfexample.c

3- after run make command , i see below messages : 

gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -I/lib/modules/`uname -r`/build/include  -c nfExample.c
nfExample.c:12:1: warning: "__KERNEL__" redefined
nfExample.c:1:1: warning: this is the location of the previous definition
nfExample.c:13:1: warning: "MODULE" redefined
nfExample.c:1:1: warning: this is the location of the previous definition
nfExample.c:51: warning: initialization from incompatible pointer type
nfExample.c:65: warning: initialization from incompatible pointer type
nfExample.c:81: warning: excess elements in struct initializer
nfExample.c:81: warning: (near initialization for `nfdemo_inode')
nfExample.c:83: warning: excess elements in struct initializer
nfExample.c:83: warning: (near initialization for `nfdemo_inode')
nfExample.c: In function `init_module':
nfExample.c:205: warning: assignment from incompatible pointer type
nfExample.c:213: warning: assignment from incompatible pointer type
nfExample.c:316:1: warning: "min" redefined
In file included from nfExample.c:16:
/lib/modules/2.4.18-14/build/include/linux/kernel.h:147:1: warning: this is the location of the previous definition

4- after run insmod nfexample.o : this error occurd
  nfExample.o: unresolved symbol ntohs

i wrote other module for test ntohs only but again this error occurd 
  nfExample.o: unresolved symbol ntohs


Please Help me !


Additional info:
Comment 1 Ali Reza Bahmani 2002-10-19 05:34:05 EDT
Created attachment 81085 [details]
this file is my source for linux kernel module and netfilter
Comment 2 Arjan van de Ven 2002-10-19 06:58:40 EDT
Ok this is a pretty bad example to take code from ;(
On a quick look:
* not using named initializers
* sleeping while holding spinlocks
* not using the proper way to initialize linked lists

Comment 3 Arjan van de Ven 2002-10-19 10:49:22 EDT
http://www.netfilter.org/unreliable-guides/netfilter-hacking-HOWTO/
has some docs on this, also it is suggested to look at ipt_unclean.c for a
better example....
Comment 4 Bugzilla owner 2004-09-30 11:40:05 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
persists.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.