Bug 76288 - unresolved symbol ntohs
Summary: unresolved symbol ntohs
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 8.0
Hardware: i686 Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-19 09:31 UTC by Ali Reza Bahmani
Modified: 2008-08-01 16:22 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-30 15:40:05 UTC
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 09:34 UTC, Ali Reza Bahmani
no flags Details | Diff

Description Ali Reza Bahmani 2002-10-19 09:31:47 UTC
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 09:34:05 UTC
Created attachment 81085 [details]
this file is my source for linux kernel module and netfilter

Comment 2 Arjan van de Ven 2002-10-19 10:58:40 UTC
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 14:49:22 UTC
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 15:40:05 UTC
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.