• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/ppp/pppd/plugins/pppoe/

Lines Matching defs:ses

16 int build_ppp_opts(char *args[],struct session *ses)
24 if ( NULL != ses->filt->pppd){
25 args[0]=(char *)malloc(strlen(ses->filt->pppd));
26 strcpy (args[0],ses->filt->pppd);
34 ses->remote.sll_addr[0],
35 ses->remote.sll_addr[1],
36 ses->remote.sll_addr[2],
37 ses->remote.sll_addr[3],
38 ses->remote.sll_addr[4],
39 ses->remote.sll_addr[5],
40 ses->sp.sa_addr.pppoe.sid,
41 ses->name);
48 if (NULL != ses->filt->fname ) {
50 if (!ses->filt->peermode) {
54 args[i]=(char *)malloc(strlen(ses->filt->fname)+1);
55 strcpy (args[i],ses->filt->fname);
61 args[i]=(char *)malloc(strlen(ses->filt->fname)+1);
62 strcpy (args[i],ses->filt->fname);
68 if (NULL != ses->filt->ntag) {
69 if ( NULL != ses->filt->ntag->tag_data) {
73 args[i]=(char *)malloc(ntohs(ses->filt->ntag->tag_len));
74 strcpy(args[i],ses->filt->ntag->tag_data);
79 if (NULL != ses->filt->stag) {
80 if ( NULL != ses->filt->stag->tag_data) {
84 args[i]=(char *)malloc(ntohs(ses->filt->stag->tag_len));
85 strcpy(args[i],ses->filt->stag->tag_data);
92 if (ses->opt_daemonize) {
101 poe_info(ses,"calling pppd with %d args\n",i);
104 poe_info(ses," <%d: %s > \n",i,args[i]);
114 int ppp_connect (struct session *ses)
120 poe_info(ses,"calling ses_connect\n");
122 ret = session_connect(ses);
126 if (ses->np == 1 && ret == 1)
127 return ses->np; /* -G */
128 if (ses->np == 2)
129 return ses->np; /* -H */
135 poe_info(ses,"DONE calling ses_connect np is %d \n",ses->np);
140 poe_error (ses,"unable to fork() for pppd: %m");
146 poe_info(ses,"calling build_ppp_opts\n");
147 if (0> build_ppp_opts(args,ses)) {
148 poe_error(ses,"ppp_connect: failed to build ppp_opts\n");
152 poe_info (ses," child got killed");
153 } else if( ses->type == SESSION_CLIENT) {
154 if (!ses->opt_daemonize)
157 poe_info (ses," OK we got killed");