How to build a pppd plugin from source code ?

Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions
Author Message
warriorpaw
DD-WRT Novice


Joined: 11 Oct 2014
Posts: 1

PostPosted: Sat Oct 11, 2014 14:29    Post subject: How to build a pppd plugin from source code ? Reply with quote
The "PLUGINS" file form pppd-2.4.5.tar said :
Code:

Using gcc under Linux, a plugin called `xyz' could be compiled and linked with
the following commands:

   gcc -c -O xyz.c
   gcc -shared -o xyz.so xyz.o

I tried to compile a plugin written by myself, it works on Desktop UBUNTU , Raspberry PI and a route running openwrt.
But I got "Segmentation fault" on dd-wrt.
I tried build it by all of "toolchain-mipsel_*" compiler in
Code:
http://download1.dd-wrt.com/dd-wrtv2/downloads/toolchains/toolchains.tar.xz

None worked .. all "Segmentation fault"

Even tried to build this "do_nothing" plugin, still "Segmentation fault"
Code:

#include <stddef.h>
#include "pppd.h"

char pppd_version[] = VERSION;

static int my_new_phase_hook(int p)
{
   return 0;
}

void plugin_init(void)
{
   info("plugin_init");
   new_phase_hook = my_new_phase_hook;
}


Can somebody tell me Why ? thanks~~~!!!!
I using this route
http://wiki.openwrt.org/toh/fiboom/hg320
with dd-wrt.v24-19519_NEWD-2_K2.6_mega
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum