On Thu, 9 Jun 2005 22:49:49 +0300
Fatih Düzova <fduzova@gmail.com> wrote:
> Hi,
> I have a small question about tc''s source code. I m trying to
compile
> the code by itself, and for this purpose i ve created a big .c file
> that includes all the sources it uses. the reason behind this to make
> a small modification for my school project.
> But whenever I try to do "tc qdisc add ..." or "tc class
add..", it
> gives the error segmentation fault, and it gives this error in this
> code section of tc_qdisc_modify function:
>
> if (q->parse_qopt(q, argc, argv, &req.n))
>
> I could not find why this error has occured for 3 days. I would
> appreciate, if you could help me or suggest something.
>
Perhaps you are getting by the way the
tc command uses shared library hooks to allow for extension and late binding.
See dlopen(3) man page to understand this.
dlopen
The function dlopen() loads the dynamic library file named by the
null-terminated string filename and returns an opaque "handle"
for the
dynamic library.
If filename is a NULL pointer, then the returned handle is for the
main program. When given to dlsym(), this handle causes a search for
a symbol in the main program, followed by all shared libraries loaded
at program startup, and then all shared libraries loaded by dlopen()
with the flag RTLD_GLOBAL.
Don''t see why you need everything in a single source file to be able to
make
a simple modification.