ntohs madness??
Harald Welte
laforge@gnumonks.org
Tue, 10 Jul 2001 20:09:29 -0300
On Sun, Jul 08, 2001 at 07:04:12PM -0400, Ramkumar Chinchani wrote:
> I am new to netfilter framework and have been dabbling through the code and
> writing some simple examples of my own.
As this is more a development type question, I'd recommend asking the
netfilter-devel list in the future.
> I used ntohs() in my module code and it compiles fine. But when I insmod it,
> it says syn.o: unresolved symbol ntohs
this is because ntohs is, depending on architecture and optimization flags,
actually a macro and not a function.
> Could someone tell me what is happening or what am i doing wrong?
I guess you didn't include byteorder/generic.h
> I followed ntohs and it seems to be merely a #define and I am sure I included
> all the relelvant ones.
I don't think so.
if it is a macro, there will be no symbol in the compiled module, and thus
no possibility at all for an unresolved symbol.
--
Live long and prosper
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)