lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] problem in ppp connection


From: shobhit saxena
Subject: [lwip-users] problem in ppp connection
Date: Mon, 22 Jan 2007 04:19:14 -0500

hello everyone,
                   i am using an ARM e7t kit on ecos.i have
established a ppp connection using lwip_init() between two
pc's(fedora) through ARM kit.i have made one pc as the server & the
kit as client.
my problem is that i am want to transfer data from one pc to another
through ARM kit.i have tried many functions.
Can someone suugest me a way to transfer a string from one pc to another.
here is my code:-

#include <cyg/infra/cyg_type.h>
#include <stdio.h>                      /* printf */
#include <string.h>                     /* strlen */
#include <cyg/kernel/kapi.h>            /* All the kernel specific stuff */
#include <cyg/io/io.h>                  /* I/O functions */
#include <cyg/hal/hal_arch.h>           /* CYGNUM_HAL_STACK_SIZE_TYPICAL */
#include "ppp.h"
#include "init.c"


/* DEFINES */

#define NTHREADS 1
#define STACKSIZE ( CYGNUM_HAL_STACK_SIZE_TYPICAL + 4096 )

/* STATICS */

static cyg_handle_t thread[NTHREADS];
static cyg_thread thread_obj[NTHREADS];
static char stack[NTHREADS][STACKSIZE];

/* FUNCTIONS */

void pppLinkStatusCallback(void * ctx, int errCode, void * arg) {
      printf("entered call back\n");

}
static void simple_prog(CYG_ADDRESS data)
{
  cyg_io_handle_t handle1;
  Cyg_ErrNo err;
  const char str[]="hi.i am shobhit\n";
  cyg_uint32 len=strlen(str);

  cyg_io_lookup( "/dev/ser0", &handle1);
  printf("Starting serial example\n");

 lwip_init();         //this function only is reponsible for the ppp
connection//

}
void cyg_user_start(void)
{
  cyg_thread_create(4, simple_prog, (cyg_addrword_t) 0, "serial",
                    (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
  cyg_thread_resume(thread[0]);
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]